you can get the server via ServerLifecycleHooks.getCurrentServer,
if the game is running (there is a World and you are on server) it will never return null
also note there is a code feature which you can use to post code here
You can't do this. You want the blockstate of a block in the world, use the world given to you in the event. You want the player? Use the player given to you in the event.
This code will crash dedicated servers.
Yeah, because the server says "the fuck you doing client, that position is a pumpkin."
1
point
Important Information
By using this site, you agree to our Terms of Use.