@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()); }
@EventHandler public void onExpChangeEvent(PlayerExpChangeEvent event) { if (um.isSpectator(event.getPlayer().getName())) event.setAmount(0); }
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public void onExpChange(PlayerExpChangeEvent event) { if (plugin.noInteract(event.getPlayer())) { event.setAmount(0); } }