IntelliJ Inspection Based Cleanup
This commit is contained in:
@@ -12,6 +12,5 @@ public enum DisallowCause
|
||||
OWN_TERRITORY
|
||||
|
||||
// END OF LIST
|
||||
;
|
||||
|
||||
}
|
||||
|
@@ -118,7 +118,7 @@ public class EngineEcon extends Engine
|
||||
public void payForAction(EventFactionsChunksChange event)
|
||||
{
|
||||
double cost = 0;
|
||||
List<String> typeNames = new ArrayList<String>();
|
||||
List<String> typeNames = new ArrayList<>();
|
||||
|
||||
for (Entry<EventFactionsChunkChangeType, Set<PS>> typeChunks : event.getTypeChunks().entrySet())
|
||||
{
|
||||
|
@@ -114,7 +114,7 @@ public class EngineExploit extends Engine
|
||||
if (!center.isLiquid()) return;
|
||||
|
||||
// a single surrounding block in all 6 directions is broken if the material is weak enough
|
||||
List<Block> targets = new ArrayList<Block>();
|
||||
List<Block> targets = new ArrayList<>();
|
||||
targets.add(center.getRelative(0, 0, 1));
|
||||
targets.add(center.getRelative(0, 0, -1));
|
||||
targets.add(center.getRelative(0, 1, 0));
|
||||
@@ -141,7 +141,7 @@ public class EngineExploit extends Engine
|
||||
private static final int NETHER_TRAP_RADIUS_CHECK = 5;
|
||||
private static final int NETHER_TRAP_RESET_RADIUS_SQUARED = 9;
|
||||
|
||||
private HashMap<UUID, List<Block>> portalTraps = new HashMap<UUID, List<Block>>();
|
||||
private HashMap<UUID, List<Block>> portalTraps = new HashMap<>();
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void portalTrapRemoveAnimation(PlayerTeleportEvent event)
|
||||
|
@@ -79,7 +79,7 @@ public class EngineFlagExplosion extends Engine
|
||||
// Current allowed
|
||||
Boolean allowed = true;
|
||||
// Caching to speed things up.
|
||||
Map<Faction, Boolean> faction2allowed = new HashMap<Faction, Boolean>();
|
||||
Map<Faction, Boolean> faction2allowed = new HashMap<>();
|
||||
|
||||
// If an explosion occurs at a location ...
|
||||
Location location = event.getLocation();
|
||||
|
@@ -112,7 +112,7 @@ public class EngineSeeChunk extends Engine
|
||||
if (step >= steps) throw new InvalidParameterException("step must be less than steps");
|
||||
|
||||
// Create Ret
|
||||
List<Location> ret = new ArrayList<Location>();
|
||||
List<Location> ret = new ArrayList<>();
|
||||
|
||||
final Location location = player.getLocation();
|
||||
final World world = location.getWorld();
|
||||
|
@@ -72,7 +72,7 @@ public class EngineShow extends Engine
|
||||
|
||||
// FLAGS
|
||||
// We display all editable and non default ones. The rest we skip.
|
||||
List<String> flagDescs = new LinkedList<String>();
|
||||
List<String> flagDescs = new LinkedList<>();
|
||||
for (Entry<MFlag, Boolean> entry : faction.getFlags().entrySet())
|
||||
{
|
||||
final MFlag mflag = entry.getKey();
|
||||
@@ -103,7 +103,7 @@ public class EngineShow extends Engine
|
||||
if (Econ.isEnabled())
|
||||
{
|
||||
// LANDVALUES
|
||||
List<String> landvalueLines = new LinkedList<String>();
|
||||
List<String> landvalueLines = new LinkedList<>();
|
||||
long landCount = faction.getLandCount();
|
||||
for (EventFactionsChunkChangeType type : EventFactionsChunkChangeType.values())
|
||||
{
|
||||
@@ -137,10 +137,10 @@ public class EngineShow extends Engine
|
||||
}
|
||||
|
||||
// FOLLOWERS
|
||||
List<String> followerLines = new ArrayList<String>();
|
||||
List<String> followerLines = new ArrayList<>();
|
||||
|
||||
List<String> followerNamesOnline = new ArrayList<String>();
|
||||
List<String> followerNamesOffline = new ArrayList<String>();
|
||||
List<String> followerNamesOnline = new ArrayList<>();
|
||||
List<String> followerNamesOffline = new ArrayList<>();
|
||||
|
||||
List<MPlayer> followers = faction.getMPlayers();
|
||||
Collections.sort(followers, PlayerRoleComparator.get());
|
||||
@@ -201,7 +201,7 @@ public class EngineShow extends Engine
|
||||
|
||||
public static List<String> table(List<String> strings, int cols)
|
||||
{
|
||||
List<String> ret = new ArrayList<String>();
|
||||
List<String> ret = new ArrayList<>();
|
||||
|
||||
StringBuilder row = new StringBuilder();
|
||||
int count = 0;
|
||||
|
Reference in New Issue
Block a user