Well, here is my approach in an upcoming plugin: Listen for right click block -> compare age -> call a new block break event -> remove one seed...
SpawnReason.CUSTOM is not a String. When I do thease "nested events" I simply flip a boolean to ignore the next event call. But I don't see any...
Look into ItemStack, ItemMeta and maybe PlayerInterractEvent for adventure mode. ItemMeta represents a state so to apply it to an ItemStack you...
Yes, cast the BlockData to Ageable and compare getAge() with getMaxAge(). Try finding what you are looking for here next time.
Move the call outside your Runnable.
Well, it's basically your first problem in reverse. You are clearing the drops after the event is handled internally. This should not happen in...
If thease recipes are limited to 3x3 you can use the existing API, but set the resulting ItemStack to null if it is not your custom crafting...
This is not your problem. There is no need to create a separate Listener class. The reason your plugin is not working right now is that you set...
So you basically have two options. Simply cancelling the event, grabbing block.getDrops() and drop it manually, get the block data, cast it to...
If I understood your question right you want to create a structure at a random ground-level position. So you don't need to generate the y-coord,...
Reply next time so I get a notification, lucky I lurk thease forums. ;) Well isn't that pretty self-explanatory? You define a range for the...
Make a HashMap with the players names as keys and the inventories as values. So create a function like: static Map<Player, Inventory>...
"All 2^32 possible int values are produced with (approximately) equal probability." Simple math, there is a 100((max-min)/2^32)% chance of getting...
Yes!
Thats a very bad solution. You should rather do something like: int x = rnd.nextInt(maxX - minX + 1) + minX; int y = rnd.nextInt(maxY - minY +...
Separate names with a comma.