Stránka 1 z 1

Plugin dev

Napsal: 04 bře 2017, 21:01
od Unique_
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);
         }
    }

Re: Plugin dev

Napsal: 04 bře 2017, 21:11
od pitilon@seznam.cz
IP serveru?

Re: Plugin dev

Napsal: 04 bře 2017, 22:46
od NEZNAMY
if (b.getType() == Material.STAINED_CLAY && (b.getData() == 5 || (b.getData() == 9)) {