implements Keyed {
public static final Biome WARM_OCEAN = getBiome("warm_ocean");
public static final Biome LUKEWARM_OCEAN = getBiome("lukewarm_ocean");
public static final Biome COLD_OCEAN = getBiome("cold_ocean");
- public static final Biome DEEP_WARM_OCEAN = getBiome("deep_warm_ocean");
public static final Biome DEEP_LUKEWARM_OCEAN = getBiome("deep_lukewarm_ocean");
public static final Biome DEEP_COLD_OCEAN = getBiome("deep_cold_ocean");
public static final Biome DEEP_FROZEN_OCEAN = getBiome("deep_frozen_ocean");
public static final Biome THE_VOID = getBiome("the_void");
public static final Biome SUNFLOWER_PLAINS = getBiome("sunflower_plains");
- public static final Biome DESERT_LAKES = getBiome("desert_lakes");
- public static final Biome GRAVELLY_MOUNTAINS = getBiome("gravelly_mountains");
+ public static final Biome WINDSWEPT_GRAVELLY_HILLS = getBiome("windswept_gravelly_hills");
public static final Biome FLOWER_FOREST = getBiome("flower_forest");
- public static final Biome TAIGA_MOUNTAINS = getBiome("taiga_mountains");
- public static final Biome SWAMP_HILLS = getBiome("swamp_hills");
public static final Biome ICE_SPIKES = getBiome("ice_spikes");
- public static final Biome MODIFIED_JUNGLE = getBiome("modified_jungle");
- public static final Biome MODIFIED_JUNGLE_EDGE = getBiome("modified_jungle_edge");
- public static final Biome TALL_BIRCH_FOREST = getBiome("tall_birch_forest");
- public static final Biome TALL_BIRCH_HILLS = getBiome("tall_birch_hills");
- public static final Biome DARK_FOREST_HILLS = getBiome("dark_forest_hills");
- public static final Biome SNOWY_TAIGA_MOUNTAINS = getBiome("snowy_taiga_mountains");
- public static final Biome GIANT_SPRUCE_TAIGA = getBiome("giant_spruce_taiga");
- public static final Biome GIANT_SPRUCE_TAIGA_HILLS = getBiome("giant_spruce_taiga_hills");
- public static final Biome MODIFIED_GRAVELLY_MOUNTAINS = getBiome("modified_gravelly_mountains");
- public static final Biome SHATTERED_SAVANNA = getBiome("shattered_savanna");
- public static final Biome SHATTERED_SAVANNA_PLATEAU = getBiome("shattered_savanna_plateau");
+ public static final Biome OLD_GROWTH_BIRCH_FOREST = getBiome("old_growth_birch_forest");
+ public static final Biome OLD_GROWTH_SPRUCE_TAIGA = getBiome("old_growth_spruce_taiga");
+ public static final Biome WINDSWEPT_SAVANNA = getBiome("windswept_savanna");
public static final Biome ERODED_BADLANDS = getBiome("eroded_badlands");
- public static final Biome MODIFIED_WOODED_BADLANDS_PLATEAU = getBiome("modified_wooded_badlands_plateau");
- public static final Biome MODIFIED_BADLANDS_PLATEAU = getBiome("modified_badlands_plateau");
public static final Biome BAMBOO_JUNGLE = getBiome("bamboo_jungle");
- public static final Biome BAMBOO_JUNGLE_HILLS = getBiome("bamboo_jungle_hills");
public static final Biome SOUL_SAND_VALLEY = getBiome("soul_sand_valley");
public static final Biome CRIMSON_FOREST = getBiome("crimson_forest");
public static final Biome WARPED_FOREST = getBiome("warped_forest");
public static final Biome BASALT_DELTAS = getBiome("basalt_deltas");
public static final Biome DRIPSTONE_CAVES = getBiome("dripstone_caves");
public static final Biome LUSH_CAVES = getBiome("lush_caves");
+ public static final Biome MEADOW = getBiome("meadow");
+ public static final Biome GROVE = getBiome("grove");
+ public static final Biome SNOWY_SLOPES = getBiome("snowy_slopes");
+ public static final Biome FROZEN_PEAKS = getBiome("frozen_peaks");
+ public static final Biome JAGGED_PEAKS = getBiome("jagged_peaks");
+ public static final Biome STONY_PEAKS = getBiome("stony_peaks");
/**
* Represents a custom Biome.
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index da0964b1..ce1e1e6c 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -511,4 +511,13 @@ public interface Block extends Metadatable {
*/
@NotNull
VoxelShape getCollisionShape();
+
+ /**
+ * Checks if this block is a valid placement location for the specified
+ * block data.
+ *
+ * @param data the block data to check
+ * @return true
if the block data can be placed here
+ */
+ boolean canPlace(@NotNull BlockData data);
}
diff --git a/src/main/java/org/bukkit/entity/ItemFrame.java b/src/main/java/org/bukkit/entity/ItemFrame.java
index 1568bd66..b688b385 100644
--- a/src/main/java/org/bukkit/entity/ItemFrame.java
+++ b/src/main/java/org/bukkit/entity/ItemFrame.java
@@ -106,7 +106,7 @@ public interface ItemFrame extends Hanging {
* damage, interaction, pistons, or missing supporting blocks), rotate the
* item or place/remove items.
*
- * @param visible whether the item frame is fixed or not
+ * @param fixed whether the item frame is fixed or not
*/
- void setFixed(boolean visible);
+ void setFixed(boolean fixed);
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index cd4599b0..0213fe48 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -21,6 +21,7 @@ import org.bukkit.conversations.Conversable;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockDropItemEvent;
import org.bukkit.event.player.PlayerResourcePackStatusEvent;
+import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.map.MapView;
import org.bukkit.plugin.Plugin;
@@ -460,24 +461,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
public void sendBlockDamage(@NotNull Location loc, float progress);
/**
- * Send a chunk change. This fakes a chunk change packet for a user at a
- * certain location. The updated cuboid must be entirely within a single
- * chunk. This will not actually change the world in any way.
- *
- * At least one of the dimensions of the cuboid must be even. The size of
- * the data buffer must be 2.5*sx*sy*sz and formatted in accordance with
- * the Packet51 format.
+ * Send the equipment change of an entity. This fakes the equipment change
+ * of an entity for a user. This will not actually change the inventory of
+ * the specified entity in any way.
*
- * @param loc The location of the cuboid
- * @param sx The x size of the cuboid
- * @param sy The y size of the cuboid
- * @param sz The z size of the cuboid
- * @param data The data to be sent
- * @return true if the chunk change packet was sent
- * @deprecated Magic value
+ * @param entity The entity that the player will see the change for
+ * @param slot The slot of the spoofed equipment change
+ * @param item The ItemStack to display for the player
*/
- @Deprecated
- public boolean sendChunkChange(@NotNull Location loc, int sx, int sy, int sz, @NotNull byte[] data);
+ public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
/**
* Send a sign change. This fakes a sign change packet for a user at
@@ -778,6 +770,39 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public boolean canSee(@NotNull Player player);
+ /**
+ * Visually hides an entity from this player.
+ *
+ * @param plugin Plugin that wants to hide the entity
+ * @param entity Entity to hide
+ * @deprecated draft API
+ */
+ @Deprecated
+ public void hideEntity(@NotNull Plugin plugin, @NotNull Entity entity);
+
+ /**
+ * Allows this player to see an entity that was previously hidden. If
+ * another another plugin had hidden the entity too, then the entity will
+ * remain hidden until the other plugin calls this method too.
+ *
+ * @param plugin Plugin that wants to show the entity
+ * @param entity Entity to show
+ * @deprecated draft API
+ */
+ @Deprecated
+ public void showEntity(@NotNull Plugin plugin, @NotNull Entity entity);
+
+ /**
+ * Checks to see if an entity has been visually hidden from this player.
+ *
+ * @param entity Entity to check
+ * @return True if the provided entity is not being hidden from this
+ * player
+ * @deprecated draft API
+ */
+ @Deprecated
+ public boolean canSee(@NotNull Entity entity);
+
/**
* Checks to see if this player is currently flying or not.
*
@@ -1275,13 +1300,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
/**
* Gets the player's estimated ping in milliseconds.
*
- * In Vanilla this value represents the average of the response time to the
- * last four application layer ping packets sent. This value does not
- * represent the network round trip time and as such may have less
- * granularity and be impacted by other sources. For these reasons it
- * should not be used for anti-cheat purposes. Its recommended use is
- * only as a qualitative indicator of connection quality (Vanilla
- * uses it for this purpose in the tab list).
+ * In Vanilla this value represents a weighted average of the response time
+ * to application layer ping packets sent. This value does not represent the
+ * network round trip time and as such may have less granularity and be
+ * impacted by other sources. For these reasons it should not be used
+ * for anti-cheat purposes. Its recommended use is only as a
+ * qualitative indicator of connection quality (Vanilla uses it for
+ * this purpose in the tab list).
*
* @return player ping
*/
@@ -1315,4 +1340,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param book The book to open for this player
*/
public void openBook(@NotNull ItemStack book);
+
+ /**
+ * Shows the demo screen to the player, this screen is normally only seen in
+ * the demo version of the game.
+ *
+ * Servers can modify the text on this screen using a resource pack.
+ */
+ public void showDemoScreen();
+
+ /**
+ * Gets whether the player has the "Allow Server Listings" setting enabled.
+ *
+ * @return whether the player allows server listings
+ */
+ public boolean isAllowingServerListings();
}
diff --git a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
index 7a2a58ba..cc5e2fef 100644
--- a/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
+++ b/src/main/java/org/bukkit/event/server/ServerListPingEvent.java
@@ -3,6 +3,7 @@ package org.bukkit.event.server;
import java.net.InetAddress;
import java.util.Iterator;
import org.apache.commons.lang.Validate;
+import org.bukkit.Bukkit;
import org.bukkit.UndefinedNullability;
import org.bukkit.entity.Player;
import org.bukkit.event.HandlerList;
@@ -12,6 +13,9 @@ import org.jetbrains.annotations.NotNull;
/**
* Called when a server list ping is coming in. Displayed players can be
* checked and removed by {@link #iterator() iterating} over this event.
+ *
+ * Note: The players in {@link #iterator()} will not be shown in the
+ * server info if {@link Bukkit#getHideOnlinePlayers()} is true.
*/
public class ServerListPingEvent extends ServerEvent implements Iterable {
private static final int MAGIC_PLAYER_COUNT = Integer.MIN_VALUE;
@@ -142,6 +146,9 @@ public class ServerListPingEvent extends ServerEvent implements Iterable
* player to not be displayed on the player list, decrease the size
* returned by {@link #getNumPlayers()}, and will not be returned again by
* any new iterator.
+ *
+ * Note: The players here will not be shown in the server info if
+ * {@link Bukkit#getHideOnlinePlayers()} is true.
*
* @throws UnsupportedOperationException if the caller of this event does
* not support removing players
diff --git a/src/main/java/org/bukkit/map/MapFont.java b/src/main/java/org/bukkit/map/MapFont.java
index 2d599c8f..a45ce819 100644
--- a/src/main/java/org/bukkit/map/MapFont.java
+++ b/src/main/java/org/bukkit/map/MapFont.java
@@ -63,7 +63,14 @@ public class MapFont {
int result = 0;
for (int i = 0; i < text.length(); ++i) {
char ch = text.charAt(i);
- if (ch == ChatColor.COLOR_CHAR) continue;
+ if (ch == ChatColor.COLOR_CHAR) {
+ int j = text.indexOf(';', i);
+ if (j >= 0) {
+ i = j;
+ continue;
+ }
+ throw new IllegalArgumentException("Text contains unterminated color string");
+ }
result += chars.get(ch).getWidth();
}
result += text.length() - 1; // Account for 1px spacing between characters
diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java
index 497775f7..728fc46d 100644
--- a/src/main/java/org/bukkit/permissions/PermissibleBase.java
+++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java
@@ -16,17 +16,14 @@ import org.jetbrains.annotations.Nullable;
* Base Permissible for use in any Permissible object via proxy or extension
*/
public class PermissibleBase implements Permissible {
- private ServerOperator opable;
- private Permissible parent = this;
+ private final ServerOperator opable;
+ private final Permissible parent;
private final List attachments = new LinkedList();
private final Map permissions = new HashMap();
public PermissibleBase(@Nullable ServerOperator opable) {
this.opable = opable;
-
- if (opable instanceof Permissible) {
- this.parent = (Permissible) opable;
- }
+ this.parent = (opable instanceof Permissible) ? (Permissible) opable : this;
recalculatePermissions();
}
@@ -144,8 +141,7 @@ public class PermissibleBase implements Permissible {
throw new IllegalArgumentException("Attachment cannot be null");
}
- if (attachments.contains(attachment)) {
- attachments.remove(attachment);
+ if (attachments.remove(attachment)) {
PermissionRemovedExecutor ex = attachment.getRemovalCallback();
if (ex != null) {
@@ -253,7 +249,7 @@ public class PermissibleBase implements Permissible {
}
private static class RemoveAttachmentRunnable implements Runnable {
- private PermissionAttachment attachment;
+ private final PermissionAttachment attachment;
public RemoveAttachmentRunnable(@NotNull PermissionAttachment attachment) {
this.attachment = attachment;
diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
index 939afec1..6d634b0e 100644
--- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java
@@ -121,7 +121,7 @@ class LibraryLoader
} );
}
- URLClassLoader loader = new URLClassLoader( jarFiles.toArray( new URL[ jarFiles.size() ] ) );
+ URLClassLoader loader = new URLClassLoader( jarFiles.toArray( new URL[ jarFiles.size() ] ), getClass().getClassLoader() );
return loader;
}
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
index 00f71139..e451957c 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -9,6 +9,7 @@ import org.bukkit.Color;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
+import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -21,166 +22,166 @@ public abstract class PotionEffectType implements Keyed {
/**
* Increases movement speed.
*/
- public static final PotionEffectType SPEED = getPotionEffectType("speed", 1);
+ public static final PotionEffectType SPEED = getPotionEffectType(1, "speed");
/**
* Decreases movement speed.
*/
- public static final PotionEffectType SLOWNESS = getPotionEffectType("slowness", 2);
+ public static final PotionEffectType SLOWNESS = getPotionEffectType(2, "slowness");
/**
* Increases dig speed.
*/
- public static final PotionEffectType HASTE = getPotionEffectType("haste", 3);
+ public static final PotionEffectType HASTE = getPotionEffectType(3, "haste");
/**
* Decreases dig speed.
*/
- public static final PotionEffectType MINING_FATIGUE = getPotionEffectType("mining_fatigue", 4);
+ public static final PotionEffectType MINING_FATIGUE = getPotionEffectType(4, "mining_fatigue");
/**
* Increases damage dealt.
*/
- public static final PotionEffectType STRENGTH = getPotionEffectType("strength", 5);
+ public static final PotionEffectType STRENGTH = getPotionEffectType(5, "strength");
/**
* Heals an entity.
*/
- public static final PotionEffectType INSTANT_HEALTH = getPotionEffectType("instant_health", 6);
+ public static final PotionEffectType INSTANT_HEALTH = getPotionEffectType(6, "instant_health");
/**
* Hurts an entity.
*/
- public static final PotionEffectType INSTANT_DAMAGE = getPotionEffectType("instant_damage", 7);
+ public static final PotionEffectType INSTANT_DAMAGE = getPotionEffectType(7, "instant_damage");
/**
* Increases jump height.
*/
- public static final PotionEffectType JUMP_BOOST = getPotionEffectType("jump_boost", 8);
+ public static final PotionEffectType JUMP_BOOST = getPotionEffectType(8, "jump_boost");
/**
* Warps vision on the client.
*/
- public static final PotionEffectType NAUSEA = getPotionEffectType("nausea", 9);
+ public static final PotionEffectType NAUSEA = getPotionEffectType(9, "nausea");
/**
* Regenerates health.
*/
- public static final PotionEffectType REGENERATION = getPotionEffectType("regeneration", 10);
+ public static final PotionEffectType REGENERATION = getPotionEffectType(10, "regeneration");
/**
* Decreases damage dealt to an entity.
*/
- public static final PotionEffectType RESISTANCE = getPotionEffectType("resistance", 11);
+ public static final PotionEffectType RESISTANCE = getPotionEffectType(11, "resistance");
/**
* Stops fire damage.
*/
- public static final PotionEffectType FIRE_RESISTANCE = getPotionEffectType("fire_resistance", 12);
+ public static final PotionEffectType FIRE_RESISTANCE = getPotionEffectType(12, "fire_resistance");
/**
* Allows breathing underwater.
*/
- public static final PotionEffectType WATER_BREATHING = getPotionEffectType("water_breathing", 13);
+ public static final PotionEffectType WATER_BREATHING = getPotionEffectType(13, "water_breathing");
/**
* Grants invisibility.
*/
- public static final PotionEffectType INVISIBILITY = getPotionEffectType("invisibility", 14);
+ public static final PotionEffectType INVISIBILITY = getPotionEffectType(14, "invisibility");
/**
* Blinds an entity.
*/
- public static final PotionEffectType BLINDNESS = getPotionEffectType("blindness", 15);
+ public static final PotionEffectType BLINDNESS = getPotionEffectType(15, "blindness");
/**
* Allows an entity to see in the dark.
*/
- public static final PotionEffectType NIGHT_VISION = getPotionEffectType("night_vision", 16);
+ public static final PotionEffectType NIGHT_VISION = getPotionEffectType(16, "night_vision");
/**
* Increases hunger.
*/
- public static final PotionEffectType HUNGER = getPotionEffectType("hunger", 17);
+ public static final PotionEffectType HUNGER = getPotionEffectType(17, "hunger");
/**
* Decreases damage dealt by an entity.
*/
- public static final PotionEffectType WEAKNESS = getPotionEffectType("weakness", 18);
+ public static final PotionEffectType WEAKNESS = getPotionEffectType(18, "weakness");
/**
* Deals damage to an entity over time.
*/
- public static final PotionEffectType POISON = getPotionEffectType("poison", 19);
+ public static final PotionEffectType POISON = getPotionEffectType(19, "poison");
/**
* Deals damage to an entity over time and gives the health to the
* shooter.
*/
- public static final PotionEffectType WITHER = getPotionEffectType("wither", 20);
+ public static final PotionEffectType WITHER = getPotionEffectType(20, "wither");
/**
* Increases the maximum health of an entity.
*/
- public static final PotionEffectType HEALTH_BOOST = getPotionEffectType("health_boost", 21);
+ public static final PotionEffectType HEALTH_BOOST = getPotionEffectType(21, "health_boost");
/**
* Increases the maximum health of an entity with health that cannot be
* regenerated, but is refilled every 30 seconds.
*/
- public static final PotionEffectType ABSORPTION = getPotionEffectType("absorption", 22);
+ public static final PotionEffectType ABSORPTION = getPotionEffectType(22, "absorption");
/**
* Increases the food level of an entity each tick.
*/
- public static final PotionEffectType SATURATION = getPotionEffectType("saturation", 23);
+ public static final PotionEffectType SATURATION = getPotionEffectType(23, "saturation");
/**
* Outlines the entity so that it can be seen from afar.
*/
- public static final PotionEffectType GLOWING = getPotionEffectType("glowing", 24);
+ public static final PotionEffectType GLOWING = getPotionEffectType(24, "glowing");
/**
* Causes the entity to float into the air.
*/
- public static final PotionEffectType LEVITATION = getPotionEffectType("levitation", 25);
+ public static final PotionEffectType LEVITATION = getPotionEffectType(25, "levitation");
/**
* Loot table luck.
*/
- public static final PotionEffectType LUCK = getPotionEffectType("luck", 26);
+ public static final PotionEffectType LUCK = getPotionEffectType(26, "luck");
/**
* Loot table unluck.
*/
- public static final PotionEffectType UNLUCK = getPotionEffectType("unluck", 27);
+ public static final PotionEffectType UNLUCK = getPotionEffectType(27, "unluck");
/**
* Slows entity fall rate.
*/
- public static final PotionEffectType SLOW_FALLING = getPotionEffectType("slow_falling", 28);
+ public static final PotionEffectType SLOW_FALLING = getPotionEffectType(28, "slow_falling");
/**
* Effects granted by a nearby conduit. Includes enhanced underwater abilities.
*/
- public static final PotionEffectType CONDUIT_POWER = getPotionEffectType("conduit_power", 29);
+ public static final PotionEffectType CONDUIT_POWER = getPotionEffectType(29, "conduit_power");
/**
* Squee'ek uh'k kk'kkkk squeek eee'eek.
*/
- public static final PotionEffectType DOLPHINS_GRACE = getPotionEffectType("dolphins_grace", 30);
+ public static final PotionEffectType DOLPHINS_GRACE = getPotionEffectType(30, "dolphins_grace");
/**
* oof.
*/
- public static final PotionEffectType BAD_OMEN = getPotionEffectType("bad_omen", 31);
+ public static final PotionEffectType BAD_OMEN = getPotionEffectType(31, "bad_omen");
/**
* \o/.
*/
- public static final PotionEffectType HERO_OF_THE_VILLAGE = getPotionEffectType("hero_of_the_village", 32);
+ public static final PotionEffectType HERO_OF_THE_VILLAGE = getPotionEffectType(32, "hero_of_the_village");
- private static PotionEffectType getPotionEffectType(@NotNull String key, int typeId) {
+ private static PotionEffectType getPotionEffectType(int typeId, @NotNull String key) {
NamespacedKey namespacedKey = NamespacedKey.minecraft(key);
PotionEffectType potionEffectType = Registry.POTION_EFFECT_TYPE.get(namespacedKey);
Preconditions.checkNotNull(potionEffectType, "No PotionEffectType found for %s. This is a bug.", namespacedKey);
@@ -247,6 +248,18 @@ public abstract class PotionEffectType implements Keyed {
@Deprecated
public abstract String getName();
+ /**
+ * Gets the PotionEffectType at the specified key
+ *
+ * @param key key to fetch
+ * @return Resulting PotionEffectType, or null if not found
+ */
+ @Contract("null -> null")
+ @Nullable
+ public static PotionEffectType getByKey(@Nullable NamespacedKey key) {
+ return Registry.POTION_EFFECT_TYPE.get(key);
+ }
+
/**
* Gets the effect type specified by the unique id.
*
diff --git a/src/main/java/org/bukkit/scoreboard/Objective.java b/src/main/java/org/bukkit/scoreboard/Objective.java
index 7277f62d..ff3fcb26 100644
--- a/src/main/java/org/bukkit/scoreboard/Objective.java
+++ b/src/main/java/org/bukkit/scoreboard/Objective.java
@@ -130,7 +130,7 @@ public interface Objective {
* @return Score tracking the Objective and entry specified
* @throws IllegalArgumentException if entry is null
* @throws IllegalStateException if this objective has been unregistered
- * @throws IllegalArgumentException if entry is longer than 40 characters.
+ * @throws IllegalArgumentException if entry is longer than 32767 characters.
*/
@NotNull
Score getScore(@NotNull String entry) throws IllegalArgumentException, IllegalStateException;
diff --git a/src/main/java/org/bukkit/scoreboard/Scoreboard.java b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
index d283f694..5c855dbd 100644
--- a/src/main/java/org/bukkit/scoreboard/Scoreboard.java
+++ b/src/main/java/org/bukkit/scoreboard/Scoreboard.java
@@ -17,7 +17,7 @@ public interface Scoreboard {
* @param criteria Criteria for the Objective
* @return The registered Objective
* @throws IllegalArgumentException if name is null
- * @throws IllegalArgumentException if name is longer than 16
+ * @throws IllegalArgumentException if name is longer than 32767
* characters.
* @throws IllegalArgumentException if criteria is null
* @throws IllegalArgumentException if an objective by that name already
@@ -36,7 +36,7 @@ public interface Scoreboard {
* @param displayName Name displayed to players for the Objective.
* @return The registered Objective
* @throws IllegalArgumentException if name is null
- * @throws IllegalArgumentException if name is longer than 16
+ * @throws IllegalArgumentException if name is longer than 32767
* characters.
* @throws IllegalArgumentException if criteria is null
* @throws IllegalArgumentException if displayName is null
@@ -57,7 +57,7 @@ public interface Scoreboard {
* @param renderType Manner of rendering the Objective
* @return The registered Objective
* @throws IllegalArgumentException if name is null
- * @throws IllegalArgumentException if name is longer than 16
+ * @throws IllegalArgumentException if name is longer than 32767
* characters.
* @throws IllegalArgumentException if criteria is null
* @throws IllegalArgumentException if displayName is null