* | Property |
* Description |
diff --git a/paper-api/src/main/java/org/bukkit/Bukkit.java b/paper-api/src/main/java/org/bukkit/Bukkit.java
index 1eaf92d7a..2c43d9e3d 100644
--- a/paper-api/src/main/java/org/bukkit/Bukkit.java
+++ b/paper-api/src/main/java/org/bukkit/Bukkit.java
@@ -2,7 +2,9 @@ package org.bukkit;
import java.awt.image.BufferedImage;
import java.io.File;
+import java.io.Serializable;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -15,15 +17,17 @@ import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
+import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.InventoryType;
+import org.bukkit.event.server.ServerListPingEvent;
import org.bukkit.help.HelpMap;
-import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
-import org.bukkit.inventory.ItemFactory;
+import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.Recipe;
import org.bukkit.map.MapView;
+import org.bukkit.permissions.Permissible;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.ServicesManager;
import org.bukkit.plugin.messaging.Messenger;
@@ -32,6 +36,10 @@ import org.bukkit.scoreboard.ScoreboardManager;
import org.bukkit.util.CachedServerIcon;
import com.avaje.ebean.config.ServerConfig;
+import com.google.common.collect.ImmutableList;
+
+import org.bukkit.inventory.ItemFactory;
+import org.bukkit.inventory.meta.ItemMeta;
/**
* Represents the Bukkit core, for version and Server singleton handling
@@ -70,33 +78,41 @@ public final class Bukkit {
}
/**
- * @see Server#getName()
+ * Gets the name of this server implementation.
+ *
+ * @return name of this server implementation
*/
public static String getName() {
return server.getName();
}
/**
- * @see Server#getVersion()
+ * Gets the version string of this server implementation.
+ *
+ * @return version of this server implementation
*/
public static String getVersion() {
return server.getVersion();
}
/**
- * @see Server#getBukkitVersion()
+ * Gets the Bukkit version that this server is running.
+ *
+ * @return version of Bukkit
*/
public static String getBukkitVersion() {
return server.getBukkitVersion();
}
/**
+ * Gets an array copy of all currently logged in players.
+ *
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*
- * @Deprecated
- * @see Server#_INVALID_getOnlinePlayers()
+ * @deprecated superseded by {@link #getOnlinePlayers()}
+ * @return an array of Players that are currently online
*/
@Deprecated
public static Player[] _INVALID_getOnlinePlayers() {
@@ -104,98 +120,262 @@ public final class Bukkit {
}
/**
- * @see Server#getOnlinePlayers()
+ * Gets a view of all currently logged in players. This {@linkplain
+ * Collections#unmodifiableCollection(Collection) view} is a reused
+ * object, making some operations like {@link Collection#size()}
+ * zero-allocation.
+ *
+ * The collection is a view backed by the internal representation, such
+ * that, changes to the internal state of the server will be reflected
+ * immediately. However, the reuse of the returned collection (identity)
+ * is not strictly guaranteed for future or all implementations. Casting
+ * the collection, or relying on interface implementations (like {@link
+ * Serializable} or {@link List}), is deprecated.
+ *
+ * Iteration behavior is undefined outside of self-contained main-thread
+ * uses. Normal and immediate iterator use without consequences that
+ * affect the collection are fully supported. The effects following
+ * (non-exhaustive) {@link Entity#teleport(Location) teleportation},
+ * {@link Player#setHealth(double) death}, and {@link Player#kickPlayer(
+ * String) kicking} are undefined. Any use of this collection from
+ * asynchronous threads is unsafe.
+ *
+ * For safe consequential iteration or mimicking the old array behavior,
+ * using {@link Collection#toArray(Object[])} is recommended. For making
+ * snapshots, {@link ImmutableList#copyOf(Collection)} is recommended.
+ *
+ * @return a view of currently online players.
*/
public static Collection extends Player> getOnlinePlayers() {
return server.getOnlinePlayers();
}
/**
- * @see Server#getMaxPlayers()
+ * Get the maximum amount of players which can login to this server.
+ *
+ * @return the amount of players this server allows
*/
public static int getMaxPlayers() {
return server.getMaxPlayers();
}
/**
- * @see Server#getPort()
+ * Get the game port that the server runs on.
+ *
+ * @return the port number of this server
*/
public static int getPort() {
return server.getPort();
}
/**
- * @see Server#getViewDistance()
+ * Get the view distance from this server.
+ *
+ * @return the view distance from this server.
*/
public static int getViewDistance() {
return server.getViewDistance();
}
/**
- * @see Server#getIp()
+ * Get the IP that this server is bound to, or empty string if not
+ * specified.
+ *
+ * @return the IP string that this server is bound to, otherwise empty
+ * string
*/
public static String getIp() {
return server.getIp();
}
/**
- * @see Server#getServerName()
+ * Get the name of this server.
+ *
+ * @return the name of this server
*/
public static String getServerName() {
return server.getServerName();
}
/**
- * @see Server#getServerId()
+ * Get an ID of this server. The ID is a simple generally alphanumeric ID
+ * that can be used for uniquely identifying this server.
+ *
+ * @return the ID of this server
*/
public static String getServerId() {
return server.getServerId();
}
-
+
/**
- * @see Server#getWorldType()
+ * Get world type (level-type setting) for default world.
+ *
+ * @return the value of level-type (e.g. DEFAULT, FLAT, DEFAULT_1_1)
*/
public static String getWorldType() {
return server.getWorldType();
}
/**
- * @see Server#getGenerateStructures()
+ * Get generate-structures setting.
+ *
+ * @return true if structure generation is enabled, false otherwise
*/
public static boolean getGenerateStructures() {
return server.getGenerateStructures();
}
/**
- * @see Server#getAllowNether()
+ * Gets whether this server allows the End or not.
+ *
+ * @return whether this server allows the End or not
+ */
+ public static boolean getAllowEnd() {
+ return server.getAllowEnd();
+ }
+
+ /**
+ * Gets whether this server allows the Nether or not.
+ *
+ * @return whether this server allows the Nether or not
*/
public static boolean getAllowNether() {
return server.getAllowNether();
}
/**
- * @see Server#hasWhitelist()
+ * Gets whether this server has a whitelist or not.
+ *
+ * @return whether this server has a whitelist or not
*/
public static boolean hasWhitelist() {
return server.hasWhitelist();
}
/**
- * @see Server#broadcastMessage(String message)
+ * Sets if the server is whitelisted.
+ *
+ * @param value true for whitelist on, false for off
+ */
+ public static void setWhitelist(boolean value) {
+ server.setWhitelist(value);
+ }
+
+ /**
+ * Gets a list of whitelisted players.
+ *
+ * @return a set containing all whitelisted players
+ */
+ public static Set getWhitelistedPlayers() {
+ return server.getWhitelistedPlayers();
+ }
+
+ /**
+ * Reloads the whitelist from disk.
+ */
+ public static void reloadWhitelist() {
+ server.reloadWhitelist();
+ }
+
+ /**
+ * Broadcast a message to all players.
+ *
+ * This is the same as calling {@link #broadcast(java.lang.String,
+ * java.lang.String)} to {@link Server#BROADCAST_CHANNEL_USERS}
+ *
+ * @param message the message
+ * @return the number of players
*/
public static int broadcastMessage(String message) {
return server.broadcastMessage(message);
}
/**
- * @see Server#getUpdateFolder()
+ * Gets the name of the update folder. The update folder is used to safely
+ * update plugins at the right moment on a plugin load.
+ *
+ * The update folder name is relative to the plugins folder.
+ *
+ * @return the name of the update folder
*/
public static String getUpdateFolder() {
return server.getUpdateFolder();
}
/**
- * @see Server#getPlayer(String name)
+ * Gets the update folder. The update folder is used to safely update
+ * plugins at the right moment on a plugin load.
+ *
+ * @return the update folder
+ */
+ public static File getUpdateFolderFile() {
+ return server.getUpdateFolderFile();
+ }
+
+ /**
+ * Gets the value of the connection throttle setting.
+ *
+ * @return the value of the connection throttle setting
+ */
+ public static long getConnectionThrottle() {
+ return server.getConnectionThrottle();
+ }
+
+ /**
+ * Gets default ticks per animal spawns value.
+ *
+ * Example Usage:
+ *
+ * - A value of 1 will mean the server will attempt to spawn monsters
+ * every tick.
+ *
- A value of 400 will mean the server will attempt to spawn monsters
+ * every 400th tick.
+ *
- A value below 0 will be reset back to Minecraft's default.
+ *
+ *
+ * Note: If set to 0, animal spawning will be disabled. We
+ * recommend using spawn-animals to control this instead.
+ *
+ * Minecraft default: 400.
+ *
+ * @return the default ticks per animal spawns value
+ */
+ public static int getTicksPerAnimalSpawns() {
+ return server.getTicksPerAnimalSpawns();
+ }
+
+ /**
+ * Gets the default ticks per monster spawns value.
+ *
+ * Example Usage:
+ *
+ * - A value of 1 will mean the server will attempt to spawn monsters
+ * every tick.
+ *
- A value of 400 will mean the server will attempt to spawn monsters
+ * every 400th tick.
+ *
- A value below 0 will be reset back to Minecraft's default.
+ *
+ *
+ * Note: If set to 0, monsters spawning will be disabled. We
+ * recommend using spawn-monsters to control this instead.
+ *
+ * Minecraft default: 1.
+ *
+ * @return the default ticks per monsters spawn value
+ */
+ public static int getTicksPerMonsterSpawns() {
+ return server.getTicksPerMonsterSpawns();
+ }
+
+ /**
+ * Gets a player object by the given username.
+ *
+ * This method may not return objects for offline players.
+ *
+ * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer
+ * guaranteed to be unique
+ * @param name the name to look up
+ * @return a player if one was found, null otherwise
*/
@Deprecated
public static Player getPlayer(String name) {
@@ -203,7 +383,29 @@ public final class Bukkit {
}
/**
- * @see Server#matchPlayer(String name)
+ * Gets the player with the exact given name, case insensitive.
+ *
+ * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer
+ * guaranteed to be unique
+ * @param name Exact name of the player to retrieve
+ * @return a player object if one was found, null otherwise
+ */
+ @Deprecated
+ public static Player getPlayerExact(String name) {
+ return server.getPlayerExact(name);
+ }
+
+ /**
+ * Attempts to match any players with the given name, and returns a list
+ * of all possibly matches.
+ *
+ * This list is not sorted in any particular order. If an exact match is
+ * found, the returned list will only contain a single result.
+ *
+ * @deprecated Use {@link #getPlayer(UUID)} as player names are no longer
+ * guaranteed to be unique
+ * @param name the (partial) name to match
+ * @return list of all possible players
*/
@Deprecated
public static List matchPlayer(String name) {
@@ -211,77 +413,112 @@ public final class Bukkit {
}
/**
- * @see Server#getPlayer(java.util.UUID)
+ * Gets the player with the given UUID.
+ *
+ * @param id UUID of the player to retrieve
+ * @return a player object if one was found, null otherwise
*/
public static Player getPlayer(UUID id) {
return server.getPlayer(id);
}
/**
- * @see Server#getPluginManager()
+ * Gets the plugin manager for interfacing with plugins.
+ *
+ * @return a plugin manager for this Server instance
*/
public static PluginManager getPluginManager() {
return server.getPluginManager();
}
/**
- * @see Server#getScheduler()
+ * Gets the scheduler for managing scheduled events.
+ *
+ * @return a scheduling service for this server
*/
public static BukkitScheduler getScheduler() {
return server.getScheduler();
}
/**
- * @see Server#getServicesManager()
+ * Gets a services manager.
+ *
+ * @return s services manager
*/
public static ServicesManager getServicesManager() {
return server.getServicesManager();
}
/**
- * @see Server#getWorlds()
+ * Gets a list of all worlds on this server.
+ *
+ * @return a list of worlds
*/
public static List getWorlds() {
return server.getWorlds();
}
/**
- * @see Server#createWorld(WorldCreator options)
+ * Creates or loads a world with the given name using the specified
+ * options.
+ *
+ * If the world is already loaded, it will just return the equivalent of
+ * getWorld(creator.name()).
+ *
+ * @param creator the options to use when creating the world
+ * @return newly created or loaded world
*/
- public static World createWorld(WorldCreator options) {
- return server.createWorld(options);
+ public static World createWorld(WorldCreator creator) {
+ return server.createWorld(creator);
}
/**
- * @see Server#unloadWorld(String name, boolean save)
+ * Unloads a world with the given name.
+ *
+ * @param name Name of the world to unload
+ * @param save whether to save the chunks before unloading
+ * @return true if successful, false otherwise
*/
public static boolean unloadWorld(String name, boolean save) {
return server.unloadWorld(name, save);
}
/**
- * @see Server#unloadWorld(World world, boolean save)
+ * Unloads the given world.
+ *
+ * @param world the world to unload
+ * @param save whether to save the chunks before unloading
+ * @return true if successful, false otherwise
*/
public static boolean unloadWorld(World world, boolean save) {
return server.unloadWorld(world, save);
}
/**
- * @see Server#getWorld(String name)
+ * Gets the world with the given name.
+ *
+ * @param name the name of the world to retrieve
+ * @return a world with the given name, or null if none exists
*/
public static World getWorld(String name) {
return server.getWorld(name);
}
/**
- * @see Server#getWorld(UUID uid)
+ * Gets the world from the given Unique ID.
+ *
+ * @param uid a unique-id of the world to retrieve
+ * @return a world with the given Unique ID, or null if none exists
*/
public static World getWorld(UUID uid) {
return server.getWorld(uid);
}
/**
- * @see Server#getMap(short id)
+ * Gets the map from the given item ID.
+ *
+ * @param id the id of the map to get
+ * @return a map view if it exists, or null otherwise
* @deprecated Magic value
*/
@Deprecated
@@ -290,147 +527,222 @@ public final class Bukkit {
}
/**
- * @see Server#createMap(World world)
+ * Create a new map with an automatically assigned ID.
+ *
+ * @param world the world the map will belong to
+ * @return a newly created map view
*/
public static MapView createMap(World world) {
return server.createMap(world);
}
/**
- * @see Server#reload()
+ * Reloads the server, refreshing settings and plugin information.
*/
public static void reload() {
server.reload();
}
/**
- * @see Server#getLogger()
+ * Returns the primary logger associated with this server instance.
+ *
+ * @return Logger associated with this server
*/
public static Logger getLogger() {
return server.getLogger();
}
/**
- * @see Server#getPluginCommand(String name)
+ * Gets a {@link PluginCommand} with the given name or alias.
+ *
+ * @param name the name of the command to retrieve
+ * @return a plugin command if found, null otherwise
*/
public static PluginCommand getPluginCommand(String name) {
return server.getPluginCommand(name);
}
/**
- * @see Server#savePlayers()
+ * Writes loaded players to disk.
*/
public static void savePlayers() {
server.savePlayers();
}
-
+
/**
- * @see Server#dispatchCommand(CommandSender sender, String commandLine)
+ * Dispatches a command on this server, and executes it if found.
+ *
+ * @param sender the apparent sender of the command
+ * @param commandLine the command + arguments. Example: test abc
+ * 123
+ * @return returns false if no target is found
+ * @throws CommandException thrown when the executor for the given command
+ * fails with an unhandled exception
*/
public static boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException {
return server.dispatchCommand(sender, commandLine);
}
/**
- * @see Server#configureDbConfig(ServerConfig config)
+ * Populates a given {@link ServerConfig} with values attributes to this
+ * server.
+ *
+ * @param config the server config to populate
*/
public static void configureDbConfig(ServerConfig config) {
server.configureDbConfig(config);
}
/**
- * @see Server#addRecipe(Recipe recipe)
+ * Adds a recipe to the crafting manager.
+ *
+ * @param recipe the recipe to add
+ * @return true if the recipe was added, false if it wasn't for some
+ * reason
*/
public static boolean addRecipe(Recipe recipe) {
return server.addRecipe(recipe);
}
/**
- * @see Server#getRecipesFor(ItemStack result)
+ * Get a list of all recipes for a given item. The stack size is ignored
+ * in comparisons. If the durability is -1, it will match any data value.
+ *
+ * @param result the item to match against recipe results
+ * @return a list of recipes with the given result
*/
public static List getRecipesFor(ItemStack result) {
return server.getRecipesFor(result);
}
/**
- * @see Server#recipeIterator()
+ * Get an iterator through the list of crafting recipes.
+ *
+ * @return an iterator
*/
public static Iterator recipeIterator() {
return server.recipeIterator();
}
/**
- * @see Server#clearRecipes()
+ * Clears the list of crafting recipes.
*/
public static void clearRecipes() {
server.clearRecipes();
}
/**
- * @see Server#resetRecipes()
+ * Resets the list of crafting recipes to the default.
*/
public static void resetRecipes() {
server.resetRecipes();
}
-
+
/**
- * @see Server#getCommandAliases()
+ * Gets a list of command aliases defined in the server properties.
+ *
+ * @return a map of aliases to command names
*/
public static Map getCommandAliases() {
return server.getCommandAliases();
}
/**
- * @see Server#getSpawnRadius()
+ * Gets the radius, in blocks, around each worlds spawn point to protect.
+ *
+ * @return spawn radius, or 0 if none
*/
public static int getSpawnRadius() {
return server.getSpawnRadius();
}
/**
- * @see Server#setSpawnRadius(int value)
+ * Sets the radius, in blocks, around each worlds spawn point to protect.
+ *
+ * @param value new spawn radius, or 0 if none
*/
public static void setSpawnRadius(int value) {
server.setSpawnRadius(value);
}
/**
- * @see Server#getOnlineMode()
+ * Gets whether the Server is in online mode or not.
+ *
+ * @return true if the server authenticates clients, false otherwise
*/
public static boolean getOnlineMode() {
return server.getOnlineMode();
}
/**
- * @see Server#getAllowFlight()
+ * Gets whether this server allows flying or not.
+ *
+ * @return true if the server allows flight, false otherwise
*/
public static boolean getAllowFlight() {
return server.getAllowFlight();
}
/**
- * @see Server#isHardcore()
+ * Gets whether the server is in hardcore mode or not.
+ *
+ * @return true if the server mode is hardcore, false otherwise
*/
public static boolean isHardcore() {
return server.isHardcore();
}
/**
- * @see Server#shutdown()
+ * Gets whether to use vanilla (false) or exact behaviour (true).
+ *
+ *
+ * - Vanilla behaviour: check for collisions and move the player if
+ * needed.
+ *
- Exact behaviour: spawn players exactly where they should be.
+ *
+ *
+ * @return true if exact location locations are used for spawning, false
+ * for vanilla collision detection or otherwise
+ */
+ public static boolean useExactLoginLocation() {
+ return server.useExactLoginLocation();
+ }
+
+ /**
+ * Shutdowns the server, stopping everything.
*/
public static void shutdown() {
server.shutdown();
}
/**
- * @see Server#broadcast(String message, String permission)
+ * Broadcasts the specified message to every user with the given
+ * permission name.
+ *
+ * @param message message to broadcast
+ * @param permission the required permission {@link Permissible
+ * permissibles} must have to receive the broadcast
+ * @return number of message recipients
*/
public static int broadcast(String message, String permission) {
return server.broadcast(message, permission);
}
/**
- * @see Server#getOfflinePlayer(String name)
+ * Gets the player by the given name, regardless if they are offline or
+ * online.
+ *
+ * This method may involve a blocking web request to get the UUID for the
+ * given name.
+ *
+ * This will return an object even if the player does not exist. To this
+ * method, all players will exist.
+ *
+ * @deprecated Persistent storage of users should be by UUID as names are no longer
+ * unique past a single session.
+ * @param name the name the player to retrieve
+ * @return an offline player
+ * @see #getOfflinePlayer(java.util.UUID)
*/
@Deprecated
public static OfflinePlayer getOfflinePlayer(String name) {
@@ -438,310 +750,372 @@ public final class Bukkit {
}
/**
- * @see Server#getOfflinePlayer(java.util.UUID)
+ * Gets the player by the given UUID, regardless if they are offline or
+ * online.
+ *
+ * This will return an object even if the player does not exist. To this
+ * method, all players will exist.
+ *
+ * @param id the UUID of the player to retrieve
+ * @return an offline player
*/
public static OfflinePlayer getOfflinePlayer(UUID id) {
return server.getOfflinePlayer(id);
}
/**
- * @see Server#getPlayerExact(String name)
- */
- @Deprecated
- public static Player getPlayerExact(String name) {
- return server.getPlayerExact(name);
- }
-
- /**
- * @see Server#getIPBans()
+ * Gets a set containing all current IPs that are banned.
+ *
+ * @return a set containing banned IP addresses
*/
public static Set getIPBans() {
return server.getIPBans();
}
/**
- * @see Server#banIP(String address)
+ * Bans the specified address from the server.
+ *
+ * @param address the IP address to ban
*/
public static void banIP(String address) {
server.banIP(address);
}
/**
- * @see Server#unbanIP(String address)
+ * Unbans the specified address from the server.
+ *
+ * @param address the IP address to unban
*/
public static void unbanIP(String address) {
server.unbanIP(address);
}
/**
- * @see Server#getBannedPlayers()
+ * Gets a set containing all banned players.
+ *
+ * @return a set containing banned players
*/
public static Set getBannedPlayers() {
return server.getBannedPlayers();
}
/**
- * @see Server#getBanList(BanList.Type)
+ * Gets a ban list for the supplied type.
+ *
+ * Bans by name are no longer supported and this method will return
+ * null when trying to request them. The replacement is bans by UUID.
+ *
+ * @param type the type of list to fetch, cannot be null
+ * @return a ban list of the specified type
*/
public static BanList getBanList(BanList.Type type){
return server.getBanList(type);
}
/**
- * @see Server#setWhitelist(boolean value)
- */
- public static void setWhitelist(boolean value) {
- server.setWhitelist(value);
- }
-
- /**
- * @see Server#getWhitelistedPlayers()
- */
- public static Set getWhitelistedPlayers() {
- return server.getWhitelistedPlayers();
- }
-
- /**
- * @see Server#reloadWhitelist()
- */
- public static void reloadWhitelist() {
- server.reloadWhitelist();
- }
-
- /**
- * @see Server#getConsoleSender()
- */
- public static ConsoleCommandSender getConsoleSender() {
- return server.getConsoleSender();
- }
-
- /**
- * @see Server#getOperators()
+ * Gets a set containing all player operators.
+ *
+ * @return a set containing player operators
*/
public static Set getOperators() {
return server.getOperators();
}
/**
- * @see Server#getWorldContainer()
- */
- public static File getWorldContainer() {
- return server.getWorldContainer();
- }
-
- /**
- * @see Server#getMessenger()
- */
- public static Messenger getMessenger() {
- return server.getMessenger();
- }
-
- /**
- * @see Server#getAllowEnd()
- */
- public static boolean getAllowEnd() {
- return server.getAllowEnd();
- }
-
- /**
- * @see Server#getUpdateFolderFile()
- */
- public static File getUpdateFolderFile() {
- return server.getUpdateFolderFile();
- }
-
- /**
- * @see Server#getConnectionThrottle()
- */
- public static long getConnectionThrottle() {
- return server.getConnectionThrottle();
- }
-
- /**
- * @see Server#getTicksPerAnimalSpawns()
- */
- public static int getTicksPerAnimalSpawns() {
- return server.getTicksPerAnimalSpawns();
- }
-
- /**
- * @see Server#getTicksPerMonsterSpawns()
- */
- public static int getTicksPerMonsterSpawns() {
- return server.getTicksPerMonsterSpawns();
- }
-
- /**
- * @see Server#useExactLoginLocation()
- */
- public static boolean useExactLoginLocation() {
- return server.useExactLoginLocation();
- }
-
- /**
- * @see Server#getDefaultGameMode()
+ * Gets the default {@link GameMode} for new players.
+ *
+ * @return the default game mode
*/
public static GameMode getDefaultGameMode() {
return server.getDefaultGameMode();
}
/**
- * @see Server#setDefaultGameMode(GameMode mode)
+ * Sets the default {@link GameMode} for new players.
+ *
+ * @param mode the new game mode
*/
public static void setDefaultGameMode(GameMode mode) {
server.setDefaultGameMode(mode);
}
/**
- * @see Server#getOfflinePlayers()
+ * Gets a {@link ConsoleCommandSender} that may be used as an input source
+ * for this server.
+ *
+ * @return a console command sender
+ */
+ public static ConsoleCommandSender getConsoleSender() {
+ return server.getConsoleSender();
+ }
+
+ /**
+ * Gets the folder that contains all of the various {@link World}s.
+ *
+ * @return folder that contains all worlds
+ */
+ public static File getWorldContainer() {
+ return server.getWorldContainer();
+ }
+
+ /**
+ * Gets every player that has ever played on this server.
+ *
+ * @return an array containing all previous players
*/
public static OfflinePlayer[] getOfflinePlayers() {
return server.getOfflinePlayers();
}
/**
- * @see Server#createInventory(InventoryHolder owner, InventoryType type)
+ * Gets the {@link Messenger} responsible for this server.
+ *
+ * @return messenger responsible for this server
*/
- public static Inventory createInventory(InventoryHolder owner, InventoryType type) {
- return server.createInventory(owner, type);
+ public static Messenger getMessenger() {
+ return server.getMessenger();
}
/**
- * @see Server#createInventory(InventoryHolder owner, InventoryType type, String title)
- */
- public static Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
- return server.createInventory(owner, type, title);
- }
-
- /**
- * @see Server#createInventory(InventoryHolder owner, int size)
- */
- public static Inventory createInventory(InventoryHolder owner, int size) throws IllegalArgumentException {
- return server.createInventory(owner, size);
- }
-
- /**
- * @see Server#createInventory(InventoryHolder owner, int size, String
- * title)
- */
- public static Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException {
- return server.createInventory(owner, size, title);
- }
-
- /**
- * @see Server#getHelpMap()
+ * Gets the {@link HelpMap} providing help topics for this server.
+ *
+ * @return a help map for this server
*/
public static HelpMap getHelpMap() {
return server.getHelpMap();
}
/**
- * @see Server#getMonsterSpawnLimit()
+ * Creates an empty inventory of the specified type. If the type is {@link
+ * InventoryType#CHEST}, the new inventory has a size of 27; otherwise the
+ * new inventory has the normal size for its type.
+ *
+ * @param owner the holder of the inventory, or null to indicate no holder
+ * @param type the type of inventory to create
+ * @return a new inventory
+ */
+ public static Inventory createInventory(InventoryHolder owner, InventoryType type) {
+ return server.createInventory(owner, type);
+ }
+
+ /**
+ * Creates an empty inventory with the specified type and title. If the type
+ * is {@link InventoryType#CHEST}, the new inventory has a size of 27;
+ * otherwise the new inventory has the normal size for its type.
+ * It should be noted that some inventory types do not support titles and
+ * may not render with said titles on the Minecraft client.
+ *
+ * @param owner The holder of the inventory; can be null if there's no holder.
+ * @param type The type of inventory to create.
+ * @param title The title of the inventory, to be displayed when it is viewed.
+ * @return The new inventory.
+ */
+ public static Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
+ return server.createInventory(owner, type, title);
+ }
+
+ /**
+ * Creates an empty inventory of type {@link InventoryType#CHEST} with the
+ * specified size.
+ *
+ * @param owner the holder of the inventory, or null to indicate no holder
+ * @param size a multiple of 9 as the size of inventory to create
+ * @return a new inventory
+ * @throws IllegalArgumentException if the size is not a multiple of 9
+ */
+ public static Inventory createInventory(InventoryHolder owner, int size) throws IllegalArgumentException {
+ return server.createInventory(owner, size);
+ }
+
+ /**
+ * Creates an empty inventory of type {@link InventoryType#CHEST} with the
+ * specified size and title.
+ *
+ * @param owner the holder of the inventory, or null to indicate no holder
+ * @param size a multiple of 9 as the size of inventory to create
+ * @param title the title of the inventory, displayed when inventory is
+ * viewed
+ * @return a new inventory
+ * @throws IllegalArgumentException if the size is not a multiple of 9
+ */
+ public static Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException {
+ return server.createInventory(owner, size, title);
+ }
+
+ /**
+ * Gets user-specified limit for number of monsters that can spawn in a
+ * chunk.
+ *
+ * @return the monster spawn limit
*/
public static int getMonsterSpawnLimit() {
return server.getMonsterSpawnLimit();
}
/**
- * @see Server#getAnimalSpawnLimit()
+ * Gets user-specified limit for number of animals that can spawn in a
+ * chunk.
+ *
+ * @return the animal spawn limit
*/
public static int getAnimalSpawnLimit() {
return server.getAnimalSpawnLimit();
}
/**
- * @see Server#getWaterAnimalSpawnLimit()
+ * Gets user-specified limit for number of water animals that can spawn in
+ * a chunk.
+ *
+ * @return the water animal spawn limit
*/
public static int getWaterAnimalSpawnLimit() {
return server.getWaterAnimalSpawnLimit();
}
-
+
/**
- * @see Server#getAmbientSpawnLimit()
+ * Gets user-specified limit for number of ambient mobs that can spawn in
+ * a chunk.
+ *
+ * @return the ambient spawn limit
*/
public static int getAmbientSpawnLimit() {
return server.getAmbientSpawnLimit();
}
/**
- * @see Server#isPrimaryThread()
+ * Checks the current thread against the expected primary thread for the
+ * server.
+ *
+ * Note: this method should not be used to indicate the current
+ * synchronized state of the runtime. A current thread matching the main
+ * thread indicates that it is synchronized, but a mismatch does not
+ * preclude the same assumption.
+ *
+ * @return true if the current thread matches the expected primary thread,
+ * false otherwise
*/
public static boolean isPrimaryThread() {
return server.isPrimaryThread();
}
/**
- * @see Server#getMotd()
+ * Gets the message that is displayed on the server list.
+ *
+ * @return the servers MOTD
*/
public static String getMotd() {
return server.getMotd();
}
/**
- * @see Server#getShutdownMessage()
+ * Gets the default message that is displayed when the server is stopped.
+ *
+ * @return the shutdown message
*/
public static String getShutdownMessage() {
return server.getShutdownMessage();
}
/**
- * @see Server#getWarningState()
+ * Gets the current warning state for the server.
+ *
+ * @return the configured warning state
*/
public static WarningState getWarningState() {
return server.getWarningState();
}
/**
- * @see Server#getItemFactory()
+ * Gets the instance of the item factory (for {@link ItemMeta}).
+ *
+ * @return the item factory
+ * @see ItemFactory
*/
public static ItemFactory getItemFactory() {
return server.getItemFactory();
}
/**
- * @see Server#getScoreboardManager()
+ * Gets the instance of the scoreboard manager.
+ *
+ * This will only exist after the first world has loaded.
+ *
+ * @return the scoreboard manager or null if no worlds are loaded.
*/
public static ScoreboardManager getScoreboardManager() {
return server.getScoreboardManager();
}
/**
- * @see Server#getServerIcon()
+ * Gets an instance of the server's default server-icon.
+ *
+ * @return the default server-icon; null values may be used by the
+ * implementation to indicate no defined icon, but this behavior is
+ * not guaranteed
*/
public static CachedServerIcon getServerIcon() {
return server.getServerIcon();
}
/**
- * @see Server#loadServerIcon(File)
+ * Loads an image from a file, and returns a cached image for the specific
+ * server-icon.
+ *
+ * Size and type are implementation defined. An incompatible file is
+ * guaranteed to throw an implementation-defined {@link Exception}.
+ *
+ * @param file the file to load the from
+ * @throws IllegalArgumentException if image is null
+ * @throws Exception if the image does not meet current server server-icon
+ * specifications
+ * @return a cached server-icon that can be used for a {@link
+ * ServerListPingEvent#setServerIcon(CachedServerIcon)}
*/
public static CachedServerIcon loadServerIcon(File file) throws IllegalArgumentException, Exception {
return server.loadServerIcon(file);
}
/**
- * @see Server#loadServerIcon(BufferedImage)
+ * Creates a cached server-icon for the specific image.
+ *
+ * Size and type are implementation defined. An incompatible file is
+ * guaranteed to throw an implementation-defined {@link Exception}.
+ *
+ * @param image the image to use
+ * @throws IllegalArgumentException if image is null
+ * @throws Exception if the image does not meet current server
+ * server-icon specifications
+ * @return a cached server-icon that can be used for a {@link
+ * ServerListPingEvent#setServerIcon(CachedServerIcon)}
*/
public static CachedServerIcon loadServerIcon(BufferedImage image) throws IllegalArgumentException, Exception {
return server.loadServerIcon(image);
}
/**
- * @see Server#setIdleTimeout(int)
+ * Set the idle kick timeout. Any players idle for the specified amount of
+ * time will be automatically kicked.
+ *
+ * A value of 0 will disable the idle kick timeout.
+ *
+ * @param threshold the idle timeout in minutes
*/
public static void setIdleTimeout(int threshold) {
server.setIdleTimeout(threshold);
}
/**
- * @see Server#getIdleTimeout()
+ * Gets the idle kick timeout.
+ *
+ * @return the idle timeout in minutes
*/
public static int getIdleTimeout() {
return server.getIdleTimeout();
}
/**
- * @see Server#getUnsafe()
+ * @see UnsafeValues
+ * @return the unsafe values instance
*/
@Deprecated
public static UnsafeValues getUnsafe() {
diff --git a/paper-api/src/main/java/org/bukkit/ChatColor.java b/paper-api/src/main/java/org/bukkit/ChatColor.java
index 0bbc9fac6..b8872b411 100644
--- a/paper-api/src/main/java/org/bukkit/ChatColor.java
+++ b/paper-api/src/main/java/org/bukkit/ChatColor.java
@@ -141,6 +141,8 @@ public enum ChatColor {
/**
* Checks if this code is a format code as opposed to a color code.
+ *
+ * @return whether this ChatColor is a format code
*/
public boolean isFormat() {
return isFormat;
@@ -148,6 +150,8 @@ public enum ChatColor {
/**
* Checks if this code is a color code as opposed to a format code.
+ *
+ * @return whether this ChatColor is a color code
*/
public boolean isColor() {
return !isFormat && this != RESET;
@@ -198,7 +202,7 @@ public enum ChatColor {
* character. The alternate color code character will only be replaced if
* it is immediately followed by 0-9, A-F, a-f, K-O, k-o, R or r.
*
- * @param altColorChar The alternate color code character to replace. Ex: &
+ * @param altColorChar The alternate color code character to replace. Ex: {@literal &}
* @param textToTranslate Text containing the alternate color code character.
* @return Text containing the ChatColor.COLOR_CODE color code character.
*/
diff --git a/paper-api/src/main/java/org/bukkit/Color.java b/paper-api/src/main/java/org/bukkit/Color.java
index 76ff651f5..83927ddec 100644
--- a/paper-api/src/main/java/org/bukkit/Color.java
+++ b/paper-api/src/main/java/org/bukkit/Color.java
@@ -113,7 +113,7 @@ public final class Color implements ConfigurationSerializable {
* @param green integer from 0-255
* @param blue integer from 0-255
* @return a new Color object for the red, green, blue
- * @throws IllegalArgumentException if any value is strictly >255 or <0
+ * @throws IllegalArgumentException if any value is strictly {@literal >255 or <0}
*/
public static Color fromRGB(int red, int green, int blue) throws IllegalArgumentException {
return new Color(red, green, blue);
@@ -126,7 +126,7 @@ public final class Color implements ConfigurationSerializable {
* @param green integer from 0-255
* @param red integer from 0-255
* @return a new Color object for the red, green, blue
- * @throws IllegalArgumentException if any value is strictly >255 or <0
+ * @throws IllegalArgumentException if any value is strictly {@literal >255 or <0}
*/
public static Color fromBGR(int blue, int green, int red) throws IllegalArgumentException {
return new Color(red, green, blue);
diff --git a/paper-api/src/main/java/org/bukkit/EntityEffect.java b/paper-api/src/main/java/org/bukkit/EntityEffect.java
index ec7d1e39e..c816edfdf 100644
--- a/paper-api/src/main/java/org/bukkit/EntityEffect.java
+++ b/paper-api/src/main/java/org/bukkit/EntityEffect.java
@@ -17,7 +17,7 @@ public enum EntityEffect {
/**
* When a mob dies.
*
- * This will cause client-glitches!
+ * This will cause client-glitches!
*/
DEATH(3),
diff --git a/paper-api/src/main/java/org/bukkit/FireworkEffect.java b/paper-api/src/main/java/org/bukkit/FireworkEffect.java
index 6f2d09680..4b0687fe8 100644
--- a/paper-api/src/main/java/org/bukkit/FireworkEffect.java
+++ b/paper-api/src/main/java/org/bukkit/FireworkEffect.java
@@ -351,6 +351,8 @@ public final class FireworkEffect implements ConfigurationSerializable {
/**
* @see ConfigurationSerializable
+ * @param map the map to deserialize
+ * @return the resulting serializable
*/
public static ConfigurationSerializable deserialize(Map map) {
Type type = Type.valueOf((String) map.get(TYPE));
@@ -367,6 +369,7 @@ public final class FireworkEffect implements ConfigurationSerializable {
.build();
}
+ @Override
public Map serialize() {
return ImmutableMap.of(
FLICKER, flicker,
diff --git a/paper-api/src/main/java/org/bukkit/Location.java b/paper-api/src/main/java/org/bukkit/Location.java
index 5c18507ba..37fecc102 100644
--- a/paper-api/src/main/java/org/bukkit/Location.java
+++ b/paper-api/src/main/java/org/bukkit/Location.java
@@ -209,7 +209,7 @@ public class Location implements Cloneable {
* A pitch of 90 represents downward facing, or negative y
* direction.
* A pitch of -90 represents upward facing, or positive y direction.
- *
* Increasing pitch values the equivalent of looking down.
*
* @param pitch new incline's pitch
@@ -225,7 +225,7 @@ public class Location implements Cloneable {
* A pitch of 90 represents downward facing, or negative y
* direction.
* A pitch of -90 represents upward facing, or positive y direction.
- *
* Increasing pitch values the equivalent of looking down.
*
* @return the incline's pitch
@@ -260,6 +260,9 @@ public class Location implements Cloneable {
/**
* Sets the {@link #getYaw() yaw} and {@link #getPitch() pitch} to point
* in the direction of the vector.
+ *
+ * @param vector the direction vector
+ * @return the same location
*/
public Location setDirection(Vector vector) {
/*
diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java
index e14e9f1d3..ab6d047d7 100644
--- a/paper-api/src/main/java/org/bukkit/Server.java
+++ b/paper-api/src/main/java/org/bukkit/Server.java
@@ -91,7 +91,7 @@ public interface Server extends PluginMessageRecipient {
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
*
- * @Deprecated superseded by {@link #getOnlinePlayers()}
+ * @deprecated superseded by {@link #getOnlinePlayers()}
* @return an array of Players that are currently online
*/
@Deprecated
@@ -735,7 +735,7 @@ public interface Server extends PluginMessageRecipient {
/**
* Creates an empty inventory with the specified type and title. If the type
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
- * otherwise the new inventory has the normal size for its type.
+ * otherwise the new inventory has the normal size for its type.
* It should be noted that some inventory types do not support titles and
* may not render with said titles on the Minecraft client.
*
@@ -913,6 +913,7 @@ public interface Server extends PluginMessageRecipient {
/**
* @see UnsafeValues
+ * @return the unsafe values instance
*/
@Deprecated
UnsafeValues getUnsafe();
diff --git a/paper-api/src/main/java/org/bukkit/UnsafeValues.java b/paper-api/src/main/java/org/bukkit/UnsafeValues.java
index fc8a179ce..568c83e37 100644
--- a/paper-api/src/main/java/org/bukkit/UnsafeValues.java
+++ b/paper-api/src/main/java/org/bukkit/UnsafeValues.java
@@ -14,7 +14,7 @@ import org.bukkit.inventory.ItemStack;
*
* This interface is unsupported and only for internal use.
*
- * @deprecated Unsupported & internal use only
+ * @deprecated Unsupported {@literal &} internal use only
*/
@Deprecated
public interface UnsafeValues {
diff --git a/paper-api/src/main/java/org/bukkit/World.java b/paper-api/src/main/java/org/bukkit/World.java
index 9bf2c41bf..d306201c3 100644
--- a/paper-api/src/main/java/org/bukkit/World.java
+++ b/paper-api/src/main/java/org/bukkit/World.java
@@ -402,6 +402,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* Get a collection of all entities in this World matching the given
* class/interface
*
+ * @param an entity subclass
* @param classes The classes representing the types of entity to match
* @return A List of all Entities currently residing in this world that
* match the given class/interface
@@ -412,7 +413,8 @@ public interface World extends PluginMessageRecipient, Metadatable {
/**
* Get a collection of all entities in this World matching the given
* class/interface
- *
+ *
+ * @param an entity subclass
* @param cls The class representing the type of entity to match
* @return A List of all Entities currently residing in this world that
* match the given class/interface
@@ -746,6 +748,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
* Plays an effect to all players within a default radius around a given
* location.
*
+ * @param data dependant on the type of effect
* @param location the {@link Location} around which players must be to
* hear the sound
* @param effect the {@link Effect}
@@ -756,6 +759,7 @@ public interface World extends PluginMessageRecipient, Metadatable {
/**
* Plays an effect to all players within a given radius around a location.
*
+ * @param data dependant on the type of effect
* @param location the {@link Location} around which players must be to
* hear the effect
* @param effect the {@link Effect}
@@ -1050,6 +1054,8 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* Note: If set to a negative number the world will use the
* server-wide spawn limit instead.
+ *
+ * @param limit the new mob limit
*/
void setMonsterSpawnLimit(int limit);
@@ -1067,6 +1073,8 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* Note: If set to a negative number the world will use the
* server-wide spawn limit instead.
+ *
+ * @param limit the new mob limit
*/
void setAnimalSpawnLimit(int limit);
@@ -1084,6 +1092,8 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* Note: If set to a negative number the world will use the
* server-wide spawn limit instead.
+ *
+ * @param limit the new mob limit
*/
void setWaterAnimalSpawnLimit(int limit);
@@ -1101,6 +1111,8 @@ public interface World extends PluginMessageRecipient, Metadatable {
*
* Note: If set to a negative number the world will use the
* server-wide spawn limit instead.
+ *
+ * @param limit the new mob limit
*/
void setAmbientSpawnLimit(int limit);
diff --git a/paper-api/src/main/java/org/bukkit/block/Block.java b/paper-api/src/main/java/org/bukkit/block/Block.java
index 4a53109ad..38e84415d 100644
--- a/paper-api/src/main/java/org/bukkit/block/Block.java
+++ b/paper-api/src/main/java/org/bukkit/block/Block.java
@@ -148,6 +148,7 @@ public interface Block extends Metadatable {
* If the provided Location is null this method does nothing and returns
* null.
*
+ * @param loc the location to copy into
* @return The Location object provided or null
*/
Location getLocation(Location loc);
@@ -219,16 +220,16 @@ public interface Block extends Metadatable {
boolean setTypeIdAndData(int type, byte data, boolean applyPhysics);
/**
- * Gets the face relation of this block compared to the given block
+ * Gets the face relation of this block compared to the given block.
*
- * For example:
- *
+ * For example:
+ * {@code
* Block current = world.getBlockAt(100, 100, 100);
* Block target = world.getBlockAt(100, 101, 100);
*
* current.getFace(target) == BlockFace.Up;
- *
- *
+ * }
+ *
* If the given block is not connected to this block, null may be returned
*
* @param block Block to compare against this block
diff --git a/paper-api/src/main/java/org/bukkit/block/BlockState.java b/paper-api/src/main/java/org/bukkit/block/BlockState.java
index ca571739f..96bf1d0d2 100644
--- a/paper-api/src/main/java/org/bukkit/block/BlockState.java
+++ b/paper-api/src/main/java/org/bukkit/block/BlockState.java
@@ -96,6 +96,7 @@ public interface BlockState extends Metadatable {
* If the provided Location is null this method does nothing and returns
* null.
*
+ * @param loc the location to copy into
* @return The Location object provided or null
*/
Location getLocation(Location loc);
diff --git a/paper-api/src/main/java/org/bukkit/command/Command.java b/paper-api/src/main/java/org/bukkit/command/Command.java
index 87c33d9c1..e5fb0f8f6 100644
--- a/paper-api/src/main/java/org/bukkit/command/Command.java
+++ b/paper-api/src/main/java/org/bukkit/command/Command.java
@@ -57,7 +57,14 @@ public abstract class Command {
public abstract boolean execute(CommandSender sender, String commandLabel, String[] args);
/**
+ * Executed on tab completion for this command, returning a list of
+ * options the player can tab through.
+ *
* @deprecated This method is not supported and returns null
+ * @param sender Source object which is executing this command
+ * @param args All arguments passed to the command, split via ' '
+ * @return a list of tab-completions for the specified arguments. This
+ * will never be null. List may be immutable.
*/
@Deprecated
public List tabComplete(CommandSender sender, String[] args) {
diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java
index ff73b26fa..aa359e4a7 100644
--- a/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java
+++ b/paper-api/src/main/java/org/bukkit/command/defaults/HelpCommand.java
@@ -165,7 +165,7 @@ public class HelpCommand extends VanillaCommand {
/**
* Computes the Dameraur-Levenshtein Distance between two strings. Adapted
- * from the algorithm at Wikipedia: Damerau–Levenshtein distance
+ * from the algorithm at Wikipedia: Damerau–Levenshtein distance
*
* @param s1 The first string being compared.
* @param s2 The second string being compared.
diff --git a/paper-api/src/main/java/org/bukkit/configuration/Configuration.java b/paper-api/src/main/java/org/bukkit/configuration/Configuration.java
index 9289c218e..52e3ac420 100644
--- a/paper-api/src/main/java/org/bukkit/configuration/Configuration.java
+++ b/paper-api/src/main/java/org/bukkit/configuration/Configuration.java
@@ -29,7 +29,7 @@ public interface Configuration extends ConfigurationSection {
* collection, then a new {@link MemoryConfiguration} will be created to
* hold the new default values.
*
- * @param defaults A map of Path->Values to add to defaults.
+ * @param defaults A map of Path{@literal ->}Values to add to defaults.
* @throws IllegalArgumentException Thrown if defaults is null.
*/
public void addDefaults(Map defaults);
diff --git a/paper-api/src/main/java/org/bukkit/configuration/file/FileConfiguration.java b/paper-api/src/main/java/org/bukkit/configuration/file/FileConfiguration.java
index 9d6d1c613..9cbe0cadf 100644
--- a/paper-api/src/main/java/org/bukkit/configuration/file/FileConfiguration.java
+++ b/paper-api/src/main/java/org/bukkit/configuration/file/FileConfiguration.java
@@ -271,7 +271,7 @@ public abstract class FileConfiguration extends MemoryConfiguration {
* Compiles the header for this {@link FileConfiguration} and returns the
* result.
*
- * This will use the header from {@link #options()} -> {@link
+ * This will use the header from {@link #options()} -> {@link
* FileConfigurationOptions#header()}, respecting the rules of {@link
* FileConfigurationOptions#copyHeader()} if set.
*
diff --git a/paper-api/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java b/paper-api/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java
index ba3c8c475..74b73f9d0 100644
--- a/paper-api/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java
+++ b/paper-api/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java
@@ -9,11 +9,11 @@ import java.util.Map;
* methods as defined by this interface:
*
* - A static method "deserialize" that accepts a single {@link Map}<
- * {@link String}, {@link Object}> and returns the class.
+ * {@link String}, {@link Object}> and returns the class.
* A static method "valueOf" that accepts a single {@link Map}<{@link
- * String}, {@link Object}> and returns the class.
+ * String}, {@link Object}> and returns the class.
* A constructor that accepts a single {@link Map}<{@link String},
- * {@link Object}>.
+ * {@link Object}>.
*
* In addition to implementing this interface, you must register the class
* with {@link ConfigurationSerialization#registerClass(Class)}.
diff --git a/paper-api/src/main/java/org/bukkit/entity/CreatureType.java b/paper-api/src/main/java/org/bukkit/entity/CreatureType.java
index 48ff687ad..127d4756f 100644
--- a/paper-api/src/main/java/org/bukkit/entity/CreatureType.java
+++ b/paper-api/src/main/java/org/bukkit/entity/CreatureType.java
@@ -71,6 +71,7 @@ public enum CreatureType {
/**
*
+ * @return the raw type id
* @deprecated Magic value
*/
@Deprecated
@@ -84,6 +85,8 @@ public enum CreatureType {
/**
*
+ * @param id the raw type id
+ * @return the matching CreatureType or null
* @deprecated Magic value
*/
@Deprecated
diff --git a/paper-api/src/main/java/org/bukkit/entity/Damageable.java b/paper-api/src/main/java/org/bukkit/entity/Damageable.java
index 53877a84b..d0599cf0a 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Damageable.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Damageable.java
@@ -15,6 +15,8 @@ public interface Damageable extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param amount Amount of damage to deal
*/
@Deprecated
void _INVALID_damage(int amount);
@@ -32,6 +34,9 @@ public interface Damageable extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param amount Amount of damage to deal
+ * @param source Entity which to attribute this damage from
*/
@Deprecated
void _INVALID_damage(int amount, Entity source);
@@ -47,6 +52,8 @@ public interface Damageable extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return Health represented from 0 to max
*/
@Deprecated
int _INVALID_getHealth();
@@ -56,7 +63,7 @@ public interface Damageable extends Entity {
* dead.
*
* @param health New health represented from 0 to max
- * @throws IllegalArgumentException Thrown if the health is < 0 or >
+ * @throws IllegalArgumentException Thrown if the health is {@literal < 0 or >}
* {@link #getMaxHealth()}
*/
void setHealth(double health);
@@ -65,6 +72,10 @@ public interface Damageable extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param health New health represented from 0 to max
+ * @throws IllegalArgumentException Thrown if the health is {@literal < 0 or >}
+ * {@link #getMaxHealth()}
*/
@Deprecated
void _INVALID_setHealth(int health);
@@ -80,6 +91,8 @@ public interface Damageable extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return Maximum health
*/
@Deprecated
int _INVALID_getMaxHealth();
@@ -101,6 +114,8 @@ public interface Damageable extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param health amount of health to set the maximum to
*/
@Deprecated
void _INVALID_setMaxHealth(int health);
diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java
index 39c35c05a..9fa886f63 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Entity.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java
@@ -30,6 +30,7 @@ public interface Entity extends Metadatable {
* If the provided Location is null this method does nothing and returns
* null.
*
+ * @param loc the location to copy into
* @return The Location object provided or null
*/
public Location getLocation(Location loc);
@@ -109,7 +110,7 @@ public interface Entity extends Metadatable {
* @param x 1/2 the size of the box along x axis
* @param y 1/2 the size of the box along y axis
* @param z 1/2 the size of the box along z axis
- * @return List List of entities nearby
+ * @return {@code List} List of entities nearby
*/
public List getNearbyEntities(double x, double y, double z);
diff --git a/paper-api/src/main/java/org/bukkit/entity/EntityType.java b/paper-api/src/main/java/org/bukkit/entity/EntityType.java
index 2a69367d2..ccc024bf9 100644
--- a/paper-api/src/main/java/org/bukkit/entity/EntityType.java
+++ b/paper-api/src/main/java/org/bukkit/entity/EntityType.java
@@ -209,6 +209,7 @@ public enum EntityType {
/**
*
+ * @return the entity type's name
* @deprecated Magic value
*/
@Deprecated
@@ -222,6 +223,7 @@ public enum EntityType {
/**
*
+ * @return the raw type id
* @deprecated Magic value
*/
@Deprecated
@@ -231,6 +233,8 @@ public enum EntityType {
/**
*
+ * @param name the entity type's name
+ * @return the matching entity type or null
* @deprecated Magic value
*/
@Deprecated
@@ -243,6 +247,8 @@ public enum EntityType {
/**
*
+ * @param id the raw type id
+ * @return the matching entity type or null
* @deprecated Magic value
*/
@Deprecated
diff --git a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java
index 5e2a41ae2..a0fefd858 100644
--- a/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/paper-api/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -173,6 +173,8 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return damage taken since the last no damage ticks time period
*/
@Deprecated
public int _INVALID_getLastDamage();
@@ -188,6 +190,8 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param damage amount of damage
*/
@Deprecated
public void _INVALID_setLastDamage(int damage);
diff --git a/paper-api/src/main/java/org/bukkit/entity/Minecart.java b/paper-api/src/main/java/org/bukkit/entity/Minecart.java
index a7bb09442..0b3e77459 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Minecart.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Minecart.java
@@ -11,6 +11,8 @@ public interface Minecart extends Vehicle {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param damage over 40 to "kill" a minecart
*/
@Deprecated
public void _INVALID_setDamage(int damage);
@@ -26,6 +28,8 @@ public interface Minecart extends Vehicle {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return The damage
*/
@Deprecated
public int _INVALID_getDamage();
diff --git a/paper-api/src/main/java/org/bukkit/entity/Player.java b/paper-api/src/main/java/org/bukkit/entity/Player.java
index fe8a0bd71..229a71a05 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Player.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Player.java
@@ -255,6 +255,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
/**
* Plays an effect to just this player.
*
+ * @param the data based based on the type of the effect
* @param loc the location to play the effect at
* @param effect the {@link Effect}
* @param data a data bit needed for some effects
@@ -360,6 +361,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
/**
* Gets whether this player has the given achievement.
*
+ * @param achievement the achievement to check
* @return whether the player has the achievement
* @throws IllegalArgumentException if achievement is null
*/
@@ -763,7 +765,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
* Gets the players current saturation level.
*
* Saturation is a buffer for food level. Your food level will not drop if
- * you are saturated > 0.
+ * you are saturated {@literal >} 0.
*
* @return Saturation level
*/
diff --git a/paper-api/src/main/java/org/bukkit/entity/Projectile.java b/paper-api/src/main/java/org/bukkit/entity/Projectile.java
index 90ce3b3f7..a5599fa36 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Projectile.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Projectile.java
@@ -11,6 +11,8 @@ public interface Projectile extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return the {@link LivingEntity} that shot this projectile
*/
@Deprecated
public LivingEntity _INVALID_getShooter();
@@ -26,6 +28,8 @@ public interface Projectile extends Entity {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param shooter the {@link LivingEntity} that shot this projectile
*/
@Deprecated
public void _INVALID_setShooter(LivingEntity shooter);
diff --git a/paper-api/src/main/java/org/bukkit/event/EventHandler.java b/paper-api/src/main/java/org/bukkit/event/EventHandler.java
index e42acc198..4c9fb3cde 100644
--- a/paper-api/src/main/java/org/bukkit/event/EventHandler.java
+++ b/paper-api/src/main/java/org/bukkit/event/EventHandler.java
@@ -24,6 +24,8 @@ public @interface EventHandler {
*
HIGHEST
* MONITOR
*
+ *
+ * @return the priority
*/
EventPriority priority() default EventPriority.NORMAL;
@@ -32,6 +34,8 @@ public @interface EventHandler {
*
* If ignoreCancelled is true and the event is cancelled, the method is
* not called. Otherwise, the method is always called.
+ *
+ * @return whether cancelled events should be ignored
*/
boolean ignoreCancelled() default false;
}
diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java
index 3860f4439..613feb911 100644
--- a/paper-api/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java
@@ -29,6 +29,9 @@ public class BlockCanBuildEvent extends BlockEvent {
/**
*
* @deprecated Magic value
+ * @param block the block involved in this event
+ * @param id the id of the block to place
+ * @param canBuild whether we can build
*/
@Deprecated
public BlockCanBuildEvent(final Block block, final int id, final boolean canBuild) {
diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java
index 733a15ecb..5ea8b07fd 100644
--- a/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java
@@ -19,10 +19,6 @@ public class BlockIgniteEvent extends BlockEvent implements Cancellable {
private final Block ignitingBlock;
private boolean cancel;
- /**
- * @deprecated use {@link BlockIgniteEvent#BlockIgniteEvent(Block,
- * IgniteCause, Entity)} instead.
- */
@Deprecated
public BlockIgniteEvent(final Block theBlock, final IgniteCause cause, final Player thePlayer) {
this(theBlock, cause, (Entity) thePlayer);
diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
index e05d1caad..01a545b42 100644
--- a/paper-api/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java
@@ -16,6 +16,8 @@ public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
/**
*
* @deprecated Magic value
+ * @param block the block involved in this event
+ * @param changed the changed block's type id
*/
@Deprecated
public BlockPhysicsEvent(final Block block, final int changed) {
diff --git a/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java b/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java
index d1b7908d6..83188cf58 100644
--- a/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java
@@ -46,8 +46,8 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
* @param index index of the line to get
* @return the String containing the line of text associated with the
* provided index
- * @throws IndexOutOfBoundsException thrown when the provided index is > 3
- * or < 0
+ * @throws IndexOutOfBoundsException thrown when the provided index is {@literal > 3
+ * or < 0}
*/
public String getLine(int index) throws IndexOutOfBoundsException {
return lines[index];
@@ -58,8 +58,8 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
*
* @param index index of the line to set
* @param line text to set
- * @throws IndexOutOfBoundsException thrown when the provided index is > 3
- * or < 0
+ * @throws IndexOutOfBoundsException thrown when the provided index is {@literal > 3
+ * or < 0}
*/
public void setLine(int index, String line) throws IndexOutOfBoundsException {
lines[index] = line;
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
index 2cc079967..9ef48c84b 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java
@@ -63,6 +63,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* event's construction.
*
* @param type the modifier
+ * @return the original damage
* @throws IllegalArgumentException if type is null
*/
public double getOriginalDamage(DamageModifier type) throws IllegalArgumentException {
@@ -79,6 +80,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
/**
* Sets the damage for the specified modifier.
*
+ * @param type the damage modifier
* @param damage the scalar value of the damage's modifier
* @see #getFinalDamage()
* @throws IllegalArgumentException if type is null
@@ -96,6 +98,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
/**
* Gets the damage change for some modifier
*
+ * @param type the damage modifier
* @return The raw amount of damage caused by the event
* @throws IllegalArgumentException if type is null
* @see DamageModifier#BASE
@@ -150,6 +153,8 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return the (rounded) damage
*/
@Deprecated
public int _INVALID_getDamage() {
@@ -197,6 +202,8 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param damage the new damage value
*/
@Deprecated
public void _INVALID_setDamage(int damage) {
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java
index 682fe5902..41edef6b1 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java
@@ -26,7 +26,7 @@ public class EntityPortalExitEvent extends EntityTeleportEvent {
* Gets a copy of the velocity that the entity has before entering the
* portal.
*
- * @return velocity of entity before entering portal
+ * @return velocity of entity before entering the portal
*/
public Vector getBefore() {
return this.before.clone();
@@ -36,7 +36,7 @@ public class EntityPortalExitEvent extends EntityTeleportEvent {
* Gets a copy of the velocity that the entity will have after exiting the
* portal.
*
- * @return velocity of entity after exiting portal
+ * @return velocity of entity after exiting the portal
*/
public Vector getAfter() {
return this.after.clone();
@@ -44,6 +44,8 @@ public class EntityPortalExitEvent extends EntityTeleportEvent {
/**
* Sets the velocity that the entity will have after exiting the portal.
+ *
+ * @param after the velocity after exiting the portal
*/
public void setAfter(Vector after) {
this.after = after.clone();
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
index b4291b07d..a7b3517aa 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java
@@ -38,6 +38,8 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return the (rounded) amount regained
*/
@Deprecated
public int _INVALID_getAmount() {
@@ -57,16 +59,20 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param amount the amount that will be regained
*/
@Deprecated
public void _INVALID_setAmount(int amount) {
setAmount(amount);
}
+ @Override
public boolean isCancelled() {
return cancelled;
}
+ @Override
public void setCancelled(boolean cancel) {
cancelled = cancel;
}
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java
index 7416a0ae0..5f1ecfefa 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerFishEvent.java
@@ -20,9 +20,9 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
/**
* @deprecated replaced by {@link #PlayerFishEvent(Player, Entity, Fish,
* State)} to include the {@link Fish} hook entity.
- * @param player
- * @param entity
- * @param state
+ * @param player the player fishing
+ * @param entity the caught entity
+ * @param state the state of fishing
*/
@Deprecated
public PlayerFishEvent(final Player player, final Entity entity, final State state) {
@@ -40,7 +40,7 @@ public class PlayerFishEvent extends PlayerEvent implements Cancellable {
* Gets the entity caught by the player.
*
* If player has fished successfully, the result may be cast to {@link
- * Item}.
+ * org.bukkit.entity.Item}.
*
* @return Entity caught by the player, Entity if fishing, and null if
* bobber has gotten stuck in the ground or nothing has been caught
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
index b74b7b893..68834dddc 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java
@@ -17,6 +17,7 @@ public class PlayerLoginEvent extends PlayerEvent {
/**
* @deprecated Address should be provided in other constructor
+ * @param player The {@link Player} for this event
*/
@Deprecated
public PlayerLoginEvent(final Player player) {
@@ -25,6 +26,8 @@ public class PlayerLoginEvent extends PlayerEvent {
/**
* @deprecated Address should be provided in other constructor
+ * @param player The {@link Player} for this event
+ * @param hostname The hostname that was used to connect to the server
*/
@Deprecated
public PlayerLoginEvent(final Player player, final String hostname) {
@@ -49,6 +52,9 @@ public class PlayerLoginEvent extends PlayerEvent {
/**
* @deprecated Address and hostname should be provided in other
* constructor
+ * @param player The {@link Player} for this event
+ * @param result The result status for this event
+ * @param message The message to be displayed if result denies login
*/
@Deprecated
public PlayerLoginEvent(final Player player, final Result result, final String message) {
diff --git a/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index c61afdf72..343f238fb 100644
--- a/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -32,6 +32,10 @@ public class ServerListPingEvent extends ServerEvent implements Iterable
* This constructor is intended for implementations that provide the
* {@link #iterator()} method, thus provided the {@link #getNumPlayers()}
* count.
+ *
+ * @param address the address of the pinger
+ * @param motd the message of the day
+ * @param maxPlayers the max number of players
*/
protected ServerListPingEvent(final InetAddress address, final String motd, final int maxPlayers) {
this.numPlayers = MAGIC_PLAYER_COUNT;
diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java
index 304ee2cb0..c7b9c1a69 100644
--- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java
@@ -48,6 +48,8 @@ public class VehicleDamageEvent extends VehicleEvent implements Cancellable {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @return the damage
*/
@Deprecated
public int _INVALID_getDamage() {
@@ -67,6 +69,8 @@ public class VehicleDamageEvent extends VehicleEvent implements Cancellable {
* This method exists for legacy reasons to provide backwards
* compatibility. It will not exist at runtime and should not be used
* under any circumstances.
+ *
+ * @param damage the damage
*/
@Deprecated
public void _INVALID_setDamage(int damage) {
diff --git a/paper-api/src/main/java/org/bukkit/event/world/StructureGrowEvent.java b/paper-api/src/main/java/org/bukkit/event/world/StructureGrowEvent.java
index d1c9822a1..62d300d74 100644
--- a/paper-api/src/main/java/org/bukkit/event/world/StructureGrowEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/world/StructureGrowEvent.java
@@ -9,8 +9,8 @@ import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;
/**
- * Event that is called when an organic structure attempts to grow (Sapling ->
- * Tree), (Mushroom -> Huge Mushroom), naturally or using bonemeal.
+ * Event that is called when an organic structure attempts to grow (Sapling {@literal ->}
+ * Tree), (Mushroom {@literal ->} Huge Mushroom), naturally or using bonemeal.
*/
public class StructureGrowEvent extends WorldEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
diff --git a/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java b/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java
index 8e08bdc94..e5db64970 100644
--- a/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java
+++ b/paper-api/src/main/java/org/bukkit/generator/ChunkGenerator.java
@@ -89,7 +89,7 @@ public abstract class ChunkGenerator {
*
* short[][] result = new short[world-height / 16][];
*
- * Each section (sectionID = (Y>>4)) that has blocks needs to be allocated
+ * Each section {@code (sectionID = (Y>>4))} that has blocks needs to be allocated
* space for the 4096 blocks in that section:
*
* result[sectionID] = new short[4096];
@@ -100,20 +100,20 @@ public abstract class ChunkGenerator {
* following mapping function:
*
* void setBlock(short[][] result, int x, int y, int z, short blkid) {
- * if (result[y >> 4] == null) {
- * result[y >> 4] = new short[4096];
+ * {@code if (result[y >> 4] == null) {}
+ * {@code result[y >> 4] = new short[4096];}
* }
- * result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;
+ * {@code result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;}
* }
*
* while reading a block ID can be done with the following mapping
* function:
*
* short getBlock(short[][] result, int x, int y, int z) {
- * if (result[y >> 4] == null) {
+ * {@code if (result[y >> 4] == null) {}
* return (short)0;
* }
- * return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];
+ * {@code return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];}
* }
*
* while sections that are not populated can be left null.
@@ -122,20 +122,20 @@ public abstract class ChunkGenerator {
* following mapping function:
*
* void setBlock(short[][] result, int x, int y, int z, short blkid) {
- * if (result[y >> 4) == null) {
- * result[y >> 4] = new short[4096];
+ * {@code if (result[y >> 4) == null) {}
+ * {@code result[y >> 4] = new short[4096];}
* }
- * result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;
+ * {@code result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;}
* }
*
* while reading a block ID can be done with the following mapping
* function:
*
* short getBlock(short[][] result, int x, int y, int z) {
- * if (result[y >> 4) == null) {
+ * {@code if (result[y >> 4) == null) {}
* return (short)0;
* }
- * return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];
+ * {@code return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];}
* }
*
*
@@ -173,7 +173,7 @@ public abstract class ChunkGenerator {
*
* byte[][] result = new byte[world-height / 16][];
*
- * Each section (sectionID = (Y>>4)) that has blocks needs to be allocated
+ * Each section {@code (sectionID = (Y>>4))} that has blocks needs to be allocated
* space for the 4096 blocks in that section:
*
* result[sectionID] = new byte[4096];
@@ -184,20 +184,20 @@ public abstract class ChunkGenerator {
* following mapping function:
*
* void setBlock(byte[][] result, int x, int y, int z, byte blkid) {
- * if (result[y >> 4) == null) {
- * result[y >> 4] = new byte[4096];
+ * {@code if (result[y >> 4) == null) {}
+ * {@code result[y >> 4] = new byte[4096];}
* }
- * result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;
+ * {@code result[y >> 4][((y & 0xF) << 8) | (z << 4) | x] = blkid;}
* }
*
* while reading a block ID can be done with the following mapping
* function:
*
* byte getBlock(byte[][] result, int x, int y, int z) {
- * if (result[y >> 4) == null) {
+ * {@code if (result[y >> 4) == null) {}
* return (byte)0;
* }
- * return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];
+ * {@code return result[y >> 4][((y & 0xF) << 8) | (z << 4) | x];}
* }
*
*
diff --git a/paper-api/src/main/java/org/bukkit/help/HelpMap.java b/paper-api/src/main/java/org/bukkit/help/HelpMap.java
index 9c1b51be2..43017c841 100644
--- a/paper-api/src/main/java/org/bukkit/help/HelpMap.java
+++ b/paper-api/src/main/java/org/bukkit/help/HelpMap.java
@@ -7,7 +7,7 @@ import java.util.List;
* The HelpMap tracks all help topics registered in a Bukkit server. When the
* server starts up or is reloaded, help is processed and topics are added in
* the following order:
- *
+ *
*
* - General topics are loaded from the help.yml
*
- Plugins load and optionally call {@code addTopic()}
diff --git a/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java b/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java
index 9e712359a..24dfd201b 100644
--- a/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java
+++ b/paper-api/src/main/java/org/bukkit/inventory/EntityEquipment.java
@@ -98,8 +98,8 @@ public interface EntityEquipment {
/**
* Gets the chance of the currently held item being dropped upon this
- * creature's death
- *
+ * creature's death.
+ *
*