mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Code cleaning
Most notable change: Remove redundant type parameters and replaced with <>. This is a small step to bring us closer to upstream parity.
This commit is contained in:
@ -185,7 +185,7 @@ public class BiomeCommands extends MethodCommands {
|
||||
for (int i = 0; i < biomes.length; i++) {
|
||||
int count = biomes[i];
|
||||
if (count != 0) {
|
||||
distribution.add(new Countable<BaseBiome>(new BaseBiome(i), count));
|
||||
distribution.add(new Countable<>(new BaseBiome(i), count));
|
||||
}
|
||||
}
|
||||
Collections.sort(distribution);
|
||||
|
@ -51,14 +51,14 @@ public abstract class HelpBuilder implements Runnable {
|
||||
}
|
||||
|
||||
boolean isRootLevel = true;
|
||||
List<String> visited = new ArrayList<String>();
|
||||
List<String> visited = new ArrayList<>();
|
||||
|
||||
// Create the message
|
||||
if (callable instanceof Dispatcher) {
|
||||
Dispatcher dispatcher = (Dispatcher) callable;
|
||||
|
||||
// Get a list of aliases
|
||||
List<CommandMapping> aliases = new ArrayList<CommandMapping>(dispatcher.getCommands());
|
||||
List<CommandMapping> aliases = new ArrayList<>(dispatcher.getCommands());
|
||||
List<String> prefixes = Collections.nCopies(aliases.size(), "");
|
||||
// Group by callable
|
||||
|
||||
@ -174,7 +174,7 @@ public abstract class HelpBuilder implements Runnable {
|
||||
return;
|
||||
}
|
||||
dispatcher = (Dispatcher) callable;
|
||||
aliases = new ArrayList<CommandMapping>(dispatcher.getCommands());
|
||||
aliases = new ArrayList<>(dispatcher.getCommands());
|
||||
prefixes = Collections.nCopies(aliases.size(), "");
|
||||
} else {
|
||||
aliases = new ArrayList<>();
|
||||
|
@ -139,7 +139,7 @@ public class ScriptingCommands {
|
||||
|
||||
engine.setTimeLimit(worldEdit.getConfiguration().scriptTimeout);
|
||||
|
||||
Map<String, Object> vars = new HashMap<String, Object>();
|
||||
Map<String, Object> vars = new HashMap<>();
|
||||
vars.put("argv", args);
|
||||
vars.put("actor", actor);
|
||||
|
||||
|
@ -556,7 +556,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
CreatureButcher flags = new CreatureButcher(actor);
|
||||
flags.fromCommand(args);
|
||||
|
||||
List<EntityVisitor> visitors = new ArrayList<EntityVisitor>();
|
||||
List<EntityVisitor> visitors = new ArrayList<>();
|
||||
LocalSession session = null;
|
||||
EditSession editSession = null;
|
||||
|
||||
@ -616,7 +616,7 @@ public class UtilityCommands extends MethodCommands {
|
||||
EntityRemover remover = new EntityRemover();
|
||||
remover.fromString(typeStr);
|
||||
|
||||
List<EntityVisitor> visitors = new ArrayList<EntityVisitor>();
|
||||
List<EntityVisitor> visitors = new ArrayList<>();
|
||||
LocalSession session = null;
|
||||
EditSession editSession = null;
|
||||
|
||||
|
Reference in New Issue
Block a user