diff --git a/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java b/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java index b934e44..6ab23fa 100644 --- a/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java +++ b/src/main/java/com/garbagemule/MobArena/ArenaMasterImpl.java @@ -182,7 +182,7 @@ public class ArenaMasterImpl implements ArenaMaster public List getAllPlayersInArena(String arenaName) { Arena arena = getArenaWithName(arenaName); - return (arena != null) ? new ArrayList<>(arena.getPlayersInArena()) : new ArrayList(); + return (arena != null) ? new ArrayList<>(arena.getPlayersInArena()) : new ArrayList<>(); } public List getAllLivingPlayers() { @@ -194,7 +194,7 @@ public class ArenaMasterImpl implements ArenaMaster public List getLivingPlayersInArena(String arenaName) { Arena arena = getArenaWithName(arenaName); - return (arena != null) ? new ArrayList<>(arena.getPlayersInArena()) : new ArrayList(); + return (arena != null) ? new ArrayList<>(arena.getPlayersInArena()) : new ArrayList<>(); } public Arena getArenaWithPlayer(Player p) { diff --git a/src/main/java/com/garbagemule/MobArena/ClassLimitManager.java b/src/main/java/com/garbagemule/MobArena/ClassLimitManager.java index ae32c54..a95e40f 100644 --- a/src/main/java/com/garbagemule/MobArena/ClassLimitManager.java +++ b/src/main/java/com/garbagemule/MobArena/ClassLimitManager.java @@ -45,7 +45,7 @@ public class ClassLimitManager private void initInUseMap() { // Initialize the in-use map with zeros. for (ArenaClass ac : classes.values()) { - classesInUse.put(ac, new HashSet()); + classesInUse.put(ac, new HashSet<>()); } } @@ -76,7 +76,7 @@ public class ClassLimitManager if (classLimits.get(ac) == null) { limits.set(ac.getConfigName(), -1); classLimits.put(ac, new MutableInt(-1)); - classesInUse.put(ac, new HashSet()); + classesInUse.put(ac, new HashSet<>()); } if (classLimits.get(ac).value() <= -1) diff --git a/src/main/java/com/garbagemule/MobArena/MASpawnThread.java b/src/main/java/com/garbagemule/MobArena/MASpawnThread.java index aee1c52..ea779a8 100644 --- a/src/main/java/com/garbagemule/MobArena/MASpawnThread.java +++ b/src/main/java/com/garbagemule/MobArena/MASpawnThread.java @@ -326,7 +326,7 @@ public class MASpawnThread implements Runnable } private void removeDeadMonsters() { - List tmp = new ArrayList(monsterManager.getMonsters()); + List tmp = new ArrayList<>(monsterManager.getMonsters()); for (Entity e : tmp) { if (e == null) { continue; diff --git a/src/main/java/com/garbagemule/MobArena/RewardManager.java b/src/main/java/com/garbagemule/MobArena/RewardManager.java index 291ba8f..699649b 100644 --- a/src/main/java/com/garbagemule/MobArena/RewardManager.java +++ b/src/main/java/com/garbagemule/MobArena/RewardManager.java @@ -35,14 +35,14 @@ public class RewardManager public void addReward(Player p, Thing thing) { if (!players.containsKey(p)) { - players.put(p, new ArrayList()); + players.put(p, new ArrayList<>()); } players.get(p).add(thing); } public List getRewards(Player p) { List rewards = players.get(p); - return (rewards == null ? new ArrayList(1) : Collections.unmodifiableList(rewards)); + return (rewards == null ? new ArrayList<>(1) : Collections.unmodifiableList(rewards)); } public void grantRewards(Player p) { diff --git a/src/main/java/com/garbagemule/MobArena/waves/ability/core/ChainLightning.java b/src/main/java/com/garbagemule/MobArena/waves/ability/core/ChainLightning.java index 32dbd3a..453e3a4 100644 --- a/src/main/java/com/garbagemule/MobArena/waves/ability/core/ChainLightning.java +++ b/src/main/java/com/garbagemule/MobArena/waves/ability/core/ChainLightning.java @@ -35,7 +35,7 @@ public class ChainLightning implements Ability if (target == null || !(target instanceof Player)) return; - strikeLightning(arena, (Player) target, new ArrayList()); + strikeLightning(arena, (Player) target, new ArrayList<>()); } private void strikeLightning(final Arena arena, final Player p, final List done) { diff --git a/src/main/java/com/garbagemule/MobArena/waves/ability/core/ShufflePositions.java b/src/main/java/com/garbagemule/MobArena/waves/ability/core/ShufflePositions.java index 3637503..2f973f6 100644 --- a/src/main/java/com/garbagemule/MobArena/waves/ability/core/ShufflePositions.java +++ b/src/main/java/com/garbagemule/MobArena/waves/ability/core/ShufflePositions.java @@ -21,7 +21,7 @@ public class ShufflePositions implements Ability @Override public void execute(Arena arena, MABoss boss) { // Grab the players and add the boss - List entities = new ArrayList(arena.getPlayersInArena()); + List entities = new ArrayList<>(arena.getPlayersInArena()); entities.add(boss.getEntity()); // Grab the locations