ShadowKALler7
Member
hey guys(again) im making a plugin which tests the block under the player and then sets it to air, I have a problem with it
this works:
@EventHandler
public void onunder(PlayerMoveEvent e){
Player p = e.getPlayer();
Block under = p.getLevelBlock().subtract(0, 1, 0).getLevelBlock();
p.sendMessage("You are standing on a " + under + " block ")
}
this works but I cant do something like this
@EventHandler
public void onEF(PlayerMoveEvent e){
Player p = e.getPlayer();
if (p.getLevelBlock().subtract(0, 1, 0).getLevelBlock().equals(Block.STONE)){
p.sendMessage("i-dv99ureu0efn0urfh84fuergfjrhgufhuu9fhrrgy3fergju4tygj45uygoh5guf7r")
}
}
this doesnt work
}
this works:
@EventHandler
public void onunder(PlayerMoveEvent e){
Player p = e.getPlayer();
Block under = p.getLevelBlock().subtract(0, 1, 0).getLevelBlock();
p.sendMessage("You are standing on a " + under + " block ")
}
this works but I cant do something like this
@EventHandler
public void onEF(PlayerMoveEvent e){
Player p = e.getPlayer();
if (p.getLevelBlock().subtract(0, 1, 0).getLevelBlock().equals(Block.STONE)){
p.sendMessage("i-dv99ureu0efn0urfh84fuergfjrhgufhuu9fhrrgy3fergju4tygj45uygoh5guf7r")
}
}
this doesnt work
}