diff --git a/paper-api/pom.xml b/paper-api/pom.xml index b3fb45961f..a99e049851 100644 --- a/paper-api/pom.xml +++ b/paper-api/pom.xml @@ -5,7 +5,7 @@ org.bukkit bukkit - 1.15.1-R0.1-SNAPSHOT + 1.15.2-R0.1-SNAPSHOT jar Bukkit @@ -80,7 +80,7 @@ org.jetbrains - annotations-java5 + annotations 18.0.0 provided @@ -88,7 +88,7 @@ junit junit - 4.12 + 4.13 test @@ -100,7 +100,7 @@ org.ow2.asm asm-tree - 7.2 + 7.3.1 test diff --git a/paper-api/src/main/java/org/bukkit/GameRule.java b/paper-api/src/main/java/org/bukkit/GameRule.java index 81a9630ea4..48f8dd6495 100644 --- a/paper-api/src/main/java/org/bukkit/GameRule.java +++ b/paper-api/src/main/java/org/bukkit/GameRule.java @@ -148,6 +148,16 @@ public final class GameRule { */ public static final GameRule FIRE_DAMAGE = new GameRule<>("fireDamage", Boolean.class); + /** + * Whether patrols should naturally spawn. + */ + public static final GameRule DO_PATROL_SPAWNING = new GameRule<>("doPatrolSpawning", Boolean.class); + + /** + * Whether traders should naturally spawn. + */ + public static final GameRule DO_TRADER_SPAWNING = new GameRule<>("doTraderSpawning", Boolean.class); + // Numerical rules /** * How often a random block tick occurs (such as plant growth, leaf decay, diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java index bab86d8049..9d9df827b5 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -16,7 +16,11 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** - * Represents a stack of items + * Represents a stack of items. + *

+ * IMPORTANT: An ItemStack is only designed to contain items. Do not + * use this class to encapsulate Materials for which {@link Material#isItem()} + * returns false. */ public class ItemStack implements Cloneable, ConfigurationSerializable { private Material type = Material.AIR; @@ -28,7 +32,11 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { protected ItemStack() {} /** - * Defaults stack size to 1, with no extra data + * Defaults stack size to 1, with no extra data. + *

+ * IMPORTANT: An ItemStack is only designed to contain + * items. Do not use this class to encapsulate Materials for which + * {@link Material#isItem()} returns false. * * @param type item material */ @@ -37,7 +45,11 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { } /** - * An item stack with no extra data + * An item stack with no extra data. + *

+ * IMPORTANT: An ItemStack is only designed to contain + * items. Do not use this class to encapsulate Materials for which + * {@link Material#isItem()} returns false. * * @param type item material * @param amount stack size @@ -109,7 +121,11 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { /** * Sets the type of this item *

- * Note that in doing so you will reset the MaterialData for this stack + * Note that in doing so you will reset the MaterialData for this stack. + *

+ * IMPORTANT: An ItemStack is only designed to contain + * items. Do not use this class to encapsulate Materials for which + * {@link Material#isItem()} returns false. * * @param type New type to set the items in this stack to */