From a8b62623e860e2a79d770f67e9c5d147ab7d7cae Mon Sep 17 00:00:00 2001 From: Andreas Troelsen Date: Sun, 12 Mar 2017 21:42:57 +0100 Subject: [PATCH] Don't give pets and mounts to players who bring their own items. Bringing a full stack of bones will no longer result in a full pack of wolves. --- src/main/java/com/garbagemule/MobArena/ArenaImpl.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/garbagemule/MobArena/ArenaImpl.java b/src/main/java/com/garbagemule/MobArena/ArenaImpl.java index df8b63f..d3c067c 100644 --- a/src/main/java/com/garbagemule/MobArena/ArenaImpl.java +++ b/src/main/java/com/garbagemule/MobArena/ArenaImpl.java @@ -829,6 +829,10 @@ public class ArenaImpl implements Arena // Skip players who are either null or offline if (p == null || !p.isOnline()) continue; + // Skip the My Items class + ArenaClass ac = arenaPlayerMap.get(p).getArenaClass(); + if (ac == null || ac.getConfigName().equals("My Items")) continue; + // Grab the inventory PlayerInventory inv = p.getInventory(); if (inv == null) continue; @@ -861,6 +865,10 @@ public class ArenaImpl implements Arena // Skip players who are either null or offline if (p == null || !p.isOnline()) continue; + // Skip the My Items class + ArenaClass ac = arenaPlayerMap.get(p).getArenaClass(); + if (ac == null || ac.getConfigName().equals("My Items")) continue; + // Grab the inventory PlayerInventory inv = p.getInventory(); if (inv == null) continue;