Пример #1
0
 @EventHandler
 public void onPlayerEatEvent(PlayerItemConsumeEvent event) {
   if ((isEnabled())
       && (UHCutils.getMainConfig().getBoolean("features.potionNerfs.disableAbsorb"))) {
     ItemStack localItemStack = event.getItem();
     if (localItemStack.getType().equals(Material.GOLDEN_APPLE)) {
       final String name = event.getPlayer().getName();
       Bukkit.getScheduler()
           .scheduleSyncDelayedTask(
               UHCutils.getUHCutils(),
               new Runnable() {
                 public void run() {
                   Player p = Bukkit.getPlayerExact(name);
                   p.removePotionEffect(PotionEffectType.ABSORPTION);
                 }
               });
     }
   }
 }
Пример #2
0
 public TeamCommands() {
   super(UHCutils.getUHCutils(), "join");
 }