#help-development
1 messages · Page 1494 of 1
see what?
the code u sent
i'd like some of that stuff you're on
i sent code? where
i thought you didnt see anything?
i did see it
weird
lmao
no you didnt
what
wdym i did
whew
i did
lmao u cant embed
sed
verify
😭
i am the patron saint of the unverified
now it works perfectly tho. thanks
is there a way to do tasks in PlayerMoveEvent but not so often? (with a delay)
you could use a manual hashmap-countdown or smt
it even works with those fuckers of trees lol
how to make super duper fast api request xD
oh god helll
Explain what you want to do?
why are u removing the leaves
let them live to slowly die a painful death
because i dont like them floating around lol
I have an item that his name has to change based on the coordinates of the player but I feel like setting the metadata every time he moves will be a bad idea on the performance since many players running could be bad (I think).
lmao
and you ask why i hate humans? thats why
lol
are the coordinates down to a block position or chunk?
yeah i get ya - do you want to say only trigger it every x times? I would just do it so that once they have moved a certain distance it updates. e.g every 5 blocks
iteam sounds like a apple thing
I present you:
The new Apple iTeam -
used for online classes
starts at 99,99€ per month
lol
The Ability to invite more than 5 people is available for extra 26,99€ per month
I distance to original position
guys can there b such a thing as a .mca file wit zero generated chunks? .-.
You could update it whenever they move to a different chunk, or on a timer
anyone can help me?
and how can I do that without accidentally crashing the server?
a .mca is its own miniature filesystem
cant you see what bField#set needs as 2nd param?
it can store zero chunks in it
but i doubt any such files are generated by the minecraft server naturally
it want object
is ther a way 2 view this... filesystem? .-.
but i can't understand what
[object Object]
well that could probably be everything lol
i'm sure you can find a mca editor or viewer online
If updating it on chunk change you test getFrom and getTo in the move event to see when its not the same chunk
mca editor 😄 ty ill hav 2 check
cant intellij support mca?
at least ill kno if me code is workin or not lol
if u find an extension ig
Field bField = PathfinderGoalSelector.class.getDeclaredField("b");
bField.setAccessible(true);
bField.set(c.goalSelector, ??ANYTHING??);
b in PathfinderGoalSelector is this:
private static final PathfinderGoalWrapped b = new PathfinderGoalWrapped(2147483647, new PathfinderGoal() {
public boolean a() {
return false;
}
}) {
public boolean g() {
return false;
}
};
lol
lmao is it even possible to use a PathfinderGoal without nms
dont think so
i need set this field anyway
use paper's ai goals api
can anybody help?
meta.setDisplayName(name);
if (!lore.equals("/"/"")) {```
https://i.imgur.com/WadF5iD.png
lol wat
do ' then \ and then another '
that'll do """
what are you even trying to do
i want it so if the lore is set to "" it won't do anything
i won't use paper on my server
then just use ""
not lore i mean, sorry
lore is probably a list
the string
i hate string formatting
it is a list
a list will never be equal to a string
because why?
it's a list string
because why... that doesnt sound right lol
but the value it's set to is singleton
because it have some critical error's for my assemblies
interesting
what does that mean
i mean, i personally need to use paper, because without paper my server couldn't nearly run 32chunks render distance lol
a list will never be equal to a string
language bugs
@lean gull are u 11?
i don't understand
the type of the list doesn't matter; a list is a list
an apple will never be an orange
well
a basket of oranges will never be an orange
you can dye it :P
i would disagree there lol
Still won't be an orange
JavaDocs for List<>() for you.
is an orange apple an orange? i'd say so haahaha
your metaphor confuses me
How can I send my code with md5 past ?
?paste
?paste

List<Orange> will never be an Orange
a List<Orange> is a List
it simply has Orange's in it
Sorry 🙂 so how can I send my code with md5 paste ?
that doesn't make it an Orange
it's definitely an orange
Open the link paste what you want and click save
not gonna change my mind hehe
what do i do tho doe
Yes i save and then ? Because when i take my code and paste it on discord it is white
theres too many o's for my brain
lol i accidently said "tho doe"
i say weird wrong stuff all the time
When saved copy the link and send that
but i have excuses lol
wat do i do doe tho doe
.
i still get confused with an and a. tho i know what to say mostly, sometimes i get confused
?jd
package index
Okay thank you, So I have a problem with my CustomChatEvent, I would like to separate the chat per world and do an event fort that but there is no message in the chat when a player send a message
an placed before a vowel, a before a consonant
@wraith rapids may i sho u my code .-. its just liek 20 lines
Show CustomChatEvent
https://paste.md-5.net/uwamanixad.java The class with the event
https://paste.md-5.net/bavutowake.java# the class with the listener
my english is too bad to know what the flying fuck vowel means lol
a,e,i,o,u
all others - consonant
Looks fine did you forget to register the listener
TOTALEN KRIEG
Idioten
oh god
No, in the class main, i didn't forget to call the listener
Add some debug messages and see if it gets called
...somethin bout hand washin? 😄
yea
lmao
something
ah yes, the real übermensch does not say such words
übermensch? dafuq
wait u can make custom events in spigot?
Yes lol
wait @wraith rapids y r u a norman .-. shouldnt u b veryfy'd by now
some people dont like that word
?
let them not like it
Okay, was zum teufel soll sein? Wir können uns nicht so in der Welt repräsentieren.
if i evr die n come back im not gettin veryfy'd 🤣 i will live a norman lyf liek u
it is, though the exact meaning varies by context, and as such it also varies whether it can be interpreted as such
so, i probably shouldnt say it right? xd
I mean, there are worse things to say
like the n bomb for example lol
I mean honestly, it isn't a de-facto swear word (too lazy to look up the exact meaning of swear words so I may be really wrong there) but more of an insult
i mean, some people could say, untermensch could distract poor people or smt
probably depends on how people interpreting it, like you said
hi i need help because i want to use plugins in my server but i dont know how to use spigot to do it :c can somebody help me??
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
use google
I am pretty sure that the word can be easily be connected with the nazi regime, at least I would connect the word with that
i did but im new to this and could be better if someone explains to me slowly :C
nazi? lol, i personally would never associate that with some nazi shit
but wow, interesting
i probably just stop saying that xd
same way you install a vanilla server
Try following it, if you get stuck ask in #help-server
Well, the nazi did categorise people into categories, so I would be surprised if the nazi did not use this word
but instead of the vanilla jar-file, you use the spigot-one
i asked in general and they said me to ask here
im so lost idk what to do, i just created a server and i wnt to use /home and tp to my friends but idk how to do it
yeah sorry mate i cant help ||ur to stupid in minecraft||
with external plugins lol
ok i get it but how can i get the plugins in?
oh buddy for real? wtf
use spigot
well, übermensch is associated with nazi germany quite closely, even though they didn't spawn the word, only used it
so it's understandable for similar words to trigger the same response
lol
fuck you dirty ass hole
#help-server please this is the wrong channel
i meant as in ur stupid in mc
shut up kid
i need help because i am like a lost old man
consider getting lost in the right channel
Use paper man, you are a lost cause
This
A lot easier than compiling spigot, but honestly ?bt or bust
@wraith abyss
you go the the buildtools site i suggested, and run it (all documented there, pretty easy).
then you take the outgoing jar, put it into a folder.
in that folder you create a file like start.bat
into that file, you put in java -jar -Server -Xmx2G jarfilename.jar nogui
then you just start the .bat-file
where Xmx2G means your server runs at maximum 2GB of ram
-Xmx always should have a matching -Xms though
i dont think its that important in this case
i mean, i personally never use xms for localhosts
it's not a production server and he'll probably give up in a few days anyway so it doesn't matter
Usually you do not have to specify either unless you want performance, so ¯_(ツ)_/¯
im only listening relarivex because is the only one helpinh so everyone else dont spam
anyway
https://www.youtube.com/watch?v=lNp4I-600wo
there's a tutorial in videoform
A simple video that explains download and setting up your own Spigot OR CraftBukkit server for 1.16 and above. I show 1.16.3 in this video, but it applies to every recent version and even future ones! By the end, you will have a working multiplayer server that you and your friends can play on, for free! Yes, this video uses BuildTools, but it's ...
what is the site you suggested? i dont see it
?bt
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
i've found that deep fried onion rings are quite cool
Could you help him in #help-server ;/
https://adoptopenjdk.net/ if you are at it already
he explains it in the video tho i guess
i also arbitrarily load ice cream into the ash tray
thx for the video but i dont think it can work for me because i am in the lastest version
1.17
There is no ETA for 1.17. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
so either use 1.16.5 spigot, or 1.17 vanilla
yes i just want to learn and get ready to use it as asoon as possible
Anyone asking for an eta will be fed to the goblins
👺
it doesnt matter which version the tutorial is, its basically the same way to set it up all the time
then im saving the video too
Md should introduce a caret emoji
i got a emote-reaction from geol, now i can die in peace
lol
and do you know how long more or less does it takes to have ready the 1.17 spigot version?
?eta
?eta
There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
There is no ETA. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
From what I remember, Spigot is taking longer with 1.17 than they did with 1.16.. but I don't know how long it takes on average, and 1.17 might be a particularly large update Mojang-code wise
ok ty
I do not think that the mojang code is at fault
i think i got everything i need
It's a draw now
didn't mojang like omit half of the promised features anyway
"they'll be in 1.18 we promise"
interesting
It is just spigot's sloppy work that hit them back again
better watch your tongue
Honestly, this seems like unhealthy levels of cynicism
we don't shit talk bukkit or its derivatives here
anyways, I should go now
unless it's paper
lol
paper is deprecationville
bukkit is perfection
I meeeaaan
Our server uses Tuinity because Spigot is waaaay too unstable. Paper is better but we need the real cutting edge optimisations and Spigot doesn't have any of that.
Spigot unstable 👀
Spigot isn't unstable
Hell yeah, Paper's async chunks alone is enough to not use Spigot
That's performance not stability
spigot is PERFECTION and anyone who uses or contributes to a fork is selfish and conceited and only thinking about their own gain, instead of sharing their work with the entire ecosystem
you will literally go to HELL for using paper
Does public ItemStack item; holds the reference to the Item even if I change his metadata?
Figure this is a half-meme :P but both Paper and Tuinity are open source.. if you want to use their features and optimisations, you can
isnt that already implemented in paper? lmao
They're not synonymous, sure, but they do overlap.. like if my server can't handle 20 players, do I really care if it's non-optimal code or buggy code?
so, its basically the same as notick-viewdistance in paper?
epic games giving free nitro yum
myes
I meeaaan, isn't Tuinity made by MiniDigger?
idk
nonononono
no
And isn't MiniDigger now a core developer of paper
SpottedLeaf is tuinity afaik
he sold himself to them lol
Oh yeah, SpottedLeaf, my bad
but either way, isn't SpottedLeaf also a pretty active developer of Paper?
myes
MiniDigger is in paper core team, yes
but only recently
mostly working for Hangar or smt, idk
see, unlike spigot that is in constant war with all of the downstream forks, paper and its derivatives are all friends
Like, one week ago
yea
lol
like i said, he sold himself. he's not that loyal as you guys think
he's been working on hangar for ages
We all must sell ourselves at some point
not everybody who is an active contributor is in the team
there are lots of very active contributors who don't have official standings or roles
themselves
TOTALEN KRIEG
how do you set entity target?
I want to make that when someone is eating the golden apple if they receive a blow to stop eating it. someone help me
Could you rephrase into a more understandable concept?
Like do you want to stop their eating whenever they get hit?
ok so my sever has downloaded a vehichle plugin however some of the feature s is not workign can anyone help?
I was thinking of using replaceAll or regex to make a placeholder but I feel like there is a better way, any ideas? making a place holder for a click event
set a flag on the player for the last time they took damage, then in the consume event if the time is too close, cancel the event.
How?
when someone hits you and you are eating the apple, don't let you
store in a Map the last damage time under the Players UUID
ok so my sever has downloaded a vehichle plugin however some of the feature s is not workign can anyone help?
all you have to do then is check that time in the PlayerItemConsumeEvent
Too close to now and you cancel
This would just put a cooldown on eating after a hit tho right?
not the otherway around
so if you take any damage before you finish eating the time get logged in the map
there is no event in spigot a configuration?
@royal rapids if you want this you would have to make a plugin, I hope you know that.
You cant help me?
why wont this work?
public void onEnable() {
BukkitTask deathDistanceUpdater = new DeathDistanceUpdater(this).runTaskLater(this, 20);
}
public class DeathDistanceUpdater extends BukkitRunnable {
@Override
public void run() {
System.out.println("works");
}
This channel is for obtaining help to write plugins, not to write them for you
nothing gets printed
ok so my sever has downloaded a vehichle plugin however some of the feature s is not workign can anyone help?
you need #help-server
no one talking
This is the wrong channel
I see nothing wrong with your code
I have no errors either
if yoru plugin is enabled that is
You must be doing something wrong. The code you posted above is fine
I want to make it repeat it self
it printed once
missed that
repeating scheduled tasks is my goal
runTaskTimer
then runTaskTimer
is ```
Bukkit.getOnlinePlayers().forEach(p -> ((CraftPlayer) p).getHandle().playerConnection.sendPacket(particle));
the best way to spanw a particle for all players?
probably
cuz player.spawnParticle will only show it for the player
Why use packets when you can use the API?
idk thats what i found on goolge
if mean, you could use for(Bukkit.getOnlinePlayers(){ //cast it //send })
delay is before starting the task while period is the time between the tasks?
im currently testing with
https://paste.md-5.net/kiqexagaqi.java
and many others
wich works
?
Spawning the particle in the world would be the correct way to do it
actually i remember where i fucked up and did like }, 20L, 0L);
was kinda funny
You use packets if you only want one player to see it.
World#spawnParticle shows to everyone
only gold ores
sad
you can just check the getType().name().endsWith("_ORE")
well nvm, its a placed block... that shouldnt let a name change
but its only showing up in capital letters
Don't use toString
.getName()?
Use your getter?
ok
?1.17
There is no ETA for 1.17. Having an ETA leads to unrealistic deadlines, false hope, and a bad product. It will be ready when it's ready.
.
for((CraftPlayer) p : Bukkit.getOnlinePlayers()){
p.getHandle().playerConnection.sendPacket(particle);
}
unsure if this would work but it's an idea
anyone know how to set a variable of a uuid
a UUID is an object
i don't know what an object is
Not to be rude, again, its basic java
java is an object oriented language
the tutorial i watched on basic java didn't include it lol
that is, the language revolves around objects, and everything being objects
it is fundamental to the language
Does anyone here have some page or article about using Anvil as InventoryType? I figured out that spigot doesnt have an easy way to open an inventory for player with a anvil than it has with a normal virtual 'chest' and im trying to find some more documentation.
yea it as simple but the opening of the player isnt done the same as p.openInventory(inventory);
all u can do rn is send a gui thru packets like this:
are you sure
Connection.sendPacket(new PacketPlayOutOpenWindow(1, Containers.ANVIL, new ChatComponentText("IT WORKS!")));
yea positive, checked multiple forums with same issue
you'd think that createinventory would instantiate an inventory that you could pass to the openInventory method
guess not
What issue?
well opening a inventory with the InventoryType.ANVIL doesnt function as seems
Sending a packet is the only way, I think.
recipes not working?
@shut oyster : https://github.com/WesJD/AnvilGUI
yea and now im trying to add an item to that packet additionally and pickup the moment a player renames that item, but i cant find much documentation
That library has support for items, too.
yeah, basically any non-container inventory type added since like the furnace is completely fucked up in the api and nearly inoperable
yea i came across that a couple of times, i was really hoping of doing it myself without and api or whatever. also already tried to extract some code from there but its a big mess in my brain
enchanting tables, anvils, that map workbench thing and grindstones and everything
it's all horrible
Workbench and enchanting tables have their own method to open them
actually?
yes
Someone needs to make a PR for spigot to add anvil then
obviously paper has it
shit like this is cancer to work with
meaning people make prs
how big is the step from converting a spigot plugin to paper?
there is none
all spigot plugins work on paper
paper is api-compatible
you just change your dependency from spigot-api to paper-api and you're done
oh shit ofcourse
the actual issue is that using paper-specific api methods will blow up on spigot
just obviously means that, when using the paper-only api your plugin can only run on paper servers
as those methods don't exist on spigot
but, spigot servers are a minority these days so whatever 😎
yea right gotcha
because to my knowledge paper is build from spigot but did it change alot as in the already existing libaries ?
the api is more expansive
the biggest difference from spigot api that you'll notice is that instead of using chatcomponents and strings in a lot of places, they're quite agressively driving forward adventure
which is basically chatcomponents but overengineered
aside from that, everything is almost exactly the same, except that you can do a lot more with the api that you'd have to use nms or protocol hacks for on spigot
right not exactly sure what you mean but ye, paper fast and better
there are also quite a few things that let you optimize your plugin better, f.e the Block::getState(boolean) overload, which lets you decide whether to deep clone the state of the block or not
alright well thanks, ill see if i can make the conversion. should be doable
where spigot clones it regardless of what you do
could someone help me with permissions?
i added permission: origins.givepot to my plugin.yml
but it doesn't work
How does it not work?
im still able to do the command
That only registers the permission.
oh, ok
I think you'll still have to check for the permission in code.
k ty
also
is there a way to get the default permission error code?
like this thing:
u dont need a permission: permission in plugin.yml lol
oh
If you want to set something to true by default.
bruh my optifine is bugged
Or want to create permission groups, then yes.
free nitro on epic games store if you want
no fake 100%
does anyone know why optifine 1.17 isnt rendering shit
Because it's in beta.
Was going to say, it's a pre-release Optifine
try the latest preview, there's a new one
this is this latest preview
but yeah it's definite ymmv
lmao
out of curiosity, whats ur graphics card?
it was working fine before
so it isnt my graphics card
there's a lot more ways for it not to work then for it to work
its just optifine
correct, it's pre-release
chunks load if i update it
7 chunks
place a block or destroy a block in a chunk
oh i see
pls is there a way to get default error message like this
u have to make it
k ty
@granite stirrup honestly you'll probably just have to wait for the next rc
Which entity are we talking about?
If you assign to your command a permission node, it will show that message
ik that stuff
There's not really anything you can do
an elder gaurdian
idk why the bugs happening should i report it to optifine ?
commands:
mycommand:
permission: my.command.node```
declaration: package: org.bukkit.entity, interface: Mob
If my.command.node isn't granted, it will show that no permission message when they try to run that command
It also won't be sent to the client so it's not tab completable
they're probably already aware of it, but you can
again, you're running a prerelease, so ymmv
there's expected issues
what type of var does it need to be? LivingEntity? Entity?
void setTarget(@Nullable LivingEntity target)
I have tried casting it to a mob and it still did not show up
I also tried casting it to LivingEntity and did not change it, and of course I tried just doing it to regular entity
I found the issue
is there a way to hide commands from non-op players like /give is
disable tab complete for it
if player isnt op
k
they are hidden by default
tab completions pull from the player's command map, which is based on the player's permissions
wtf
ohhhhhh, wait........ im dumb, i forgot to build my plugin, thats why all my permission stuff wasnt working
if a player lacks the permission associated with a command, the player will not see that command in /help or in their tab complete
which is why you should always assign permissions to your commands in your plugin
lmao
otherwise everybody will be able to see and tabcomplete those commands
and the server admin will need to either modify your plugin.yml for you, or get a shitty command hider plugin
is there an event that detects player upgrading a diamond armor to netherite armor?
on smithing table use or something
I think theres an event called PrepareSmithingEvent
thx
also i can get damageCause from entityDmgEvent
i can also check if the dmg is caused by an explosion
but can I find out what caused the explsion?
like a tnt?
or a creeper
that should be possible to find somewhere
but i'm not sure if the api reflects that
Im sure its possible, just don't know from the top of my head tho
I think you need EntityDamageByEntityEvent to get the creeper and/or EntityDamageByBlockEvent to get the bed
EntityDamageByEntityEvent is for tnt to i think
true
Explosion-Damage is Explosion-Damage - No matter if it comes from a Creeper, or from TNT
The DamageCause is always just [Explosion]
the damage cause is still tracked somewhere somehow, as the game is able to associate f.e a tnt shot by a player with a flame bow as damage dealt by that player
whether the api lets you go the same route i'm not sure
e.getDamager()?
presumably by getting and casting the last damage cause itself, and getting the damager
The DamageCause is always an Explosion yes, but there is also a block or entity that created the cause
though i'm pretty sure that is only for players
and the creeper will probably not show up in it
u could try
i'm sure thats just because he's damaged by the arrow first
no; the arrow hits the tnt block
which lights it
the damage from the explosion of that primed tnt entity is still counted as being caused by the player who fired the bow
as in, it will drop experience orbs and shit
i remember some popular ender grinder designs used to take advantage of this
probs cuz its not cancellable
You can have a skeleton shoot through lava and ignite TNT and killing creepers. All creepers would drop records.
At least how it used to work.
🤣
yeah, it's not exactly bulletproof nor does it make sense all of the time
but the causes are definitely tracked somewhere under the hood
sometimes a bit too fervently
Would a plugin made in Java 11 work with Java 16?
i dont think so
it might
They're that much different?
no but it might not since idk
since the native version will be java 16
it might work u never know
u will just have to wait and see
You can't cancel it but you can chance the results of said attempts
So you could just not give it a result
If you aren't using the deprecated and removed libraries, you should be fine with an older Java version. Kind of.
oke
hey i made the conversion for my project from spigot to paper but running into some issues using EntityPlayer as in NPC like, does anyone know if paper has its own solution for this or should i go and add nms to my project again
maybe its better to ask in paper-discord
good idea, thank u
Hey guys I wanna use luckperms variables and stuff in my plugin, what do I need to do ? Import luckperms or something ? Put files in same folder ?
if you use maven, just add their repo and dependency
into your pom.xml
if not, import the jar-file manually
Thanks, I have maven and pom.xml but can you explain what u mean adding repo and dependancy into it ? I'm real noob sorry about that
for ```java
creeper_entity=((Creeper) entity)
does creeper_entity equal a copy of entity, or the creeper version of the entity(can I make the creeper explode)(assuming the entity is a creeper)
one sec
.getEntityType return player
.getentitytype returns the person damaged, I think
<dependencies>
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
<version>5.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
just add this to your pom.xml
okay maybe so how do i get the source of the damage?
and then just reload maven. then it should download the plugin into your project
I think it is .getcause?
yea ik but you get explosion dmg from multiple entites
Thanks a lot ! Really appreciate, reload maven, u mean just restart intelliJ will do ?
could someone help me with this?
hmm
oh entity explode event
no, I was thinking
I think you should use either entitydamagebyentityevent or entitydamagebyblockevent depending on if an end crystal counts as an entity or block
those have the getdamager method
and could someone help with this already?
Dope, thanks a lot you are the man
its an entity and thx
what are you trying to do
spawn a creeper?
get an instance of a creeper?
explode a creeper
explode a exisitng creeper?
yes, that I got in an entity
hmmm
that I got from an event
basicly convert the entity.Entity to an entity.Creeper without causing the entity.creeper to become a copy
huh?
yes, but I'm trying to get the creeper from an entity.Entity
well this is how i make a zombie
Zombie armoredZombie = (Zombie) loc.getWorld().spawnEntity(loc, EntityType.ZOMBIE);
.getEntity
cast the creeper onto it
You cast to Creeper and explode it
how do you cast to creeper?
never did it
I know how to explode it
((Creeper) entity).explode()
^
is there a way to make that a variable? because I need to use it multiple times
that's what I was asking
when you cast teh creepr on it
it is already a creepr variable
you can't use it multiple times, you are about to blow it up
ohright
then you already cast it, why are you askign how to cast it?
no, I mean could you do this? ```java
Creeper creeper_entity = ((Creeper) entity);
creeper_entity.setFuseTicks(100);
creeper_entity.explode();
if you are setting a fuse you use ignite()
no
so the creeper_entity would explode?
yes
it doesn't seem to be working
then your entity is not a creeper
where are you getting yoru entity instance from?
a list that I filtered
Where is your entity coming from?
listofallentitiesinworld.removeIf(entity -> entity.getType() != EntityType.CREEPER);
Hey sorry but how can I check if it works ? I dont think it has downloaded anything when I clicked on reload, should the variables appear when I code like usually liek some luckperm variables would appear in the list as im coding my plugin ?
and then the entity is listofallentitiesinworld.get(x)
you are going to cause a LOT of chunk loading using that code
are you trying to blow up all creepers?
no, then I check all the entities in the list to see if they have a player placed block(long code) nearby, and then I blow them up
then debug yoru code as your explosion code is fine.
if you want all Creepers in a world just use World#getEntitesByType(Creeper.class)
what does the hashtag mean?
member of
how would i integrate multivrrse into my plugin
all the code is fine except for the exploding
but now I know the problem isn't with the variable as ((Creeper) entity).setFuseTicks(100);//5 second fuse ((Creeper) entity).ignite();
also doesn't work
does it actually get to and run the exploding code?
can you show your pom?
yes, I checked by sending a serverwide message just before the exploding code
it sent
wait, maybe it's because I run the code 2 times a second?
and it keeps igniting?
`` <dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>net.luckperms</groupId>
<artifactId>api</artifactId>
<version>5.3</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
`
100 ticks is also a long fuse
@sullen dome Im noob and new so there may be something that I need to set before hand on the program idk
and if i overread some message, feel free to ping me. i'm watching netflix beside
my anti malware blockin link
fuck it too long to paste here
wait
k 2 sec
not sure what I shoud do after lol I pasted it but there is no button ?
am i supposed to provide a link or something ?
Control S
^
Then copy the new url
and then just copy the link in the search bar
well
then
just paste it into a .txt file, and send that file
that should work, idk tho if you need to be verified for that
lol no it doesnt work dammnit lol
he cant use dependencies. seems like the code isnt downloaded or smt
send me private
Ah ok
send fa, i'll accept
how do I make a loop that does not lag my server/game really really badly
I have waits in it
Don’t use waits lmao
I mean any loop is by default blocking the thread its called on assuming you don't jump to another thread withing the loop
but it lags the server when i don't use loops
Or - if you absolutely have to - make a new thread
Crota send code
use I know what a loop doess
Hello config is returning null cant find the problem here is the files:
Error : https://paste.helpch.at/zojupuluco.sql
Config Class : https://paste.helpch.at/fejutulujo.java
Main class: https://paste.helpch.at/ehihijemis.java
Fly Class:
https://paste.helpch.at/wikunipeta.java
Ther is all the information that is needed to solve it
the chances are you're doing something very wrong
But using the scheduler is probs better
if someone different sent me an FR here, tell me , and why you did
I am using the thread.sleep(), but I did use the scheduler previously
i usually dont accept random requests
thats a big issue
Oh no
Idk RealRivex
how do I do that embed thing like here: (I turned ping off btw)
got 3 requests now lmao
```java
code
'''while (!true == false) {
Mob livingEnt = (Mob) trollJuice;
boolean found = false;
for (int integer = 0; integer < 202; integer++) {
List<Entity> entities = trollJuice.getNearbyEntities(integer, 64, integer);
for (Entity e : entities) {
if (e.getType().equals(EntityType.PLAYER)) {
//do compas thing for that player, also post that code, i would be interested in it..
found = true;
founded = (LivingEntity) e;
break;
}
}
if (found) {
break;
}
sleep(50);
}
founded.sendMessage(founded.getName());
livingEnt.setTarget(founded);
sleep(500);
}'''
remove the sleep
that makes it lag the server really, really badly
Hey,
does anybody have an idea how to format an unquoted JSON-String to a parsable one?
This String is the result of a Player-Head texture {textures:{SKIN:{url:""http://textures.minecraft.net/texture/30ae3d50642379e98a64d4a06bb4ef94a34b4786da3784a930d9346ec6113d2""}}}
But there are missing quotes around the objects like url.
so bad I can't even execute commands or get block drops
actually crota I believe you could use a parallel stream here
but also
!true == false
its gonna loop forever
probably show be while entity exists, I am just trying to get the code working rn
oh yeah I see now
but its dangerous if nothing is found
then it will practically continue to hang the server
Afaik it doesn’t really matter and the parser (something like gson) will change it
Use == for enums but yes you could
the type comparison works also
Unfortunately Not, haven’t tried it with gson tho, but with the Apache one
apparently u can manually do ram in java but the way u do it isnt recommend
instanceof is probably half a nanosecond faster
I am speed
Hmmm I’m not sure then
colclure
am I getting accepted? 😮
if it has a reason, except sending me trash gifs or messages
frankly I don't have a good reason
i mean, i dont like getting messages with spam like hey, you want to pay for instagram followers?
does anyone know how I can make this not lag my server?
😐
literally everything about it is wrong
it is remarkable how wrong something can be
why should i accept your request
to ask this way
crota let me ask this, what did you want to accomplish with that
why not 🙂
well
Conclure just wants friends
true that
I want the elder guardian to constantly go after the closest player. Not a squid or some fish or smth
but only because you seem like a german home
homie*
i am ur friendy
get the first element
done
no need to search through the entire world chunk by chunk 200 and 2 fucking times
yeah pulse my f list got a little bit poor after I drained it
uh an estimated 50%
Damn
yeah lol
so
now i accepted your fr
and you dont even have anything to say? wow. i actually thought i'll get spammed with stuff
i don't have friends but I do have a long contact list of like 500 people who have asked me dumb and unanswered questions in dms
but no, one normal person on this earth
I do have something now when you mention it
lmao from this discord?
this, paper, and a few others
thats why i dont accept all requests
i don't accept any requests
stuff like
I mistakenly deleted most things in my plugin code. My only option is to decompile the imported plugin. But right now I just couldn't do it. Can you do this for me?
lmao
lol
should i still use an if statement or will this work just fine
this.description = description != null ? description : "";
I mean I would advocate to use that instead of an if else
Heya. Im having a problem with PlayerInteractEvent and InventoryClickEvent... Im trying to make it so that if there is a right air or left air click on items in the hotbar it will open a gui. I have that part working. But my problem comes when I add an inventory click event, so that an item in the Inventory will open a new Inventory, it opens the menu, then opens the old menu from the PlayerInteractEvent. Ping or message me if you could help.Thanks
oh
hmm you might want to disable the opening of the old menu in PlayerInteractEvent if the player is already in that menu
hmm. how would I do that?
Send your current code
kits:
Tank:
helmet:
material: Material.DIAMOND_HELMET
enchants:
- Enchantment.PROTECTION_ENVIRONMENTAL
enchant-levels:
enchant1:
- 2
- 3
- 3
- 2
would the material and enchants part work, or do i need to do something else
cuz something's going on in console and it's not mentioning it but i've checked every piece there is
just have
material: DIAMOND_HELMET
@EventHandler(priority = EventPriority.HIGHEST)
public void onInventoryClick(InventoryClickEvent event) {
if (event.getWhoClicked() instanceof Player) {
if (event.getCurrentItem() != null) {
if (event.getCurrentItem().hasItemMeta()) {
if (event.getCurrentItem().getItemMeta().getDisplayName()
.equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Test &8«"))) {
openMenu((Player) event.getWhoClicked());
}
event.setCancelled(true);
}
}
}
}```
Oh
and
enchants:
- PROTECTION_ENVIRONMENTAL
assuming you want to grab the strings with Enum#valueOf or smntg
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getPlayer() instanceof Player) {
if (event.getItem() != null) {
if (event.getItem().hasItemMeta()) {
if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
if (event.getItem().getItemMeta().getDisplayName()
.equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Example &8«"))) {
openOtherMenu(event.getPlayer());
}
}
}
}
}```
notprankster yes but I would recommend doing it inside a try-catch (IllegalArgumentException)
so when I click on the item in the inventory, it runs both methods
np 😄
also
lets say i want the encahntment levels to be specific for each part of the armour
How do you identify menus as of now?
enchants:
- PROTECTION_ENVIRONMENTAL
enchant-levels:
enchant1:
- 2
- 3
- 3
- 2
basically from helmet to boots
By their getTitle()
would i be able to set that into an array
please don't get inv using title
no, specifically
i want prot 2 on helmet and boots, prot 3 on chestplate and leggings
is it possible that i get an array of ints from that
I mean sure
aight Max your turn now sry
can we start with reducing some code smell in your code?
who is hyped for spigot 1.17
wrong chat
what chat should it be in ?
#general
like an if {} else {}
oh then other way -- without brackets
//implicit
private String resolveViewName(Viewable viewable) {
if(viewable.isTemplateNameAbsolute())
return viewable.getTemplateName();
return uriInfo.getMatchedResources().get(0).getClass().toString();
}
//explicit
private String resolveViewName(Viewable viewable) {
if(viewable.isTemplateNameAbsolute())
return viewable.getTemplateName();
else
return uriInfo.getMatchedResources().get(0).getClass().toString();
}
try {
this.helmet = new ItemStack(Material.valueOf(fileConfiguration.getString("kits." + kitname + ".helmet.material")));
} catch(Exception e) {
}
?
?ask
If you have a question, please just ask it. Don't look for staff or topic experts. Don't ask to ask or ask if people are awake or available. Just ask the question to the channel straight out, and wait patiently for a reply.
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getPlayer() instanceof Player) {
if (event.getItem() != null) {
if (event.getItem().hasItemMeta()) {
if (event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_AIR) {
if (event.getItem().getItemMeta().getDisplayName()
.equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Example &8«"))) {
openOtherMenu(event.getPlayer());
}
}
}
}
//the code below is more readable
Player player = event.getPlayer();
ItemStack item = event.getItem();
if (item == null) return;
if (!item.hasItemMeta()) return;
Action action = event.getAction();
if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) return;
if (!item.getItemMeta().getDisplayName().equals(ChatColor.translateAlternateColorCodes('&', "&8» &6Example &8«"))) return;
openOtherMenu(player);
}
@quaint mantle
maybe you should not just spoonfeed, also add some comments so he knows what what is
i couldn't tell as a beginner what or where the implicit else is here
oh great. thank you
Material material;
try {
material = Material.valueOf(fileConfiguration.getString("kits." + kitname + ".helmet.material"));
} catch (IllegalArgumentException exception) {
//handle
return;
}
ItemStack stack = new ItemStack(material);
Hmm I would do something like this note IllegalArgumentException
but yeah essentially only try catch the absolute necessary parts
yeah Max do that on the ClickEvent one also
oh yeah good point