@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());
 }
Example #2
0
 @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);
   }
 }
 @EventHandler(priority = EventPriority.HIGHEST)
 public void onPlayerExpChangeEvent(PlayerExpChangeEvent e) {
   if (e.getAmount() < 0) e.setAmount(0);
 }