Thank you! But how would it work with other things, like killing an animal? How could I fake that to the player? I see that sendBlockChange is...
Hi, I'm very new to ProtocolLib and I'm wondering how I can send a block break oder block place packet to the client. I actually want the player...
brord Adding this event should work: @EventHandler public void onEggThrow(PlayerEggThrowEvent event) { event.setHatching(false); } However,...
jolbol1 Try to use something like this: if(player.getLocation().getBlock().getRelative(BlockFace.DOWN).isLiquid()) { ... } Because you have to...
OlofGrandmaster Okay before going to sleep I wrote some code: private int parseDirection(double yaw, boolean reverse) { double absYaw = (yaw...
CaLxCyMru Checkout Inventory.setMaxStackSize(int size):...
OlofGrandmaster I would get the "player.getLocation().getYaw()" and divide that in multiple sections, 90 degrees each (or maybe with 45 degrees...
josh12341 Can you show us some more code and is there any error? Because basically the code should work
So... where is the error? Did you remember that you have to add a location for each player to the HashMap first?
xTrollxDudex Well, basically the difference between your solution and mine is, that with yours, the player is teleported even if he just moves...
danielh112 //Save the location you want the player to teleport to in the HashMap private HashMap<String, Location> loc = new HashMap<String,...
danielh112 Save the player's current location and use an PlayerMoveEvent to check if the player's new location is further than 1 block and if so,...
Yazan Check out this: https://forums.bukkit.org/threads/i-need-help-translating-color-codes.87035/...
Badeye Did you check your config? Your code in the respawn event looks correct but it seems that it can't get the value from the config and uses 0...
danielh112 Mark them as public, then you can access them from everywhere: public class Foo { public int foo = 0; } Then you can access it...
Badeye Download the latest CraftBukkit jar: http://dl.bukkit.org/downloads/craftbukkit/ Download the latest Bukkit jar:...
CraftBang Yes I would use the InventoryClickEvent, you can check whether the inventory is a chest with: if(event.getInventory().getHolder()...
MyNameIsHariK Not that easy, you can get the dropped items of a player on his death with the PlayerDeathEvent.getDrops() and then you can add...
benzimmer123 If you would show us the whole error and post your code with the syntax tags so that we can see the line numbers, it would be much...
castletaker11 Please show us your plugin.yml, because ClassNotFoundException sometimes means that your main class declaration in the plugin.yml is...
Separate names with a comma.