data = new HashMap<>();
data.put("world", this.world.getName());
data.put("x", this.x);
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Material.java b/TacoSpigot-API/src/main/java/org/bukkit/Material.java
index 0fb2605..80529dc 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/Material.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/Material.java
@@ -491,9 +491,7 @@ public enum Material {
// try to cache the constructor for this material
try {
this.ctor = data.getConstructor(int.class, byte.class);
- } catch (NoSuchMethodException ex) {
- throw new AssertionError(ex);
- } catch (SecurityException ex) {
+ } catch (NoSuchMethodException | SecurityException ex) {
throw new AssertionError(ex);
}
}
@@ -659,7 +657,7 @@ public enum Material {
try {
result = getMaterial(Integer.parseInt(name));
- } catch (NumberFormatException ex) {}
+ } catch (NumberFormatException ignored) {}
if (result == null) {
String filtered = name.toUpperCase();
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java b/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java
index f43209c..5362cf3 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java
@@ -17,5 +17,5 @@ public enum NetherWartsState {
/**
* Ready to harvest
*/
- RIPE;
+ RIPE
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java b/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java
index e98706a..68a78e7 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java
@@ -15,7 +15,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
*
* @return true if they are online
*/
- public boolean isOnline();
+ boolean isOnline();
/**
* Returns the name of this player
@@ -25,21 +25,21 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
*
* @return Player name or null if we have not seen a name for this player yet
*/
- public String getName();
+ String getName();
/**
* Returns the UUID of this player
*
* @return Player UUID
*/
- public UUID getUniqueId();
+ UUID getUniqueId();
/**
* Checks if this player is banned or not
*
* @return true if banned, otherwise false
*/
- public boolean isBanned();
+ boolean isBanned();
/**
* Bans or unbans this player
@@ -50,21 +50,21 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* functionality
*/
@Deprecated
- public void setBanned(boolean banned);
+ void setBanned(boolean banned);
/**
* Checks if this player is whitelisted or not
*
* @return true if whitelisted
*/
- public boolean isWhitelisted();
+ boolean isWhitelisted();
/**
* Sets if this player is whitelisted or not
*
* @param value true if whitelisted
*/
- public void setWhitelisted(boolean value);
+ void setWhitelisted(boolean value);
/**
* Gets a {@link Player} object that this represents, if there is one
@@ -74,7 +74,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
*
* @return Online player
*/
- public Player getPlayer();
+ Player getPlayer();
/**
* Gets the first date and time that this player was witnessed on this
@@ -86,7 +86,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
*
* @return Date of first log-in for this player, or 0
*/
- public long getFirstPlayed();
+ long getFirstPlayed();
/**
* Gets the last date and time that this player was witnessed on this
@@ -98,14 +98,14 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
*
* @return Date of last log-in for this player, or 0
*/
- public long getLastPlayed();
+ long getLastPlayed();
/**
* Checks if this player has played on this server before.
*
* @return True if the player has played before, otherwise false
*/
- public boolean hasPlayedBefore();
+ boolean hasPlayedBefore();
/**
* Gets the Location where the player will spawn at their bed, null if
@@ -113,6 +113,6 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
*
* @return Bed Spawn Location if bed exists, otherwise null.
*/
- public Location getBedSpawnLocation();
+ Location getBedSpawnLocation();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java b/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java
index 427cfbb..7e4627d 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java
@@ -18,5 +18,5 @@ public enum PortalType {
/**
* This is a custom Plugin portal.
*/
- CUSTOM;
+ CUSTOM
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Server.java b/TacoSpigot-API/src/main/java/org/bukkit/Server.java
index 29b3d88..4ecf2a5 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/Server.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/Server.java
@@ -55,7 +55,7 @@ public interface Server extends PluginMessageRecipient {
*
* For use in {@link #broadcast(java.lang.String, java.lang.String)}.
*/
- public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";
+ String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin";
/**
* Used for all announcement messages, such as informing users that a
@@ -63,28 +63,28 @@ public interface Server extends PluginMessageRecipient {
*
* For use in {@link #broadcast(java.lang.String, java.lang.String)}.
*/
- public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
+ String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user";
/**
* Gets the name of this server implementation.
*
* @return name of this server implementation
*/
- public String getName();
+ String getName();
/**
* Gets the version string of this server implementation.
*
* @return version of this server implementation
*/
- public String getVersion();
+ String getVersion();
/**
* Gets the Bukkit version that this server is running.
*
* @return version of Bukkit
*/
- public String getBukkitVersion();
+ String getBukkitVersion();
/**
* Gets an array copy of all currently logged in players.
@@ -97,7 +97,7 @@ public interface Server extends PluginMessageRecipient {
* @return an array of Players that are currently online
*/
@Deprecated
- public Player[] _INVALID_getOnlinePlayers();
+ Player[] _INVALID_getOnlinePlayers();
/**
* Gets a view of all currently logged in players. This {@linkplain
@@ -126,28 +126,28 @@ public interface Server extends PluginMessageRecipient {
*
* @return a view of currently online players.
*/
- public Collection extends Player> getOnlinePlayers();
+ Collection extends Player> getOnlinePlayers();
/**
* Get the maximum amount of players which can login to this server.
*
* @return the amount of players this server allows
*/
- public int getMaxPlayers();
+ int getMaxPlayers();
/**
* Get the game port that the server runs on.
*
* @return the port number of this server
*/
- public int getPort();
+ int getPort();
/**
* Get the view distance from this server.
*
* @return the view distance from this server.
*/
- public int getViewDistance();
+ int getViewDistance();
/**
* Get the IP that this server is bound to, or empty string if not
@@ -156,14 +156,14 @@ public interface Server extends PluginMessageRecipient {
* @return the IP string that this server is bound to, otherwise empty
* string
*/
- public String getIp();
+ String getIp();
/**
* Get the name of this server.
*
* @return the name of this server
*/
- public String getServerName();
+ String getServerName();
/**
* Get an ID of this server. The ID is a simple generally alphanumeric ID
@@ -171,61 +171,61 @@ public interface Server extends PluginMessageRecipient {
*
* @return the ID of this server
*/
- public String getServerId();
+ String getServerId();
/**
* Get world type (level-type setting) for default world.
*
* @return the value of level-type (e.g. DEFAULT, FLAT, DEFAULT_1_1)
*/
- public String getWorldType();
+ String getWorldType();
/**
* Get generate-structures setting.
*
* @return true if structure generation is enabled, false otherwise
*/
- public boolean getGenerateStructures();
+ boolean getGenerateStructures();
/**
* Gets whether this server allows the End or not.
*
* @return whether this server allows the End or not
*/
- public boolean getAllowEnd();
+ boolean getAllowEnd();
/**
* Gets whether this server allows the Nether or not.
*
* @return whether this server allows the Nether or not
*/
- public boolean getAllowNether();
+ boolean getAllowNether();
/**
* Gets whether this server has a whitelist or not.
*
* @return whether this server has a whitelist or not
*/
- public boolean hasWhitelist();
+ boolean hasWhitelist();
/**
* Sets if the server is whitelisted.
*
* @param value true for whitelist on, false for off
*/
- public void setWhitelist(boolean value);
+ void setWhitelist(boolean value);
/**
* Gets a list of whitelisted players.
*
* @return a set containing all whitelisted players
*/
- public Set getWhitelistedPlayers();
+ Set getWhitelistedPlayers();
/**
* Reloads the whitelist from disk.
*/
- public void reloadWhitelist();
+ void reloadWhitelist();
/**
* Broadcast a message to all players.
@@ -236,7 +236,7 @@ public interface Server extends PluginMessageRecipient {
* @param message the message
* @return the number of players
*/
- public int broadcastMessage(String message);
+ int broadcastMessage(String message);
// Paper start
/**
@@ -244,14 +244,14 @@ public interface Server extends PluginMessageRecipient {
*
* @param component the components to send
*/
- public void broadcast(net.md_5.bungee.api.chat.BaseComponent component);
+ void broadcast(net.md_5.bungee.api.chat.BaseComponent component);
/**
* Sends an array of components as a single message to the player
*
* @param components the components to send
*/
- public void broadcast(net.md_5.bungee.api.chat.BaseComponent... components);
+ void broadcast(net.md_5.bungee.api.chat.BaseComponent... components);
// Paper end
/**
@@ -262,7 +262,7 @@ public interface Server extends PluginMessageRecipient {
*
* @return the name of the update folder
*/
- public String getUpdateFolder();
+ String getUpdateFolder();
/**
* Gets the update folder. The update folder is used to safely update
@@ -270,14 +270,14 @@ public interface Server extends PluginMessageRecipient {
*
* @return the update folder
*/
- public File getUpdateFolderFile();
+ File getUpdateFolderFile();
/**
* Gets the value of the connection throttle setting.
*
* @return the value of the connection throttle setting
*/
- public long getConnectionThrottle();
+ long getConnectionThrottle();
/**
* Gets default ticks per animal spawns value.
@@ -298,7 +298,7 @@ public interface Server extends PluginMessageRecipient {
*
* @return the default ticks per animal spawns value
*/
- public int getTicksPerAnimalSpawns();
+ int getTicksPerAnimalSpawns();
/**
* Gets the default ticks per monster spawns value.
@@ -319,7 +319,7 @@ public interface Server extends PluginMessageRecipient {
*
* @return the default ticks per monsters spawn value
*/
- public int getTicksPerMonsterSpawns();
+ int getTicksPerMonsterSpawns();
/**
* Gets a player object by the given username.
@@ -329,7 +329,7 @@ public interface Server extends PluginMessageRecipient {
* @param name the name to look up
* @return a player if one was found, null otherwise
*/
- public Player getPlayer(String name);
+ Player getPlayer(String name);
/**
* Gets the player with the exact given name, case insensitive.
@@ -337,7 +337,7 @@ public interface Server extends PluginMessageRecipient {
* @param name Exact name of the player to retrieve
* @return a player object if one was found, null otherwise
*/
- public Player getPlayerExact(String name);
+ Player getPlayerExact(String name);
/**
* Attempts to match any players with the given name, and returns a list
@@ -349,7 +349,7 @@ public interface Server extends PluginMessageRecipient {
* @param name the (partial) name to match
* @return list of all possible players
*/
- public List matchPlayer(String name);
+ List matchPlayer(String name);
/**
* Gets the player with the given UUID.
@@ -357,35 +357,35 @@ public interface Server extends PluginMessageRecipient {
* @param id UUID of the player to retrieve
* @return a player object if one was found, null otherwise
*/
- public Player getPlayer(UUID id);
+ Player getPlayer(UUID id);
/**
* Gets the plugin manager for interfacing with plugins.
*
* @return a plugin manager for this Server instance
*/
- public PluginManager getPluginManager();
+ PluginManager getPluginManager();
/**
* Gets the scheduler for managing scheduled events.
*
* @return a scheduling service for this server
*/
- public BukkitScheduler getScheduler();
+ BukkitScheduler getScheduler();
/**
* Gets a services manager.
*
* @return s services manager
*/
- public ServicesManager getServicesManager();
+ ServicesManager getServicesManager();
/**
* Gets a list of all worlds on this server.
*
* @return a list of worlds
*/
- public List getWorlds();
+ List getWorlds();
/**
* Creates or loads a world with the given name using the specified
@@ -397,7 +397,7 @@ public interface Server extends PluginMessageRecipient {
* @param creator the options to use when creating the world
* @return newly created or loaded world
*/
- public World createWorld(WorldCreator creator);
+ World createWorld(WorldCreator creator);
/**
* Unloads a world with the given name.
@@ -406,7 +406,7 @@ public interface Server extends PluginMessageRecipient {
* @param save whether to save the chunks before unloading
* @return true if successful, false otherwise
*/
- public boolean unloadWorld(String name, boolean save);
+ boolean unloadWorld(String name, boolean save);
/**
* Unloads the given world.
@@ -415,7 +415,7 @@ public interface Server extends PluginMessageRecipient {
* @param save whether to save the chunks before unloading
* @return true if successful, false otherwise
*/
- public boolean unloadWorld(World world, boolean save);
+ boolean unloadWorld(World world, boolean save);
/**
* Gets the world with the given name.
@@ -423,7 +423,7 @@ public interface Server extends PluginMessageRecipient {
* @param name the name of the world to retrieve
* @return a world with the given name, or null if none exists
*/
- public World getWorld(String name);
+ World getWorld(String name);
/**
* Gets the world from the given Unique ID.
@@ -431,7 +431,7 @@ public interface Server extends PluginMessageRecipient {
* @param uid a unique-id of the world to retrieve
* @return a world with the given Unique ID, or null if none exists
*/
- public World getWorld(UUID uid);
+ World getWorld(UUID uid);
/**
* Gets the map from the given item ID.
@@ -441,7 +441,7 @@ public interface Server extends PluginMessageRecipient {
* @deprecated Magic value
*/
@Deprecated
- public MapView getMap(short id);
+ MapView getMap(short id);
/**
* Create a new map with an automatically assigned ID.
@@ -449,19 +449,19 @@ public interface Server extends PluginMessageRecipient {
* @param world the world the map will belong to
* @return a newly created map view
*/
- public MapView createMap(World world);
+ MapView createMap(World world);
/**
* Reloads the server, refreshing settings and plugin information.
*/
- public void reload();
+ void reload();
/**
* Returns the primary logger associated with this server instance.
*
* @return Logger associated with this server
*/
- public Logger getLogger();
+ Logger getLogger();
/**
* Gets a {@link PluginCommand} with the given name or alias.
@@ -469,12 +469,12 @@ public interface Server extends PluginMessageRecipient {
* @param name the name of the command to retrieve
* @return a plugin command if found, null otherwise
*/
- public PluginCommand getPluginCommand(String name);
+ PluginCommand getPluginCommand(String name);
/**
* Writes loaded players to disk.
*/
- public void savePlayers();
+ void savePlayers();
/**
* Dispatches a command on this server, and executes it if found.
@@ -486,7 +486,7 @@ public interface Server extends PluginMessageRecipient {
* @throws CommandException thrown when the executor for the given command
* fails with an unhandled exception
*/
- public boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException;
+ boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException;
/**
* Populates a given {@link ServerConfig} with values attributes to this
@@ -494,7 +494,7 @@ public interface Server extends PluginMessageRecipient {
*
* @param config the server config to populate
*/
- public void configureDbConfig(ServerConfig config);
+ void configureDbConfig(ServerConfig config);
/**
* Adds a recipe to the crafting manager.
@@ -503,7 +503,7 @@ public interface Server extends PluginMessageRecipient {
* @return true if the recipe was added, false if it wasn't for some
* reason
*/
- public boolean addRecipe(Recipe recipe);
+ boolean addRecipe(Recipe recipe);
/**
* Get a list of all recipes for a given item. The stack size is ignored
@@ -512,66 +512,66 @@ public interface Server extends PluginMessageRecipient {
* @param result the item to match against recipe results
* @return a list of recipes with the given result
*/
- public List getRecipesFor(ItemStack result);
+ List getRecipesFor(ItemStack result);
/**
* Get an iterator through the list of crafting recipes.
*
* @return an iterator
*/
- public Iterator recipeIterator();
+ Iterator recipeIterator();
/**
* Clears the list of crafting recipes.
*/
- public void clearRecipes();
+ void clearRecipes();
/**
* Resets the list of crafting recipes to the default.
*/
- public void resetRecipes();
+ void resetRecipes();
/**
* Gets a list of command aliases defined in the server properties.
*
* @return a map of aliases to command names
*/
- public Map getCommandAliases();
+ Map getCommandAliases();
/**
* Gets the radius, in blocks, around each worlds spawn point to protect.
*
* @return spawn radius, or 0 if none
*/
- public int getSpawnRadius();
+ int getSpawnRadius();
/**
* Sets the radius, in blocks, around each worlds spawn point to protect.
*
* @param value new spawn radius, or 0 if none
*/
- public void setSpawnRadius(int value);
+ void setSpawnRadius(int value);
/**
* Gets whether the Server is in online mode or not.
*
* @return true if the server authenticates clients, false otherwise
*/
- public boolean getOnlineMode();
+ boolean getOnlineMode();
/**
* Gets whether this server allows flying or not.
*
* @return true if the server allows flight, false otherwise
*/
- public boolean getAllowFlight();
+ boolean getAllowFlight();
/**
* Gets whether the server is in hardcore mode or not.
*
* @return true if the server mode is hardcore, false otherwise
*/
- public boolean isHardcore();
+ boolean isHardcore();
/**
* Gets whether to use vanilla (false) or exact behaviour (true).
@@ -588,12 +588,12 @@ public interface Server extends PluginMessageRecipient {
* @deprecated non standard and unused feature.
*/
@Deprecated
- public boolean useExactLoginLocation();
+ boolean useExactLoginLocation();
/**
* Shutdowns the server, stopping everything.
*/
- public void shutdown();
+ void shutdown();
/**
* Broadcasts the specified message to every user with the given
@@ -604,7 +604,7 @@ public interface Server extends PluginMessageRecipient {
* permissibles} must have to receive the broadcast
* @return number of message recipients
*/
- public int broadcast(String message, String permission);
+ int broadcast(String message, String permission);
/**
* Gets the player by the given name, regardless if they are offline or
@@ -623,7 +623,7 @@ public interface Server extends PluginMessageRecipient {
* @see #getOfflinePlayer(java.util.UUID)
*/
@Deprecated
- public OfflinePlayer getOfflinePlayer(String name);
+ OfflinePlayer getOfflinePlayer(String name);
/**
* Gets the player by the given UUID, regardless if they are offline or
@@ -635,35 +635,35 @@ public interface Server extends PluginMessageRecipient {
* @param id the UUID of the player to retrieve
* @return an offline player
*/
- public OfflinePlayer getOfflinePlayer(UUID id);
+ OfflinePlayer getOfflinePlayer(UUID id);
/**
* Gets a set containing all current IPs that are banned.
*
* @return a set containing banned IP addresses
*/
- public Set getIPBans();
+ Set getIPBans();
/**
* Bans the specified address from the server.
*
* @param address the IP address to ban
*/
- public void banIP(String address);
+ void banIP(String address);
/**
* Unbans the specified address from the server.
*
* @param address the IP address to unban
*/
- public void unbanIP(String address);
+ void unbanIP(String address);
/**
* Gets a set containing all banned players.
*
* @return a set containing banned players
*/
- public Set getBannedPlayers();
+ Set getBannedPlayers();
/**
* Gets a ban list for the supplied type.
@@ -674,28 +674,28 @@ public interface Server extends PluginMessageRecipient {
* @param type the type of list to fetch, cannot be null
* @return a ban list of the specified type
*/
- public BanList getBanList(BanList.Type type);
+ BanList getBanList(BanList.Type type);
/**
* Gets a set containing all player operators.
*
* @return a set containing player operators
*/
- public Set getOperators();
+ Set getOperators();
/**
* Gets the default {@link GameMode} for new players.
*
* @return the default game mode
*/
- public GameMode getDefaultGameMode();
+ GameMode getDefaultGameMode();
/**
* Sets the default {@link GameMode} for new players.
*
* @param mode the new game mode
*/
- public void setDefaultGameMode(GameMode mode);
+ void setDefaultGameMode(GameMode mode);
/**
* Gets a {@link ConsoleCommandSender} that may be used as an input source
@@ -703,35 +703,35 @@ public interface Server extends PluginMessageRecipient {
*
* @return a console command sender
*/
- public ConsoleCommandSender getConsoleSender();
+ ConsoleCommandSender getConsoleSender();
/**
* Gets the folder that contains all of the various {@link World}s.
*
* @return folder that contains all worlds
*/
- public File getWorldContainer();
+ File getWorldContainer();
/**
* Gets every player that has ever played on this server.
*
* @return an array containing all previous players
*/
- public OfflinePlayer[] getOfflinePlayers();
+ OfflinePlayer[] getOfflinePlayers();
/**
* Gets the {@link Messenger} responsible for this server.
*
* @return messenger responsible for this server
*/
- public Messenger getMessenger();
+ Messenger getMessenger();
/**
* Gets the {@link HelpMap} providing help topics for this server.
*
* @return a help map for this server
*/
- public HelpMap getHelpMap();
+ HelpMap getHelpMap();
/**
* Creates an empty inventory of the specified type. If the type is {@link
@@ -847,7 +847,7 @@ public interface Server extends PluginMessageRecipient {
*
* @return the configured warning state
*/
- public WarningState getWarningState();
+ WarningState getWarningState();
/**
* Gets the instance of the item factory (for {@link ItemMeta}).
@@ -914,14 +914,14 @@ public interface Server extends PluginMessageRecipient {
*
* @param threshold the idle timeout in minutes
*/
- public void setIdleTimeout(int threshold);
+ void setIdleTimeout(int threshold);
/**
* Gets the idle kick timeout.
*
* @return the idle timeout in minutes
*/
- public int getIdleTimeout();
+ int getIdleTimeout();
/**
* Create a ChunkData for use in a generator.
@@ -932,7 +932,7 @@ public interface Server extends PluginMessageRecipient {
* @return a new ChunkData for the world
*
*/
- public ChunkGenerator.ChunkData createChunkData(World world);
+ ChunkGenerator.ChunkData createChunkData(World world);
/**
* @see UnsafeValues
@@ -950,7 +950,7 @@ public interface Server extends PluginMessageRecipient {
CommandMap getCommandMap();
// Paper end
- public class Spigot
+ class Spigot
{
@Deprecated
public org.bukkit.configuration.file.YamlConfiguration getConfig()
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java b/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java
index abd07c2..5854ad4 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java
@@ -8,5 +8,5 @@ public enum SkullType {
WITHER,
ZOMBIE,
PLAYER,
- CREEPER;
+ CREEPER
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java b/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java
index 3764f1f..227da5e 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java
@@ -128,6 +128,6 @@ public enum Statistic {
/**
* Statistics of this type require an EntityType qualifier.
*/
- ENTITY;
+ ENTITY
}
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java b/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java
index 2dfeffa..facd829 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java
@@ -17,14 +17,14 @@ public interface TravelAgent {
* location
* @return this travel agent
*/
- public TravelAgent setSearchRadius(int radius);
+ TravelAgent setSearchRadius(int radius);
/**
* Gets the search radius value for finding an available portal.
*
* @return the currently set search radius
*/
- public int getSearchRadius();
+ int getSearchRadius();
/**
* Sets the maximum radius from the given location to create a portal.
@@ -32,14 +32,14 @@ public interface TravelAgent {
* @param radius the radius in which to create a portal from the location
* @return this travel agent
*/
- public TravelAgent setCreationRadius(int radius);
+ TravelAgent setCreationRadius(int radius);
/**
* Gets the maximum radius from the given location to create a portal.
*
* @return the currently set creation radius
*/
- public int getCreationRadius();
+ int getCreationRadius();
/**
* Returns whether the TravelAgent will attempt to create a destination
@@ -48,7 +48,7 @@ public interface TravelAgent {
* @return whether the TravelAgent should create a destination portal or
* not
*/
- public boolean getCanCreatePortal();
+ boolean getCanCreatePortal();
/**
* Sets whether the TravelAgent should attempt to create a destination
@@ -57,7 +57,7 @@ public interface TravelAgent {
* @param create Sets whether the TravelAgent should create a destination
* portal or not
*/
- public void setCanCreatePortal(boolean create);
+ void setCanCreatePortal(boolean create);
/**
* Attempt to find a portal near the given location, if a portal is not
@@ -68,7 +68,7 @@ public interface TravelAgent {
* location passed to the method if unsuccessful
* @see #createPortal(Location)
*/
- public Location findOrCreate(Location location);
+ Location findOrCreate(Location location);
/**
* Attempt to find a portal near the given location.
@@ -76,7 +76,7 @@ public interface TravelAgent {
* @param location the desired location of the portal
* @return the location of the nearest portal to the location
*/
- public Location findPortal(Location location);
+ Location findPortal(Location location);
/**
* Attempt to create a portal near the given location.
@@ -90,5 +90,5 @@ public interface TravelAgent {
* @param location the desired location of the portal
* @return true if a portal was successfully created
*/
- public boolean createPortal(Location location);
+ boolean createPortal(Location location);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Warning.java b/TacoSpigot-API/src/main/java/org/bukkit/Warning.java
index 6a2a3b0..dffde9e 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/Warning.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/Warning.java
@@ -21,7 +21,7 @@ public @interface Warning {
/**
* This represents the states that server verbose for warnings may be.
*/
- public enum WarningState {
+ enum WarningState {
/**
* Indicates all warnings should be printed for deprecated items.
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java b/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java
index 36b993f..3c96c67 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java
@@ -13,5 +13,4 @@ public enum WeatherType {
* Clear weather, clouds but no rain.
*/
CLEAR,
- ;
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/World.java b/TacoSpigot-API/src/main/java/org/bukkit/World.java
index a12daa1..ef5f8b4 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/World.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/World.java
@@ -32,7 +32,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @see #getBlockTypeIdAt(int, int, int) Returns the current type ID of
* the block
*/
- public Block getBlockAt(int x, int y, int z);
+ Block getBlockAt(int x, int y, int z);
/**
* Gets the {@link Block} at the given {@link Location}
@@ -42,7 +42,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @see #getBlockTypeIdAt(org.bukkit.Location) Returns the current type ID
* of the block
*/
- public Block getBlockAt(Location location);
+ Block getBlockAt(Location location);
/**
* Gets the block type ID at the given coordinates
@@ -56,7 +56,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @deprecated Magic value
*/
@Deprecated
- public int getBlockTypeIdAt(int x, int y, int z);
+ int getBlockTypeIdAt(int x, int y, int z);
/**
* Gets the block type ID at the given {@link Location}
@@ -68,7 +68,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @deprecated Magic value
*/
@Deprecated
- public int getBlockTypeIdAt(Location location);
+ int getBlockTypeIdAt(Location location);
/**
* Gets the highest non-air coordinate at the given coordinates
@@ -77,7 +77,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the blocks
* @return Y-coordinate of the highest non-air block
*/
- public int getHighestBlockYAt(int x, int z);
+ int getHighestBlockYAt(int x, int z);
/**
* Gets the highest non-air coordinate at the given {@link Location}
@@ -85,7 +85,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param location Location of the blocks
* @return Y-coordinate of the highest non-air block
*/
- public int getHighestBlockYAt(Location location);
+ int getHighestBlockYAt(Location location);
/**
* Gets the highest non-empty block at the given coordinates
@@ -94,7 +94,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the block
* @return Highest non-empty block
*/
- public Block getHighestBlockAt(int x, int z);
+ Block getHighestBlockAt(int x, int z);
/**
* Gets the highest non-empty block at the given coordinates
@@ -102,7 +102,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param location Coordinates to get the highest block
* @return Highest non-empty block
*/
- public Block getHighestBlockAt(Location location);
+ Block getHighestBlockAt(Location location);
/**
* Gets the {@link Chunk} at the given coordinates
@@ -111,7 +111,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the chunk
* @return Chunk at the given coordinates
*/
- public Chunk getChunkAt(int x, int z);
+ Chunk getChunkAt(int x, int z);
/**
* Gets the {@link Chunk} at the given {@link Location}
@@ -119,7 +119,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param location Location of the chunk
* @return Chunk at the given location
*/
- public Chunk getChunkAt(Location location);
+ Chunk getChunkAt(Location location);
/**
* Gets the {@link Chunk} that contains the given {@link Block}
@@ -127,15 +127,15 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param block Block to get the containing chunk from
* @return The chunk that contains the given block
*/
- public Chunk getChunkAt(Block block);
+ Chunk getChunkAt(Block block);
// PaperSpigot start - Async chunk load API
- public static interface ChunkLoadCallback {
- public void onLoad(Chunk chunk);
+ interface ChunkLoadCallback {
+ void onLoad(Chunk chunk);
}
- public void getChunkAtAsync(int x, int z, ChunkLoadCallback cb);
- public void getChunkAtAsync(Location location, ChunkLoadCallback cb);
- public void getChunkAtAsync(Block block, ChunkLoadCallback cb);
+ void getChunkAtAsync(int x, int z, ChunkLoadCallback cb);
+ void getChunkAtAsync(Location location, ChunkLoadCallback cb);
+ void getChunkAtAsync(Block block, ChunkLoadCallback cb);
// PaperSpigot end
/**
@@ -144,21 +144,21 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param chunk The chunk to check
* @return true if the chunk is loaded, otherwise false
*/
- public boolean isChunkLoaded(Chunk chunk);
+ boolean isChunkLoaded(Chunk chunk);
/**
* Gets an array of all loaded {@link Chunk}s
*
* @return Chunk[] containing all loaded chunks
*/
- public Chunk[] getLoadedChunks();
+ Chunk[] getLoadedChunks();
/**
* Loads the specified {@link Chunk}
*
* @param chunk The chunk to load
*/
- public void loadChunk(Chunk chunk);
+ void loadChunk(Chunk chunk);
/**
* Checks if the {@link Chunk} at the specified coordinates is loaded
@@ -167,7 +167,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the chunk
* @return true if the chunk is loaded, otherwise false
*/
- public boolean isChunkLoaded(int x, int z);
+ boolean isChunkLoaded(int x, int z);
/**
* Checks if the {@link Chunk} at the specified coordinates is loaded and
@@ -178,7 +178,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @return true if the chunk is loaded and in use by one or more players,
* otherwise false
*/
- public boolean isChunkInUse(int x, int z);
+ boolean isChunkInUse(int x, int z);
/**
* Loads the {@link Chunk} at the specified coordinates
@@ -191,7 +191,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param x X-coordinate of the chunk
* @param z Z-coordinate of the chunk
*/
- public void loadChunk(int x, int z);
+ void loadChunk(int x, int z);
/**
* Loads the {@link Chunk} at the specified coordinates
@@ -202,7 +202,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* already exist
* @return true if the chunk has loaded successfully, otherwise false
*/
- public boolean loadChunk(int x, int z, boolean generate);
+ boolean loadChunk(int x, int z, boolean generate);
/**
* Safely unloads and saves the {@link Chunk} at the specified coordinates
@@ -213,7 +213,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param chunk the chunk to unload
* @return true if the chunk has unloaded successfully, otherwise false
*/
- public boolean unloadChunk(Chunk chunk);
+ boolean unloadChunk(Chunk chunk);
/**
* Safely unloads and saves the {@link Chunk} at the specified coordinates
@@ -225,7 +225,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the chunk
* @return true if the chunk has unloaded successfully, otherwise false
*/
- public boolean unloadChunk(int x, int z);
+ boolean unloadChunk(int x, int z);
/**
* Safely unloads and optionally saves the {@link Chunk} at the specified
@@ -239,7 +239,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param save Whether or not to save the chunk
* @return true if the chunk has unloaded successfully, otherwise false
*/
- public boolean unloadChunk(int x, int z, boolean save);
+ boolean unloadChunk(int x, int z, boolean save);
/**
* Unloads and optionally saves the {@link Chunk} at the specified
@@ -252,7 +252,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* nearby
* @return true if the chunk has unloaded successfully, otherwise false
*/
- public boolean unloadChunk(int x, int z, boolean save, boolean safe);
+ boolean unloadChunk(int x, int z, boolean save, boolean safe);
/**
* Safely queues the {@link Chunk} at the specified coordinates for
@@ -265,7 +265,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the chunk
* @return true is the queue attempt was successful, otherwise false
*/
- public boolean unloadChunkRequest(int x, int z);
+ boolean unloadChunkRequest(int x, int z);
/**
* Queues the {@link Chunk} at the specified coordinates for unloading
@@ -275,7 +275,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param safe Controls whether to queue the chunk when players are nearby
* @return Whether the chunk was actually queued
*/
- public boolean unloadChunkRequest(int x, int z, boolean safe);
+ boolean unloadChunkRequest(int x, int z, boolean safe);
/**
* Regenerates the {@link Chunk} at the specified coordinates
@@ -284,7 +284,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z-coordinate of the chunk
* @return Whether the chunk was actually regenerated
*/
- public boolean regenerateChunk(int x, int z);
+ boolean regenerateChunk(int x, int z);
/**
* Resends the {@link Chunk} to all clients
@@ -296,7 +296,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @deprecated This method is not guaranteed to work suitably across all client implementations.
*/
@Deprecated
- public boolean refreshChunk(int x, int z);
+ boolean refreshChunk(int x, int z);
/**
* Drops an item at the specified {@link Location}
@@ -305,7 +305,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param item ItemStack to drop
* @return ItemDrop entity created as a result of this method
*/
- public Item dropItem(Location location, ItemStack item);
+ Item dropItem(Location location, ItemStack item);
/**
* Drops an item at the specified {@link Location} with a random offset
@@ -314,7 +314,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param item ItemStack to drop
* @return ItemDrop entity created as a result of this method
*/
- public Item dropItemNaturally(Location location, ItemStack item);
+ Item dropItemNaturally(Location location, ItemStack item);
/**
* Creates an {@link Arrow} entity at the given {@link Location}
@@ -325,7 +325,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param spread Spread of the arrow. A recommend spread is 12
* @return Arrow entity spawned as a result of this method
*/
- public Arrow spawnArrow(Location location, Vector direction, float speed, float spread);
+ Arrow spawnArrow(Location location, Vector direction, float speed, float spread);
/**
* Creates a tree at the given {@link Location}
@@ -334,7 +334,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param type Type of the tree to create
* @return true if the tree was created successfully, otherwise false
*/
- public boolean generateTree(Location location, TreeType type);
+ boolean generateTree(Location location, TreeType type);
/**
* Creates a tree at the given {@link Location}
@@ -345,7 +345,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* this method
* @return true if the tree was created successfully, otherwise false
*/
- public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate);
+ boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate);
/**
* Creates a entity at the given {@link Location}
@@ -354,7 +354,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param type The entity to spawn
* @return Resulting Entity of this method, or null if it was unsuccessful
*/
- public Entity spawnEntity(Location loc, EntityType type);
+ Entity spawnEntity(Location loc, EntityType type);
/**
* Creates a creature at the given {@link Location}
@@ -367,7 +367,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* #spawnEntity(Location, EntityType) spawnEntity} instead.
*/
@Deprecated
- public LivingEntity spawnCreature(Location loc, EntityType type);
+ LivingEntity spawnCreature(Location loc, EntityType type);
/**
* Creates a creature at the given {@link Location}
@@ -378,7 +378,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* unsuccessful
*/
@Deprecated
- public LivingEntity spawnCreature(Location loc, CreatureType type);
+ LivingEntity spawnCreature(Location loc, CreatureType type);
/**
* Strikes lightning at the given {@link Location}
@@ -386,7 +386,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param loc The location to strike lightning
* @return The lightning entity.
*/
- public LightningStrike strikeLightning(Location loc);
+ LightningStrike strikeLightning(Location loc);
/**
* Strikes lightning at the given {@link Location} without doing damage
@@ -394,21 +394,21 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param loc The location to strike lightning
* @return The lightning entity.
*/
- public LightningStrike strikeLightningEffect(Location loc);
+ LightningStrike strikeLightningEffect(Location loc);
/**
* Get a list of all entities in this World
*
* @return A List of all Entities currently residing in this world
*/
- public List getEntities();
+ List getEntities();
/**
* Get a list of all living entities in this World
*
* @return A List of all LivingEntities currently residing in this world
*/
- public List getLivingEntities();
+ List getLivingEntities();
/**
* Get a collection of all entities in this World matching the given
@@ -420,7 +420,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* match the given class/interface
*/
@Deprecated
- public Collection getEntitiesByClass(Class... classes);
+ Collection getEntitiesByClass(Class... classes);
/**
* Get a collection of all entities in this World matching the given
@@ -431,7 +431,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @return A List of all Entities currently residing in this world that
* match the given class/interface
*/
- public Collection getEntitiesByClass(Class cls);
+ Collection getEntitiesByClass(Class cls);
/**
* Get a collection of all entities in this World matching any of the
@@ -441,14 +441,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @return A List of all Entities currently residing in this world that
* match one or more of the given classes/interfaces
*/
- public Collection getEntitiesByClasses(Class>... classes);
+ Collection getEntitiesByClasses(Class>... classes);
/**
* Get a list of all players in this World
*
* @return A list of all Players currently residing in this world
*/
- public List getPlayers();
+ List getPlayers();
/**
* Returns a list of entities within a bounding box centered around a Location.
@@ -461,28 +461,28 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z 1/2 the size of the box along z axis
* @return the collection of entities near location. This will always be a non-null collection.
*/
- public Collection getNearbyEntities(Location location, double x, double y, double z);
+ Collection getNearbyEntities(Location location, double x, double y, double z);
/**
* Gets the unique name of this world
*
* @return Name of this world
*/
- public String getName();
+ String getName();
/**
* Gets the Unique ID of this world
*
* @return Unique ID of this world.
*/
- public UUID getUID();
+ UUID getUID();
/**
* Gets the default spawn {@link Location} of this world
*
* @return The spawn location of this world
*/
- public Location getSpawnLocation();
+ Location getSpawnLocation();
/**
* Sets the spawn location of the world
@@ -492,7 +492,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z coordinate
* @return True if it was successfully set.
*/
- public boolean setSpawnLocation(int x, int y, int z);
+ boolean setSpawnLocation(int x, int y, int z);
/**
* Sets the spawn location of the world
@@ -502,14 +502,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z coordinate
* @return True if it was successfully set.
*/
- public boolean setSpawnLocation(double x, double y, double z, float yaw, float pitch);
+ boolean setSpawnLocation(double x, double y, double z, float yaw, float pitch);
/**
* Sets the spawn location of the world
*
* @param location Location of the spawn
* @return True if it was successfully set.
*/
- public boolean setSpawnLocation(Location location);
+ boolean setSpawnLocation(Location location);
/**
* Gets the relative in-game time of this world.
@@ -519,7 +519,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @return The current relative time
* @see #getFullTime() Returns an absolute time of this world
*/
- public long getTime();
+ long getTime();
/**
* Sets the relative in-game time on the server.
@@ -534,7 +534,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* hours*1000)
* @see #setFullTime(long) Sets the absolute time of this world
*/
- public void setTime(long time);
+ void setTime(long time);
/**
* Gets the full in-game time on this world
@@ -542,7 +542,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @return The current absolute time
* @see #getTime() Returns a relative time of this world
*/
- public long getFullTime();
+ long getFullTime();
/**
* Sets the in-game time on the server
@@ -553,14 +553,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param time The new absolute time to set this world to
* @see #setTime(long) Sets the relative time of this world
*/
- public void setFullTime(long time);
+ void setFullTime(long time);
/**
* Returns whether the world has an ongoing storm.
*
* @return Whether there is an ongoing storm
*/
- public boolean hasStorm();
+ boolean hasStorm();
/**
* Set whether there is a storm. A duration will be set for the new
@@ -568,49 +568,49 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @param hasStorm Whether there is rain and snow
*/
- public void setStorm(boolean hasStorm);
+ void setStorm(boolean hasStorm);
/**
* Get the remaining time in ticks of the current conditions.
*
* @return Time in ticks
*/
- public int getWeatherDuration();
+ int getWeatherDuration();
/**
* Set the remaining time in ticks of the current conditions.
*
* @param duration Time in ticks
*/
- public void setWeatherDuration(int duration);
+ void setWeatherDuration(int duration);
/**
* Returns whether there is thunder.
*
* @return Whether there is thunder
*/
- public boolean isThundering();
+ boolean isThundering();
/**
* Set whether it is thundering.
*
* @param thundering Whether it is thundering
*/
- public void setThundering(boolean thundering);
+ void setThundering(boolean thundering);
/**
* Get the thundering duration.
*
* @return Duration in ticks
*/
- public int getThunderDuration();
+ int getThunderDuration();
/**
* Set the thundering duration.
*
* @param duration Duration in ticks
*/
- public void setThunderDuration(int duration);
+ void setThunderDuration(int duration);
/**
* Creates explosion at given coordinates with given power
@@ -621,7 +621,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param power The power of explosion, where 4F is TNT
* @return false if explosion was canceled, otherwise true
*/
- public boolean createExplosion(double x, double y, double z, float power);
+ boolean createExplosion(double x, double y, double z, float power);
/**
* Creates explosion at given coordinates with given power and optionally
@@ -634,7 +634,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param setFire Whether or not to set blocks on fire
* @return false if explosion was canceled, otherwise true
*/
- public boolean createExplosion(double x, double y, double z, float power, boolean setFire);
+ boolean createExplosion(double x, double y, double z, float power, boolean setFire);
/**
* Creates explosion at given coordinates with given power and optionally
@@ -648,7 +648,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param breakBlocks Whether or not to have blocks be destroyed
* @return false if explosion was canceled, otherwise true
*/
- public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks);
+ boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks);
/**
* Creates explosion at given coordinates with given power
@@ -657,7 +657,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param power The power of explosion, where 4F is TNT
* @return false if explosion was canceled, otherwise true
*/
- public boolean createExplosion(Location loc, float power);
+ boolean createExplosion(Location loc, float power);
/**
* Creates explosion at given coordinates with given power and optionally
@@ -668,54 +668,54 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param setFire Whether or not to set blocks on fire
* @return false if explosion was canceled, otherwise true
*/
- public boolean createExplosion(Location loc, float power, boolean setFire);
+ boolean createExplosion(Location loc, float power, boolean setFire);
/**
* Gets the {@link Environment} type of this world
*
* @return This worlds Environment type
*/
- public Environment getEnvironment();
+ Environment getEnvironment();
/**
* Gets the Seed for this world.
*
* @return This worlds Seed
*/
- public long getSeed();
+ long getSeed();
/**
* Gets the current PVP setting for this world.
*
* @return True if PVP is enabled
*/
- public boolean getPVP();
+ boolean getPVP();
/**
* Sets the PVP setting for this world.
*
* @param pvp True/False whether PVP should be Enabled.
*/
- public void setPVP(boolean pvp);
+ void setPVP(boolean pvp);
/**
* Gets the chunk generator for this world
*
* @return ChunkGenerator associated with this world
*/
- public ChunkGenerator getGenerator();
+ ChunkGenerator getGenerator();
/**
* Saves world to disk
*/
- public void save();
+ void save();
/**
* Gets a list of all applied {@link BlockPopulator}s for this World
*
* @return List containing any or none BlockPopulators
*/
- public List getPopulators();
+ List getPopulators();
/**
* Spawn an entity of a specific class at the given {@link Location}
@@ -727,7 +727,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @throws IllegalArgumentException if either parameter is null or the
* {@link Entity} requested cannot be spawned
*/
- public T spawn(Location location, Class clazz) throws IllegalArgumentException;
+ T spawn(Location location, Class clazz) throws IllegalArgumentException;
/**
* Spawn a {@link FallingBlock} entity at the given {@link Location} of
@@ -746,7 +746,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @deprecated Magic value
*/
@Deprecated
- public FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException;
+ FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException;
/**
* Spawn a {@link FallingBlock} entity at the given {@link Location} of
@@ -762,7 +762,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @deprecated Magic value
*/
@Deprecated
- public FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException;
+ FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException;
/**
* Plays an effect to all players within a default radius around a given
@@ -773,7 +773,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param effect the {@link Effect}
* @param data a data bit needed for some effects
*/
- public void playEffect(Location location, Effect effect, int data);
+ void playEffect(Location location, Effect effect, int data);
/**
* Plays an effect to all players within a given radius around a location.
@@ -784,7 +784,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param data a data bit needed for some effects
* @param radius the radius around the location
*/
- public void playEffect(Location location, Effect effect, int data, int radius);
+ void playEffect(Location location, Effect effect, int data, int radius);
/**
* Plays an effect to all players within a default radius around a given
@@ -796,7 +796,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param effect the {@link Effect}
* @param data a data bit needed for some effects
*/
- public void playEffect(Location location, Effect effect, T data);
+ void playEffect(Location location, Effect effect, T data);
/**
* Plays an effect to all players within a given radius around a location.
@@ -808,7 +808,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param data a data bit needed for some effects
* @param radius the radius around the location
*/
- public void playEffect(Location location, Effect effect, T data, int radius);
+ void playEffect(Location location, Effect effect, T data, int radius);
/**
* Get empty chunk snapshot (equivalent to all air blocks), optionally
@@ -823,7 +823,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* raw biome temperature and rainfall
* @return The empty snapshot.
*/
- public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain);
+ ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain);
/**
* Sets the spawn flags for this.
@@ -833,21 +833,21 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param allowAnimals - if true, animals are allowed to spawn in this
* world.
*/
- public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals);
+ void setSpawnFlags(boolean allowMonsters, boolean allowAnimals);
/**
* Gets whether animals can spawn in this world.
*
* @return whether animals can spawn in this world.
*/
- public boolean getAllowAnimals();
+ boolean getAllowAnimals();
/**
* Gets whether monsters can spawn in this world.
*
* @return whether monsters can spawn in this world.
*/
- public boolean getAllowMonsters();
+ boolean getAllowMonsters();
/**
* Gets the biome for the given block coordinates.
@@ -877,7 +877,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z coordinate of the block
* @return Temperature of the requested block
*/
- public double getTemperature(int x, int z);
+ double getTemperature(int x, int z);
/**
* Gets the humidity for the given block coordinates.
@@ -889,7 +889,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param z Z coordinate of the block
* @return Humidity of the requested block
*/
- public double getHumidity(int x, int z);
+ double getHumidity(int x, int z);
/**
* Gets the maximum height of this world.
@@ -898,7 +898,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return Maximum height of the world
*/
- public int getMaxHeight();
+ int getMaxHeight();
/**
* Gets the sea level for this world.
@@ -907,7 +907,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return Sea level
*/
- public int getSeaLevel();
+ int getSeaLevel();
/**
* Gets whether the world's spawn area should be kept loaded into memory
@@ -915,7 +915,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return true if the world's spawn area will be kept loaded into memory.
*/
- public boolean getKeepSpawnInMemory();
+ boolean getKeepSpawnInMemory();
/**
* Sets whether the world's spawn area should be kept loaded into memory
@@ -924,14 +924,14 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param keepLoaded if true then the world's spawn area will be kept
* loaded into memory.
*/
- public void setKeepSpawnInMemory(boolean keepLoaded);
+ void setKeepSpawnInMemory(boolean keepLoaded);
/**
* Gets whether or not the world will automatically save
*
* @return true if the world will automatically save, otherwise false
*/
- public boolean isAutoSave();
+ boolean isAutoSave();
/**
* Sets whether or not the world will automatically save
@@ -939,42 +939,42 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param value true if the world should automatically save, otherwise
* false
*/
- public void setAutoSave(boolean value);
+ void setAutoSave(boolean value);
/**
* Sets the Difficulty of the world.
*
* @param difficulty the new difficulty you want to set the world to
*/
- public void setDifficulty(Difficulty difficulty);
+ void setDifficulty(Difficulty difficulty);
/**
* Gets the Difficulty of the world.
*
* @return The difficulty of the world.
*/
- public Difficulty getDifficulty();
+ Difficulty getDifficulty();
/**
* Gets the folder of this world on disk.
*
* @return The folder of this world.
*/
- public File getWorldFolder();
+ File getWorldFolder();
/**
* Gets the type of this world.
*
* @return Type of this world.
*/
- public WorldType getWorldType();
+ WorldType getWorldType();
/**
* Gets whether or not structures are being generated.
*
* @return True if structures are being generated.
*/
- public boolean canGenerateStructures();
+ boolean canGenerateStructures();
/**
* Gets the world's ticks per animal spawns value
@@ -1000,7 +1000,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return The world's ticks per animal spawns value
*/
- public long getTicksPerAnimalSpawns();
+ long getTicksPerAnimalSpawns();
/**
* Sets the world's ticks per animal spawns value
@@ -1027,7 +1027,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param ticksPerAnimalSpawns the ticks per animal spawns value you want
* to set the world to
*/
- public void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns);
+ void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns);
/**
* Gets the world's ticks per monster spawns value
@@ -1053,7 +1053,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return The world's ticks per monster spawns value
*/
- public long getTicksPerMonsterSpawns();
+ long getTicksPerMonsterSpawns();
/**
* Sets the world's ticks per monster spawns value
@@ -1080,7 +1080,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param ticksPerMonsterSpawns the ticks per monster spawns value you
* want to set the world to
*/
- public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns);
+ void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns);
/**
* Gets limit for number of monsters that can spawn in a chunk in this
@@ -1175,7 +1175,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return An array of rules
*/
- public String[] getGameRules();
+ String[] getGameRules();
/**
* Gets the current state of the specified rule
@@ -1185,7 +1185,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param rule Rule to look up value of
* @return String value of rule
*/
- public String getGameRuleValue(String rule);
+ String getGameRuleValue(String rule);
/**
* Set the specified gamerule to specified value.
@@ -1199,7 +1199,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param value Value to set rule to
* @return True if rule was set
*/
- public boolean setGameRuleValue(String rule, String value);
+ boolean setGameRuleValue(String rule, String value);
/**
* Checks if string is a valid game rule
@@ -1207,10 +1207,10 @@ public interface World extends PluginMessageRecipient, Metadatable {
* @param rule Rule to check
* @return True if rule exists
*/
- public boolean isGameRule(String rule);
+ boolean isGameRule(String rule);
// Spigot start
- public class Spigot
+ class Spigot
{
/**
@@ -1288,12 +1288,12 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* @return The world border for this world.
*/
- public WorldBorder getWorldBorder();
+ WorldBorder getWorldBorder();
/**
* Represents various map environment types that a world may be
*/
- public enum Environment {
+ enum Environment {
/**
* Represents the "normal"/"surface world" map
@@ -1309,7 +1309,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
THE_END(1);
private final int id;
- private static final Map lookup = new HashMap();
+ private static final Map lookup = new HashMap<>();
private Environment(int id) {
this.id = id;
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java b/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java
index 55c8983..291282c 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java
@@ -5,21 +5,21 @@ public interface WorldBorder {
/**
* Resets the border to default values.
*/
- public void reset();
+ void reset();
/**
* Gets the current side length of the border.
*
* @return The current side length of the border.
*/
- public double getSize();
+ double getSize();
/**
* Sets the border to a square region with the specified side length in blocks.
*
* @param newSize The new size of the border.
*/
- public void setSize(double newSize);
+ void setSize(double newSize);
/**
* Sets the border to a square region with the specified side length in blocks.
@@ -27,14 +27,14 @@ public interface WorldBorder {
* @param newSize The new side length of the border.
* @param seconds The time in seconds in which the border grows or shrinks from the previous size to that being set.
*/
- public void setSize(double newSize, long seconds);
+ void setSize(double newSize, long seconds);
/**
* Gets the current border center.
*
* @return The current border center.
*/
- public Location getCenter();
+ Location getCenter();
/**
* Sets the new border center.
@@ -42,68 +42,68 @@ public interface WorldBorder {
* @param x The new center x-coordinate.
* @param z The new center z-coordinate.
*/
- public void setCenter(double x, double z);
+ void setCenter(double x, double z);
/**
* Sets the new border center.
*
* @param location The new location of the border center. (Only x/z used)
*/
- public void setCenter(Location location);
+ void setCenter(Location location);
/**
* Gets the current border damage buffer.
*
* @return The current border damage buffer.
*/
- public double getDamageBuffer();
+ double getDamageBuffer();
/**
* Sets the amount of blocks a player may safely be outside the border before taking damage.
*
* @param blocks The amount of blocks. (The default is 5 blocks.)
*/
- public void setDamageBuffer(double blocks);
+ void setDamageBuffer(double blocks);
/**
* Gets the current border damage amount.
*
* @return The current border damage amount.
*/
- public double getDamageAmount();
+ double getDamageAmount();
/**
* Sets the amount of damage a player takes when outside the border plus the border buffer.
*
* @param damage The amount of damage. (The default is 0.2 damage per second per block.)
*/
- public void setDamageAmount(double damage);
+ void setDamageAmount(double damage);
/**
* Gets the current border warning time in seconds.
*
* @return The current border warning time in seconds.
*/
- public int getWarningTime();
+ int getWarningTime();
/**
* Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time.
*
* @param seconds The amount of time in seconds. (The default is 15 seconds.)
*/
- public void setWarningTime(int seconds);
+ void setWarningTime(int seconds);
/**
* Gets the current border warning distance.
*
* @return The current border warning distance.
*/
- public int getWarningDistance();
+ int getWarningDistance();
/**
* Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border.
*
* @param distance The distance in blocks. (The default is 5 blocks.)
*/
- public void setWarningDistance(int distance);
+ void setWarningDistance(int distance);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java b/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java
index 866a73d..03e636a 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java
@@ -184,14 +184,14 @@ public interface BlockState extends Metadatable {
* @deprecated Magic value
*/
@Deprecated
- public byte getRawData();
+ byte getRawData();
/**
* @param data The new data value for the block.
* @deprecated Magic value
*/
@Deprecated
- public void setRawData(byte data);
+ void setRawData(byte data);
/**
* Returns whether this state is placed in the world.
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java b/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java
index c66a51c..3f6ab6a 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java
@@ -21,5 +21,5 @@ public interface BrewingStand extends BlockState, ContainerBlock {
*/
void setBrewingTime(int brewTime);
- public BrewerInventory getInventory();
+ BrewerInventory getInventory();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java b/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java
index 85d5345..e53aeb7 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java
@@ -9,7 +9,7 @@ public interface CommandBlock extends BlockState {
*
* @return Command that this CommandBlock will run when powered.
*/
- public String getCommand();
+ String getCommand();
/**
* Sets the command that this CommandBlock will run when powered.
@@ -18,7 +18,7 @@ public interface CommandBlock extends BlockState {
*
* @param command Command that this CommandBlock will run when powered.
*/
- public void setCommand(String command);
+ void setCommand(String command);
/**
* Gets the name of this CommandBlock. The name is used with commands
@@ -27,7 +27,7 @@ public interface CommandBlock extends BlockState {
*
* @return Name of this CommandBlock.
*/
- public String getName();
+ String getName();
/**
* Sets the name of this CommandBlock. The name is used with commands
@@ -36,5 +36,5 @@ public interface CommandBlock extends BlockState {
*
* @param name New name for this CommandBlock.
*/
- public void setName(String name);
+ void setName(String name);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java b/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java
index e54d997..93a1497 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java
@@ -15,21 +15,21 @@ public interface CreatureSpawner extends BlockState {
* @deprecated In favour of {@link #getSpawnedType()}.
*/
@Deprecated
- public CreatureType getCreatureType();
+ CreatureType getCreatureType();
/**
* Get the spawner's creature type.
*
* @return The creature type.
*/
- public EntityType getSpawnedType();
+ EntityType getSpawnedType();
/**
* Set the spawner's creature type.
*
* @param creatureType The creature type.
*/
- public void setSpawnedType(EntityType creatureType);
+ void setSpawnedType(EntityType creatureType);
/**
* Set the spawner creature type.
@@ -38,7 +38,7 @@ public interface CreatureSpawner extends BlockState {
* @deprecated In favour of {@link #setSpawnedType(EntityType)}.
*/
@Deprecated
- public void setCreatureType(CreatureType creatureType);
+ void setCreatureType(CreatureType creatureType);
/**
* Get the spawner's creature type.
@@ -47,21 +47,21 @@ public interface CreatureSpawner extends BlockState {
* @deprecated Use {@link #getCreatureTypeName()}.
*/
@Deprecated
- public String getCreatureTypeId();
+ String getCreatureTypeId();
/**
* Set the spawner mob type.
*
* @param creatureType The creature type's name.
*/
- public void setCreatureTypeByName(String creatureType);
+ void setCreatureTypeByName(String creatureType);
/**
* Get the spawner's creature type.
*
* @return The creature type's name.
*/
- public String getCreatureTypeName();
+ String getCreatureTypeName();
/**
* Set the spawner mob type.
@@ -70,19 +70,19 @@ public interface CreatureSpawner extends BlockState {
* @deprecated Use {@link #setCreatureTypeByName(String)}.
*/
@Deprecated
- public void setCreatureTypeId(String creatureType);
+ void setCreatureTypeId(String creatureType);
/**
* Get the spawner's delay.
*
* @return The delay.
*/
- public int getDelay();
+ int getDelay();
/**
* Set the spawner's delay.
*
* @param delay The delay.
*/
- public void setDelay(int delay);
+ void setDelay(int delay);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java
index bba753e..e2dd08c 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java
@@ -14,7 +14,7 @@ public interface Dispenser extends BlockState, ContainerBlock {
*
* @return a BlockProjectileSource if valid, otherwise null
*/
- public BlockProjectileSource getBlockProjectileSource();
+ BlockProjectileSource getBlockProjectileSource();
/**
* Attempts to dispense the contents of this block.
@@ -23,5 +23,5 @@ public interface Dispenser extends BlockState, ContainerBlock {
*
* @return true if successful, otherwise false
*/
- public boolean dispense();
+ boolean dispense();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java
index 21fbedc..ede3ec6 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java
@@ -21,5 +21,5 @@ public interface Dropper extends BlockState, InventoryHolder {
* ContainerBlock, the randomly selected ItemStack is dropped on
* the ground in the form of an {@link org.bukkit.entity.Item Item}.
*/
- public void drop();
+ void drop();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java
index 94af85e..1bf37e8 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java
@@ -12,28 +12,28 @@ public interface Furnace extends BlockState, ContainerBlock {
*
* @return Burn time
*/
- public short getBurnTime();
+ short getBurnTime();
/**
* Set burn time.
*
* @param burnTime Burn time
*/
- public void setBurnTime(short burnTime);
+ void setBurnTime(short burnTime);
/**
* Get cook time.
*
* @return Cook time
*/
- public short getCookTime();
+ short getCookTime();
/**
* Set cook time.
*
* @param cookTime Cook time
*/
- public void setCookTime(short cookTime);
+ void setCookTime(short cookTime);
- public FurnaceInventory getInventory();
+ FurnaceInventory getInventory();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java
index 7b45b83..19a3705 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java
@@ -11,26 +11,26 @@ public interface Jukebox extends BlockState {
*
* @return The record Material, or AIR if none is playing
*/
- public Material getPlaying();
+ Material getPlaying();
/**
* Set the record currently playing
*
* @param record The record Material, or null/AIR to stop playing
*/
- public void setPlaying(Material record);
+ void setPlaying(Material record);
/**
* Check if the jukebox is currently playing a record
*
* @return True if there is a record playing
*/
- public boolean isPlaying();
+ boolean isPlaying();
/**
* Stop the jukebox playing and eject the current record
*
* @return True if a record was ejected; false if there was none playing
*/
- public boolean eject();
+ boolean eject();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java b/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java
index 8380068..bc6c536 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java
@@ -13,7 +13,7 @@ public interface NoteBlock extends BlockState {
*
* @return The note.
*/
- public Note getNote();
+ Note getNote();
/**
* Gets the note.
@@ -22,14 +22,14 @@ public interface NoteBlock extends BlockState {
* @deprecated Magic value
*/
@Deprecated
- public byte getRawNote();
+ byte getRawNote();
/**
* Set the note.
*
* @param note The note.
*/
- public void setNote(Note note);
+ void setNote(Note note);
/**
* Set the note.
@@ -38,7 +38,7 @@ public interface NoteBlock extends BlockState {
* @deprecated Magic value
*/
@Deprecated
- public void setRawNote(byte note);
+ void setRawNote(byte note);
/**
* Attempts to play the note at block
@@ -47,7 +47,7 @@ public interface NoteBlock extends BlockState {
*
* @return true if successful, otherwise false
*/
- public boolean play();
+ boolean play();
/**
* Plays an arbitrary note with an arbitrary instrument
@@ -58,7 +58,7 @@ public interface NoteBlock extends BlockState {
* @deprecated Magic value
*/
@Deprecated
- public boolean play(byte instrument, byte note);
+ boolean play(byte instrument, byte note);
/**
* Plays an arbitrary note with an arbitrary instrument
@@ -68,5 +68,5 @@ public interface NoteBlock extends BlockState {
* @return true if successful, otherwise false
* @see Instrument Note
*/
- public boolean play(Instrument instrument, Note note);
+ boolean play(Instrument instrument, Note note);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java b/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java
index e5279f7..19a80d7 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java
@@ -19,7 +19,7 @@ public enum PistonMoveReaction {
BLOCK(2);
private int id;
- private static Map byId = new HashMap();
+ private static Map byId = new HashMap<>();
static {
for (PistonMoveReaction reaction : PistonMoveReaction.values()) {
byId.put(reaction.id, reaction);
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java
index 5d7a633..cdd8cf8 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java
@@ -10,7 +10,7 @@ public interface Sign extends BlockState {
*
* @return Array of Strings containing each line of text
*/
- public String[] getLines();
+ String[] getLines();
/**
* Gets the line of text at the specified index.
@@ -21,7 +21,7 @@ public interface Sign extends BlockState {
* @throws IndexOutOfBoundsException Thrown when the line does not exist
* @return Text on the given line
*/
- public String getLine(int index) throws IndexOutOfBoundsException;
+ String getLine(int index) throws IndexOutOfBoundsException;
/**
* Sets the line of text at the specified index.
@@ -33,5 +33,5 @@ public interface Sign extends BlockState {
* @param line New text to set at the specified index
* @throws IndexOutOfBoundsException If the index is out of the range 0..3
*/
- public void setLine(int index, String line) throws IndexOutOfBoundsException;
+ void setLine(int index, String line) throws IndexOutOfBoundsException;
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java
index 4f4896f..a5fcb2a 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java
@@ -12,14 +12,14 @@ public interface Skull extends BlockState {
*
* @return true if the skull has an owner
*/
- public boolean hasOwner();
+ boolean hasOwner();
/**
* Gets the owner of the skull, if one exists
*
* @return the owner of the skull or null if the skull does not have an owner
*/
- public String getOwner();
+ String getOwner();
/**
* Sets the owner of the skull
@@ -30,33 +30,33 @@ public interface Skull extends BlockState {
* @param name the new owner of the skull
* @return true if the owner was successfully set
*/
- public boolean setOwner(String name);
+ boolean setOwner(String name);
/**
* Gets the rotation of the skull in the world
*
* @return the rotation of the skull
*/
- public BlockFace getRotation();
+ BlockFace getRotation();
/**
* Sets the rotation of the skull in the world
*
* @param rotation the rotation of the skull
*/
- public void setRotation(BlockFace rotation);
+ void setRotation(BlockFace rotation);
/**
* Gets the type of skull
*
* @return the type of skull
*/
- public SkullType getSkullType();
+ SkullType getSkullType();
/**
* Sets the type of skull
*
* @param skullType the type of skull
*/
- public void setSkullType(SkullType skullType);
+ void setSkullType(SkullType skullType);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java b/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java
index 25543b0..1d9c369 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java
@@ -45,7 +45,7 @@ public enum PatternType {
MOJANG("moj");
private final String identifier;
- private static final Map byString = new HashMap();
+ private static final Map byString = new HashMap<>();
static {
for (PatternType p : values()) {
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java b/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java
index ce229d2..881912d 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java
@@ -9,5 +9,5 @@ public interface BlockCommandSender extends CommandSender {
*
* @return Block for the command sender
*/
- public Block getBlock();
+ Block getBlock();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java b/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java
index 8558c2e..8b8c165 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java
@@ -36,7 +36,7 @@ public abstract class Command {
public String getTimingName() {return getName();} // Spigot
protected Command(String name) {
- this(name, "", "/" + name, new ArrayList());
+ this(name, "", "/" + name, new ArrayList<>());
}
protected Command(String name, String description, String usageMessage, List aliases) {
@@ -46,7 +46,7 @@ public abstract class Command {
this.description = description;
this.usageMessage = usageMessage;
this.aliases = aliases;
- this.activeAliases = new ArrayList(aliases);
+ this.activeAliases = new ArrayList<>(aliases);
}
/**
@@ -98,7 +98,7 @@ public abstract class Command {
Player senderPlayer = sender instanceof Player ? (Player) sender : null;
- ArrayList matchedPlayers = new ArrayList();
+ ArrayList matchedPlayers = new ArrayList<>();
for (Player player : sender.getServer().getOnlinePlayers()) {
String name = player.getName();
if ((senderPlayer == null || senderPlayer.canSee(player)) && StringUtil.startsWithIgnoreCase(name, lastWord)) {
@@ -106,7 +106,7 @@ public abstract class Command {
}
}
- Collections.sort(matchedPlayers, String.CASE_INSENSITIVE_ORDER);
+ matchedPlayers.sort(String.CASE_INSENSITIVE_ORDER);
return matchedPlayers;
}
@@ -289,7 +289,7 @@ public abstract class Command {
public boolean unregister(CommandMap commandMap) {
if (allowChangesFrom(commandMap)) {
this.commandMap = null;
- this.activeAliases = new ArrayList(this.aliases);
+ this.activeAliases = new ArrayList<>(this.aliases);
this.label = this.nextLabel;
return true;
}
@@ -359,7 +359,7 @@ public abstract class Command {
public Command setAliases(List aliases) {
this.aliases = aliases;
if (!isRegistered()) {
- this.activeAliases = new ArrayList(aliases);
+ this.activeAliases = new ArrayList<>(aliases);
}
return this;
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java
index c75586f..b292a1b 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java
@@ -14,5 +14,5 @@ public interface CommandExecutor {
* @param args Passed command arguments
* @return true if a valid command, otherwise false
*/
- public boolean onCommand(CommandSender sender, Command command, String label, String[] args);
+ boolean onCommand(CommandSender sender, Command command, String label, String[] args);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java
index e7e20d8..6be965e 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java
@@ -19,7 +19,7 @@ public interface CommandMap {
* a ':' one or more times to make the command unique
* @param commands a list of commands to register
*/
- public void registerAll(String fallbackPrefix, List commands);
+ void registerAll(String fallbackPrefix, List commands);
/**
* Registers a command. Returns true on success; false if name is already
@@ -41,7 +41,7 @@ public interface CommandMap {
* otherwise, which indicates the fallbackPrefix was used one or more
* times
*/
- public boolean register(String label, String fallbackPrefix, Command command);
+ boolean register(String label, String fallbackPrefix, Command command);
/**
* Registers a command. Returns true on success; false if name is already
@@ -63,7 +63,7 @@ public interface CommandMap {
* otherwise, which indicates the fallbackPrefix was used one or more
* times
*/
- public boolean register(String fallbackPrefix, Command command);
+ boolean register(String fallbackPrefix, Command command);
/**
* Looks for the requested command and executes it if found.
@@ -74,12 +74,12 @@ public interface CommandMap {
* @throws CommandException Thrown when the executor for the given command
* fails with an unhandled exception
*/
- public boolean dispatch(CommandSender sender, String cmdLine) throws CommandException;
+ boolean dispatch(CommandSender sender, String cmdLine) throws CommandException;
/**
* Clears all registered commands.
*/
- public void clearCommands();
+ void clearCommands();
/**
* Gets the command registered to the specified name
@@ -88,7 +88,7 @@ public interface CommandMap {
* @return Command with the specified name or null if a command with that
* label doesn't exist
*/
- public Command getCommand(String name);
+ Command getCommand(String name);
/**
@@ -105,5 +105,5 @@ public interface CommandMap {
* command fails with an unhandled exception
* @throws IllegalArgumentException if either sender or cmdLine are null
*/
- public List tabComplete(CommandSender sender, String cmdLine) throws IllegalArgumentException;
+ List tabComplete(CommandSender sender, String cmdLine) throws IllegalArgumentException;
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java
index 4ad0028..978b1cf 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java
@@ -10,28 +10,28 @@ public interface CommandSender extends Permissible {
*
* @param message Message to be displayed
*/
- public void sendMessage(String message);
+ void sendMessage(String message);
/**
* Sends this sender multiple messages
*
* @param messages An array of messages to be displayed
*/
- public void sendMessage(String[] messages);
+ void sendMessage(String[] messages);
/**
* Returns the server instance that this command is running on
*
* @return Server instance
*/
- public Server getServer();
+ Server getServer();
/**
* Gets the name of this command sender
*
* @return Name of the sender
*/
- public String getName();
+ String getName();
// Paper start
/**
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java
index f89ad07..a029d93 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java
@@ -1,13 +1,8 @@
package org.bukkit.command;
import java.util.ArrayList;
-import java.util.logging.Level;
import org.bukkit.Bukkit;
-import org.bukkit.entity.Player;
-import org.bukkit.event.player.PlayerCommandPreprocessEvent;
-import org.bukkit.event.server.RemoteServerCommandEvent;
-import org.bukkit.event.server.ServerCommandEvent;
public class FormattedCommandAlias extends Command {
private final String[] formatStrings;
@@ -21,7 +16,7 @@ public class FormattedCommandAlias extends Command {
@Override
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
boolean result = false;
- ArrayList commands = new ArrayList();
+ ArrayList commands = new ArrayList<>();
for (String formatString : formatStrings) {
try {
commands.add(buildCommand(formatString, args));
@@ -73,7 +68,7 @@ public class FormattedCommandAlias extends Command {
throw new IllegalArgumentException("Invalid replacement token");
}
- int position = Integer.valueOf(formatString.substring(argStart, index));
+ int position = Integer.parseInt(formatString.substring(argStart, index));
// Arguments are not 0 indexed
if (position == 0) {
@@ -108,7 +103,7 @@ public class FormattedCommandAlias extends Command {
replacement.append(args[position]);
}
- formatString = formatString.substring(0, start) + replacement.toString() + formatString.substring(end);
+ formatString = formatString.substring(0, start) + replacement + formatString.substring(end);
// Move index past the replaced data so we don't process it again
index = start + replacement.length();
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java
index 5854583..4369f14 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java
@@ -11,7 +11,7 @@ import org.bukkit.plugin.Plugin;
public class PluginCommandYamlParser {
public static List parse(Plugin plugin) {
- List pluginCmds = new ArrayList();
+ List pluginCmds = new ArrayList<>();
Map> map = plugin.getDescription().getCommands();
@@ -40,19 +40,19 @@ public class PluginCommandYamlParser {
}
if (aliases != null) {
- List aliasList = new ArrayList();
+ List aliasList = new ArrayList<>();
if (aliases instanceof List) {
for (Object o : (List>) aliases) {
if (o.toString().contains(":")) {
- Bukkit.getServer().getLogger().severe("Could not load alias " + o.toString() + " for plugin " + plugin.getName() + ": Illegal Characters");
+ Bukkit.getServer().getLogger().severe("Could not load alias " + o + " for plugin " + plugin.getName() + ": Illegal Characters");
continue;
}
aliasList.add(o.toString());
}
} else {
if (aliases.toString().contains(":")) {
- Bukkit.getServer().getLogger().severe("Could not load alias " + aliases.toString() + " for plugin " + plugin.getName() + ": Illegal Characters");
+ Bukkit.getServer().getLogger().severe("Could not load alias " + aliases + " for plugin " + plugin.getName() + ": Illegal Characters");
} else {
aliasList.add(aliases.toString());
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java
index c5e0d2c..5777b76 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java
@@ -15,5 +15,5 @@ public interface PluginIdentifiableCommand {
*
* @return Plugin that owns this PluginIdentifiableCommand.
*/
- public Plugin getPlugin();
+ Plugin getPlugin();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java b/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java
index bcb03b1..29e2d0a 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -20,7 +20,7 @@ import org.bukkit.util.StringUtil;
public class SimpleCommandMap implements CommandMap {
private static final Pattern PATTERN_ON_SPACE = Pattern.compile(" ", Pattern.LITERAL);
- protected final Map knownCommands = new HashMap();
+ protected final Map knownCommands = new HashMap<>();
private final Server server;
public SimpleCommandMap(final Server server) {
@@ -167,8 +167,7 @@ public class SimpleCommandMap implements CommandMap {
}
public Command getCommand(String name) {
- Command target = knownCommands.get(name.toLowerCase());
- return target;
+ return knownCommands.get(name.toLowerCase());
}
public List tabComplete(CommandSender sender, String cmdLine) {
@@ -186,7 +185,7 @@ public class SimpleCommandMap implements CommandMap {
int spaceIndex = cmdLine.indexOf(' ');
if (spaceIndex == -1) {
- ArrayList completions = new ArrayList();
+ ArrayList completions = new ArrayList<>();
Map knownCommands = this.knownCommands;
final String prefix = (sender instanceof Player ? "/" : "");
@@ -205,7 +204,7 @@ public class SimpleCommandMap implements CommandMap {
}
}
- Collections.sort(completions, String.CASE_INSENSITIVE_ORDER);
+ completions.sort(String.CASE_INSENSITIVE_ORDER);
return completions;
}
@@ -248,7 +247,7 @@ public class SimpleCommandMap implements CommandMap {
}
String[] commandStrings = values.get(alias);
- List targets = new ArrayList();
+ List targets = new ArrayList<>();
StringBuilder bad = new StringBuilder();
for (String commandString : commandStrings) {
@@ -272,7 +271,7 @@ public class SimpleCommandMap implements CommandMap {
// We register these as commands so they have absolute priority.
if (targets.size() > 0) {
- knownCommands.put(alias.toLowerCase(), new FormattedCommandAlias(alias.toLowerCase(), targets.toArray(new String[targets.size()])));
+ knownCommands.put(alias.toLowerCase(), new FormattedCommandAlias(alias.toLowerCase(), targets.toArray(new String[0])));
} else {
knownCommands.remove(alias.toLowerCase());
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java
index d24d795..35bb34c 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java
@@ -11,6 +11,6 @@ import java.util.List;
*/
@Deprecated
public interface TabCommandExecutor extends CommandExecutor {
- public List onTabComplete();
+ List onTabComplete();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java
index 2cb971c..c3ddad2 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java
@@ -20,7 +20,7 @@ public interface TabCompleter {
* @return A List of possible completions for the final argument, or null
* to default to the command executor
*/
- public List onTabComplete(CommandSender sender, Command command, String alias, String[] args);
+ List onTabComplete(CommandSender sender, Command command, String alias, String[] args);
// PaperSpigot start - location tab-completes
default List onTabComplete(CommandSender sender, Command command, String alias, String[] args, Location location) {
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java
index c2e1795..d029a0a 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java
@@ -2,6 +2,7 @@ package org.bukkit.command.defaults;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import org.apache.commons.lang.Validate;
@@ -173,11 +174,11 @@ public class AchievementCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- return Arrays.asList("give");
+ return Collections.singletonList("give");
}
if (args.length == 2) {
- return Bukkit.getUnsafe().tabCompleteInternalStatisticOrAchievementName(args[1], new ArrayList());
+ return Bukkit.getUnsafe().tabCompleteInternalStatisticOrAchievementName(args[1], new ArrayList<>());
}
if (args.length == 3) {
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java
index f8d32df..b2988a4 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java
@@ -2,14 +2,12 @@ package org.bukkit.command.defaults;
import java.util.ArrayList;
import java.util.List;
-import java.util.UUID;
import org.apache.commons.lang.Validate;
import org.bukkit.BanEntry;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
-import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
import org.bukkit.util.StringUtil;
@@ -67,7 +65,7 @@ public class BanListCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- return StringUtil.copyPartialMatches(args[0], BANLIST_TYPES, new ArrayList(BANLIST_TYPES.size()));
+ return StringUtil.copyPartialMatches(args[0], BANLIST_TYPES, new ArrayList<>(BANLIST_TYPES.size()));
}
return ImmutableList.of();
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java
index 05317e1..7a84a19 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java
@@ -18,7 +18,7 @@ import java.util.List;
public class ClearCommand extends VanillaCommand {
private static List materials;
static {
- ArrayList materialList = new ArrayList();
+ ArrayList materialList = new ArrayList<>();
for (Material material : Material.values()) {
materialList.add(material.name());
}
@@ -98,7 +98,7 @@ public class ClearCommand extends VanillaCommand {
String material = materials.get(i);
if (StringUtil.startsWithIgnoreCase(material, arg)) {
if (completion == null) {
- completion = new ArrayList();
+ completion = new ArrayList<>();
}
completion.add(material);
} else {
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java
index f217aea..5f9809d 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java
@@ -36,7 +36,7 @@ public class DefaultGameModeCommand extends VanillaCommand {
try {
value = Integer.parseInt(modeArg);
- } catch (NumberFormatException ex) {}
+ } catch (NumberFormatException ignored) {}
GameMode mode = GameMode.getByValue(value);
@@ -63,7 +63,7 @@ public class DefaultGameModeCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList(GAMEMODE_NAMES.size()));
+ return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList<>(GAMEMODE_NAMES.size()));
}
return ImmutableList.of();
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java
index 86be15e..9b0da03 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java
@@ -49,7 +49,7 @@ public class DeopCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- List completions = new ArrayList();
+ List completions = new ArrayList<>();
for (OfflinePlayer player : Bukkit.getOperators()) {
String playerName = player.getName();
if (StringUtil.startsWithIgnoreCase(playerName, args[0])) {
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java
index 74a8ac2..1f44648 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java
@@ -74,7 +74,7 @@ public class DifficultyCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- return StringUtil.copyPartialMatches(args[0], DIFFICULTY_NAMES, new ArrayList(DIFFICULTY_NAMES.size()));
+ return StringUtil.copyPartialMatches(args[0], DIFFICULTY_NAMES, new ArrayList<>(DIFFICULTY_NAMES.size()));
}
return ImmutableList.of();
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java
index de63bbe..f867b8a 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java
@@ -112,7 +112,7 @@ public class EffectCommand extends VanillaCommand {
if (args.length == 1) {
return super.tabComplete(sender, commandLabel, args);
} else if (args.length == 2) {
- return StringUtil.copyPartialMatches(args[1], effects, new ArrayList(effects.size()));
+ return StringUtil.copyPartialMatches(args[1], effects, new ArrayList<>(effects.size()));
}
return ImmutableList.of();
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java
index 5f0b686..1b7d2cd 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java
@@ -21,7 +21,7 @@ import org.bukkit.util.StringUtil;
@Deprecated
public class EnchantCommand extends VanillaCommand {
- private static final List ENCHANTMENT_NAMES = new ArrayList();
+ private static final List ENCHANTMENT_NAMES = new ArrayList<>();
public EnchantCommand() {
super("enchant");
@@ -131,7 +131,7 @@ public class EnchantCommand extends VanillaCommand {
}
if (args.length == 2) {
- return StringUtil.copyPartialMatches(args[1], ENCHANTMENT_NAMES, new ArrayList(ENCHANTMENT_NAMES.size()));
+ return StringUtil.copyPartialMatches(args[1], ENCHANTMENT_NAMES, new ArrayList<>(ENCHANTMENT_NAMES.size()));
}
if (args.length == 3 || args.length == 4) {
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java
index f9675a0..b041c00 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java
@@ -47,7 +47,7 @@ public class GameModeCommand extends VanillaCommand {
try {
value = Integer.parseInt(modeArg);
- } catch (NumberFormatException ex) {}
+ } catch (NumberFormatException ignored) {}
GameMode mode = GameMode.getByValue(value);
@@ -70,9 +70,9 @@ public class GameModeCommand extends VanillaCommand {
sender.sendMessage("Game mode change for " + player.getName() + " failed!");
} else {
if (player == sender) {
- Command.broadcastCommandMessage(sender, "Set own game mode to " + mode.toString() + " mode");
+ Command.broadcastCommandMessage(sender, "Set own game mode to " + mode + " mode");
} else {
- Command.broadcastCommandMessage(sender, "Set " + player.getName() + "'s game mode to " + mode.toString() + " mode");
+ Command.broadcastCommandMessage(sender, "Set " + player.getName() + "'s game mode to " + mode + " mode");
}
}
} else {
@@ -92,7 +92,7 @@ public class GameModeCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList(GAMEMODE_NAMES.size()));
+ return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList<>(GAMEMODE_NAMES.size()));
} else if (args.length == 2) {
return super.tabComplete(sender, alias, args);
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java
index 13e2589..05a8229 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java
@@ -77,11 +77,11 @@ public class GameRuleCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- return StringUtil.copyPartialMatches(args[0], Arrays.asList(getGameWorld(sender).getGameRules()), new ArrayList());
+ return StringUtil.copyPartialMatches(args[0], Arrays.asList(getGameWorld(sender).getGameRules()), new ArrayList<>());
}
if (args.length == 2) {
- return StringUtil.copyPartialMatches(args[1], GAMERULE_STATES, new ArrayList(GAMERULE_STATES.size()));
+ return StringUtil.copyPartialMatches(args[1], GAMERULE_STATES, new ArrayList<>(GAMERULE_STATES.size()));
}
return ImmutableList.of();
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java
index c8b7f0f..11bd96b 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java
@@ -22,7 +22,7 @@ import com.google.common.collect.ImmutableList;
public class GiveCommand extends VanillaCommand {
private static List materials;
static {
- ArrayList materialList = new ArrayList();
+ ArrayList materialList = new ArrayList<>();
for (Material material : Material.values()) {
materialList.add(material.name());
}
@@ -64,7 +64,7 @@ public class GiveCommand extends VanillaCommand {
if (args.length >= 4) {
try {
data = Short.parseShort(args[3]);
- } catch (NumberFormatException ex) {}
+ } catch (NumberFormatException ignored) {}
}
}
@@ -104,7 +104,7 @@ public class GiveCommand extends VanillaCommand {
if (args.length == 2) {
final String arg = args[1];
final List materials = GiveCommand.materials;
- List completion = new ArrayList();
+ List completion = new ArrayList<>();
final int size = materials.size();
int i = Collections.binarySearch(materials, arg, String.CASE_INSENSITIVE_ORDER);
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java
index aa359e4..162d37f 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java
@@ -118,7 +118,7 @@ public class HelpCommand extends VanillaCommand {
Validate.notNull(alias, "Alias cannot be null");
if (args.length == 1) {
- List matchedTopics = new ArrayList();
+ List matchedTopics = new ArrayList<>();
String searchString = args[0];
for (HelpTopic topic : Bukkit.getServer().getHelpMap().getHelpTopics()) {
String trimmedTopic = topic.getName().startsWith("/") ? topic.getName().substring(1) : topic.getName();
@@ -134,7 +134,7 @@ public class HelpCommand extends VanillaCommand {
protected HelpTopic findPossibleMatches(String searchString) {
int maxDistance = (searchString.length() / 5) + 3;
- Set possibleMatches = new TreeSet(HelpTopicComparator.helpTopicComparatorInstance());
+ Set possibleMatches = new TreeSet<>(HelpTopicComparator.helpTopicComparatorInstance());
if (searchString.startsWith("/")) {
searchString = searchString.substring(1);
@@ -198,7 +198,7 @@ public class HelpCommand extends VanillaCommand {
H[0][j + 1] = INF;
}
- Map sd = new HashMap();
+ Map sd = new HashMap<>();
for (char Letter : (s1 + s2).toCharArray()) {
if (!sd.containsKey(Letter)) {
sd.put(Letter, 0);
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java
index ea62bee..b756be4 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java
@@ -39,7 +39,7 @@ public class ListCommand extends VanillaCommand {
online.append(player.getDisplayName());
}
- sender.sendMessage("There are " + players.size() + "/" + Bukkit.getMaxPlayers() + " players online:\n" + online.toString());
+ sender.sendMessage("There are " + players.size() + "/" + Bukkit.getMaxPlayers() + " players online:\n" + online);
return true;
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java
index b0d7bf5..2a029cb 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java
@@ -29,7 +29,7 @@ public class MeCommand extends VanillaCommand {
message.append(arg);
}
- Bukkit.broadcastMessage("* " + message.toString());
+ Bukkit.broadcastMessage("* " + message);
return true;
}
diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java
index f5bb8b1..6a3daa1 100644
--- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java
+++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java
@@ -57,7 +57,7 @@ public class OpCommand extends VanillaCommand {
Player senderPlayer = (Player) sender;
- ArrayList