@EventHandler
 public void onXP(PlayerExpChangeEvent e) {
   if (!Config.separateInv || !Config.separateXP) return;
   Player p = e.getPlayer();
   if (getWorldGroup(p.getWorld()) == null) return;
   saveInventory(p, p.getInventory());
 }
示例#2
0
 @EventHandler
 public void onExpChangeEvent(PlayerExpChangeEvent event) {
   if (um.isSpectator(event.getPlayer().getName())) event.setAmount(0);
 }
示例#3
0
 @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
 public void onExpChange(PlayerExpChangeEvent event) {
   if (plugin.noInteract(event.getPlayer())) {
     event.setAmount(0);
   }
 }