Plugin dev
Napsal: 04 bře 2017, 21:01
Môžem sa opítať niekoho kto ovláda javu, ako pridať další stained_clay ale na id 9 ked to pridam ako dalši event tak nejde ani jedno neviem dôvod
Kód: Vybrat vše
@SuppressWarnings("deprecation")
@EventHandler
public void onMove(PlayerMoveEvent e){
Location loc = e.getPlayer().getLocation().clone().subtract(0, 1, 0);
Block b = loc.getBlock();
if (b.getType() == Material.STAINED_CLAY && b.getData() == 5) {
e.getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 99999, 1, true), true);
} else {
e.getPlayer().removePotionEffect(PotionEffectType.INVISIBILITY);
}
}