Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by CristianoTRS, Jul 11, 2018.
I can't place the event prints below:
1. PRINT ALL CMD
2. THE ERROR
Why do you have a method in a method?
onCommand and dmg are two separate methods that you can't declare inside on another.
So what am I supose to do if i want to do this
first of all learn java. Not to be snarky but doesn't seem like you have a grasp of the language itself. Second of all are you trying to stop damage if player is in Adventure mode?
NONONONONO When I put /dano off it allow the damage and puts player in adventure mode
In that case, still put the method outside of the else statement. And in dmg check if player is in Adventure mode and then deal damage otherwise cancel the event. Or if they are always in adventure make a list and add their UUID so if there is damage AND player uuid is in the list, cancel the event.
Is that correct?
Only one method needed for the listener (DanOff or DanOn). Also you need to add EventHandler on top of the listener