diff --git a/paper-api/src/main/java/org/bukkit/RegionAccessor.java b/paper-api/src/main/java/org/bukkit/RegionAccessor.java
index d33ec8f850eb..df345f85b606 100644
--- a/paper-api/src/main/java/org/bukkit/RegionAccessor.java
+++ b/paper-api/src/main/java/org/bukkit/RegionAccessor.java
@@ -101,7 +101,7 @@ default BlockState getBlockState(@NotNull Location location) {
}
/**
- * Gets the {@link BlockState} at the given {@link Location}.
+ * Gets the {@link BlockState} at the given {@link Vector}.
*
* @param location The location of the block state
* @return Block state at the given location
@@ -169,7 +169,7 @@ default BlockData getBlockData(@NotNull Location location) {
}
/**
- * Gets the {@link BlockData} at the given {@link Location}.
+ * Gets the {@link BlockData} at the given {@link Vector}.
*
* @param location The location of the block data
* @return Block data at the given location
@@ -223,7 +223,7 @@ default void setBlockData(@NotNull Location location, @NotNull BlockData blockDa
}
/**
- * Sets the {@link BlockData} at the given {@link Location}.
+ * Sets the {@link BlockData} at the given {@link Vector}.
*
* @param location The location of the block
* @param blockData The block data to set the block to
diff --git a/paper-api/src/main/java/org/bukkit/entity/Mob.java b/paper-api/src/main/java/org/bukkit/entity/Mob.java
index a8c7099f5634..1ab3286a8139 100644
--- a/paper-api/src/main/java/org/bukkit/entity/Mob.java
+++ b/paper-api/src/main/java/org/bukkit/entity/Mob.java
@@ -33,7 +33,7 @@ public interface Mob extends LivingEntity, Lootable, Leashable {
*
*
* @param state a TriState representing the state of the override
- * @deprecated the client no longer allow to change that setting and will not render the entity
+ * @deprecated the client no longer allows to change that setting and will not render the entity
*/
@Deprecated(since = "26.2")
void setDespawnInPeacefulOverride(TriState state);
@@ -48,7 +48,7 @@ public interface Mob extends LivingEntity, Lootable, Leashable {
*
* @return a TriState representing the state of the override
* @see Mob#setDespawnInPeacefulOverride(TriState)
- * @deprecated the client no longer allow to change that setting and will not render the entity
+ * @deprecated the client no longer allows to change that setting and will not render the entity
*/
@Deprecated(since = "26.2")
TriState getDespawnInPeacefulOverride();
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java
index 39fe2f55bf99..cc8cb0d5cc04 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/AreaEffectCloudApplyEvent.java
@@ -33,10 +33,10 @@ public AreaEffectCloud getEntity() {
}
/**
- * Retrieves a mutable list of the effected entities
+ * Retrieves a mutable list of the affected entities
*
* It is important to note that not every entity in this list
- * is guaranteed to be effected. The cloud may die during the
+ * is guaranteed to be affected. The cloud may die during the
* application of its effects due to the depletion of {@link AreaEffectCloud#getDurationOnUse()}
* or {@link AreaEffectCloud#getRadiusOnUse()}
*
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityExhaustionEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityExhaustionEvent.java
index 784b4854d54d..47cbde4889b1 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/EntityExhaustionEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityExhaustionEvent.java
@@ -76,7 +76,7 @@ public void setCancelled(boolean cancel) {
}
/**
- * The reason for why a PlayerExhaustionEvent takes place
+ * The reason for why a EntityExhaustionEvent takes place
*/
public enum ExhaustionReason {
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 9ccdebc77793..5cedbce8445a 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
@@ -127,7 +127,7 @@ public enum RegainReason {
*/
WITHER_SPAWN,
/**
- * When an entity is damaged by the Wither potion effect
+ * When a wither regains health after killing an entity with a wither skull
*/
WITHER,
/**
diff --git a/paper-api/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java
index f085ebdef9de..159aa4c7161f 100644
--- a/paper-api/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java
@@ -54,7 +54,7 @@ public ThrownPotion getPotion() {
}
/**
- * Retrieves a list of all effected entities
+ * Retrieves a list of all affected entities
*
* @return A fresh copy of the affected entity list
*/
diff --git a/paper-api/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/paper-api/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
index 473d12cb22f3..2ab1c8d05886 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java
@@ -164,7 +164,7 @@ public void disallow(@NotNull final Result result, @NotNull final Component mess
* @param message Kick message to display to the user
* @deprecated This method uses a deprecated enum from {@link
* PlayerPreLoginEvent}
- * @see #disallow(Result, String)
+ * @see #disallow(Result, Component)
*/
@Deprecated
public void disallow(@NotNull final PlayerPreLoginEvent.Result result, @NotNull final net.kyori.adventure.text.Component message) {
diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerShearEntityEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerShearEntityEvent.java
index 29179b6b330d..764b299c8481 100644
--- a/paper-api/src/main/java/org/bukkit/event/player/PlayerShearEntityEvent.java
+++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerShearEntityEvent.java
@@ -32,7 +32,7 @@ public PlayerShearEntityEvent(@NotNull Player player, @NotNull Entity entity, @N
this.entity = entity;
this.item = item;
this.hand = hand;
- this.drops = drops;
+ this.drops = List.copyOf(drops);
}
@ApiStatus.Internal
diff --git a/paper-server/src/main/java/ca/spottedleaf/moonrise/common/util/EntityUtil.java b/paper-server/src/main/java/ca/spottedleaf/moonrise/common/util/EntityUtil.java
index db5805298d33..acb2f6fe799d 100644
--- a/paper-server/src/main/java/ca/spottedleaf/moonrise/common/util/EntityUtil.java
+++ b/paper-server/src/main/java/ca/spottedleaf/moonrise/common/util/EntityUtil.java
@@ -25,7 +25,7 @@ private static String dumpEntityWithoutReferences(final Entity entity) {
return "{type=" + entity.getClass().getSimpleName() + ",id=" + entity.getId() + ",uuid=" + entity.getUUID() + ",pos=" + formatVec(entity.position())
+ ",mot=" + formatVec(entity.getDeltaMovement()) + ",aabb=" + entity.getBoundingBox() + ",removed=" + entity.getRemovalReason() + ",has_vehicle=" + (entity.getVehicle() != null)
- + ",passenger_count=" + entity.getPassengers().size();
+ + ",passenger_count=" + entity.getPassengers().size() + "}";
}
public static String dumpEntity(final Entity entity) {
diff --git a/paper-server/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitBrigForwardingMap.java b/paper-server/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitBrigForwardingMap.java
index d08ca38b4f04..3bdd51a3dbd1 100644
--- a/paper-server/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitBrigForwardingMap.java
+++ b/paper-server/src/main/java/io/papermc/paper/command/brigadier/bukkit/BukkitBrigForwardingMap.java
@@ -69,8 +69,8 @@ public boolean containsValue(@Nullable final Object value) {
for (CommandNode child : this.getDispatcher().getRoot().getChildren()) {
// If child is a bukkit command node, we can convert it!
- if (child instanceof BukkitCommandNode bukkitCommandNode) {
- return bukkitCommandNode.getBukkitCommand().equals(value);
+ if (child instanceof BukkitCommandNode bukkitCommandNode && bukkitCommandNode.getBukkitCommand().equals(value)) {
+ return true;
}
}
diff --git a/paper-server/src/main/java/io/papermc/paper/command/subcommands/MobcapsCommand.java b/paper-server/src/main/java/io/papermc/paper/command/subcommands/MobcapsCommand.java
index 4bee7701f7c5..86ea6ada75e1 100644
--- a/paper-server/src/main/java/io/papermc/paper/command/subcommands/MobcapsCommand.java
+++ b/paper-server/src/main/java/io/papermc/paper/command/subcommands/MobcapsCommand.java
@@ -146,7 +146,7 @@ private void printPlayerMobcaps(final CommandSender sender, final String[] args)
if (sender instanceof Player pl) {
player = pl;
} else {
- sender.sendMessage(Component.text("Must specify a player! ex: '/paper playermobcount playerName'", NamedTextColor.RED));
+ sender.sendMessage(Component.text("Must specify a player! ex: '/paper playermobcaps playerName'", NamedTextColor.RED));
return;
}
} else if (args.length == 1) {
diff --git a/paper-server/src/main/java/io/papermc/paper/configuration/transformation/global/versioned/V31_AllowNetherPropertiesToConfig.java b/paper-server/src/main/java/io/papermc/paper/configuration/transformation/global/versioned/V31_AllowNetherPropertiesToConfig.java
index 8b8e19c555ed..e91a5e497574 100644
--- a/paper-server/src/main/java/io/papermc/paper/configuration/transformation/global/versioned/V31_AllowNetherPropertiesToConfig.java
+++ b/paper-server/src/main/java/io/papermc/paper/configuration/transformation/global/versioned/V31_AllowNetherPropertiesToConfig.java
@@ -22,7 +22,7 @@ public void apply(final ConfigurationNode root) throws ConfigurateException {
final String raw = server.settings.getProperties().properties.getProperty("allow-nether");
if (raw != null) {
final ConfigurationNode node = root.node("misc", "enable-nether");
- node.set(raw.equals("true"));
+ node.set(Boolean.parseBoolean(raw));
server.settings.update((config) -> {
final Properties newProps = new Properties(config.properties);
newProps.remove("allow-nether");
diff --git a/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperConsumable.java b/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperConsumable.java
index c15bf575d602..b7727bbdc778 100644
--- a/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperConsumable.java
+++ b/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperConsumable.java
@@ -59,6 +59,7 @@ public Consumable.Builder toBuilder() {
.consumeSeconds(this.consumeSeconds())
.animation(this.animation())
.sound(this.sound())
+ .hasConsumeParticles(this.hasConsumeParticles())
.addEffects(this.consumeEffects());
}
diff --git a/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperWrittenBookContent.java b/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperWrittenBookContent.java
index b2d30bac03d5..da0a536499a7 100644
--- a/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperWrittenBookContent.java
+++ b/paper-server/src/main/java/io/papermc/paper/datacomponent/item/PaperWrittenBookContent.java
@@ -63,7 +63,7 @@ public boolean resolved() {
public Book asBook() {
final Filtered title = this.title();
return Book.book(
- Component.text(Objects.requireNonNull(title.filtered(), title::raw)),
+ Component.text(Objects.requireNonNullElseGet(title.filtered(), title::raw)),
Component.text(this.author()),
this.pages()
.stream()
diff --git a/paper-server/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java b/paper-server/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java
index 3043a4216ec1..e0379ef04f25 100644
--- a/paper-server/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java
+++ b/paper-server/src/main/java/io/papermc/paper/plugin/provider/configuration/serializer/constraints/PluginConfigConstraints.java
@@ -32,7 +32,7 @@ public Constraint make(PluginName data, Type type) {
return value -> {
if (value != null) {
if (RESERVED_KEYS.contains(value.toLowerCase(Locale.ROOT))) {
- throw new SerializationException("Restricted name, cannot use '%s' as a plugin name.".formatted(data));
+ throw new SerializationException("Restricted name, cannot use '%s' as a plugin name.".formatted(value));
} else if (value.indexOf(' ') != -1) {
// For legacy reasons, the space condition has a separate exception message.
throw new SerializationException("Restricted name, cannot use 0x20 (space character) in a plugin name.");
diff --git a/paper-server/src/main/java/io/papermc/paper/plugin/util/NamespaceChecker.java b/paper-server/src/main/java/io/papermc/paper/plugin/util/NamespaceChecker.java
index fd55fd1d6518..360ab39cc8a5 100644
--- a/paper-server/src/main/java/io/papermc/paper/plugin/util/NamespaceChecker.java
+++ b/paper-server/src/main/java/io/papermc/paper/plugin/util/NamespaceChecker.java
@@ -10,7 +10,7 @@ public class NamespaceChecker {
"net.minecraft.",
"org.bukkit.",
"io.papermc.paper.",
- "com.destroystokoyo.paper."
+ "com.destroystokyo.paper."
};
/**
diff --git a/paper-server/src/main/java/io/papermc/paper/potion/PaperPotionBrewer.java b/paper-server/src/main/java/io/papermc/paper/potion/PaperPotionBrewer.java
index 9bba6ce4d4f9..0946560c575d 100644
--- a/paper-server/src/main/java/io/papermc/paper/potion/PaperPotionBrewer.java
+++ b/paper-server/src/main/java/io/papermc/paper/potion/PaperPotionBrewer.java
@@ -35,7 +35,7 @@ public Collection getEffects(PotionType type, boolean upgraded, bo
}
final org.bukkit.potion.PotionType effectivePotionType = org.bukkit.Registry.POTION.get(effectiveKey);
- Preconditions.checkNotNull(type, "Unknown potion type from data " + effectiveKey.asMinimalString()); // Legacy error message in 1.20.4
+ Preconditions.checkNotNull(effectivePotionType, "Unknown potion type from data " + effectiveKey.asMinimalString()); // Legacy error message in 1.20.4
return effectivePotionType.getPotionEffects();
}
diff --git a/paper-server/src/main/java/io/papermc/paper/registry/HolderableBase.java b/paper-server/src/main/java/io/papermc/paper/registry/HolderableBase.java
index 1881884d30c9..dcfb068e896f 100644
--- a/paper-server/src/main/java/io/papermc/paper/registry/HolderableBase.java
+++ b/paper-server/src/main/java/io/papermc/paper/registry/HolderableBase.java
@@ -34,7 +34,7 @@ public final boolean equals(final Object obj) {
}
@Override
- public String toString() {
+ public final String toString() {
return Holderable.super.implToString();
}
diff --git a/paper-server/src/main/java/io/papermc/paper/util/OldEnumHolderable.java b/paper-server/src/main/java/io/papermc/paper/util/OldEnumHolderable.java
index 5b1fa5bd5495..ed6d2bea1683 100644
--- a/paper-server/src/main/java/io/papermc/paper/util/OldEnumHolderable.java
+++ b/paper-server/src/main/java/io/papermc/paper/util/OldEnumHolderable.java
@@ -60,9 +60,4 @@ public int ordinal() {
private void checkIsReference() {
Preconditions.checkState(this.holder.kind() == Holder.Kind.REFERENCE, "Cannot call method for this registry item, because it is not registered.");
}
-
- @Override
- public String toString() {
- return this.implToString();
- }
}
diff --git a/paper-server/src/main/java/io/papermc/paper/util/SizeLimitedSet.java b/paper-server/src/main/java/io/papermc/paper/util/SizeLimitedSet.java
index 1eee077b1e2c..c41f02ee9d3b 100644
--- a/paper-server/src/main/java/io/papermc/paper/util/SizeLimitedSet.java
+++ b/paper-server/src/main/java/io/papermc/paper/util/SizeLimitedSet.java
@@ -27,7 +27,7 @@ public boolean add(final E element) {
@Override
public boolean addAll(final Collection extends @Nullable E> collection) {
- if ((collection.size() + this.size()) >= this.maxSize) {
+ if ((collection.size() + this.size()) > this.maxSize) {
return false;
}
boolean edited = false;
diff --git a/paper-server/src/main/java/io/papermc/paper/world/migration/VanillaWorldMigration.java b/paper-server/src/main/java/io/papermc/paper/world/migration/VanillaWorldMigration.java
index 00ab529b50f3..e99696f2cbb6 100644
--- a/paper-server/src/main/java/io/papermc/paper/world/migration/VanillaWorldMigration.java
+++ b/paper-server/src/main/java/io/papermc/paper/world/migration/VanillaWorldMigration.java
@@ -124,8 +124,7 @@ private static void migrateLegacyPdc(
targetStorage.set(PaperWorldPDC.TYPE, pdc);
targetStorage.saveAndJoin();
- WorldMigrationSupport.clearLegacyPdc(levelData);
- context.rootAccess().saveLevelData(levelData);
+ context.rootAccess().saveLevelData(WorldMigrationSupport.clearLegacyPdc(levelData));
}
}
diff --git a/paper-server/src/main/java/io/papermc/paper/world/migration/WorldMigrationSupport.java b/paper-server/src/main/java/io/papermc/paper/world/migration/WorldMigrationSupport.java
index f961539a3e38..d94e2ee43c15 100644
--- a/paper-server/src/main/java/io/papermc/paper/world/migration/WorldMigrationSupport.java
+++ b/paper-server/src/main/java/io/papermc/paper/world/migration/WorldMigrationSupport.java
@@ -45,8 +45,8 @@ private WorldMigrationSupport() {
.orElse(null);
}
- static void clearLegacyPdc(final Dynamic> levelData) {
- levelData.remove("BukkitValues");
+ static Dynamic> clearLegacyPdc(final Dynamic> levelData) {
+ return levelData.remove("BukkitValues");
}
static @Nullable UUID readLegacyUuid(final Path sourceRoot) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index f020f310c4bc..f8254b3ec264 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -100,7 +100,7 @@ public int getZ() {
@Override
public String toString() {
- return "CraftChunk{" + "x=" + this.getX() + "z=" + this.getZ() + '}';
+ return "CraftChunk{" + "x=" + this.getX() + ", z=" + this.getZ() + '}';
}
@Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
index d91961f17a39..cdf4c5d9751d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
@@ -253,7 +253,6 @@ public ParticleOptions createParticleParam(Particle.GeyserBase data) {
add("instant_effect", spellFunction);
add("geyser", geyser);
add("geyser_plume", geyser);
- add("geyser", geyser);
add("geyser_base", geyserBase);
add("geyser_poof", geyserBase);
}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/AttributeMappings.java b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/AttributeMappings.java
index 7bcaef769727..1ce92de9daac 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/AttributeMappings.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/AttributeMappings.java
@@ -16,7 +16,7 @@ final class AttributeMappings {
add(6967552254039378640L, -9116175396973475259L, "enchantment.aqua_affinity");
add(5279725409867744698L, -5150363631200102632L, "attacking");
add(148071211714102867L, -7685811609035173472L, "attacking");
- add(6196088217904236654L, -7493791321850887290L, "effect.minining_fatigue");
+ add(6196088217904236654L, -7493791321850887290L, "effect.mining_fatigue");
add(-5084161844451524480L, -8859020046251006329L, "enchantment.soul_speed");
add(-7907339078496465106L, -8112074600724210224L, "enchantment.swift_sneak");
add(6688265815086220243L, -6545541163342161890L, "drinking");
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
index b824e8527bac..1de6da30ac7e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
@@ -172,7 +172,7 @@ public static SpawnRule fromMinecraftRule(SpawnData.CustomSpawnRules rule) {
InclusiveRange blockLight = rule.blockLightLimit();
InclusiveRange skyLight = rule.skyLightLimit();
- return new SpawnRule(blockLight.maxInclusive(), blockLight.maxInclusive(), skyLight.minInclusive(), skyLight.maxInclusive());
+ return new SpawnRule(blockLight.minInclusive(), blockLight.maxInclusive(), skyLight.minInclusive(), skyLight.maxInclusive());
}
@Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
index 9802062711bd..908ad781e772 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
@@ -61,7 +61,7 @@ public void setCurrentBoostTicks(int ticks) {
}
int max = this.getHandle().steering.boostTimeTotal();
- Preconditions.checkArgument(ticks >= 0 && ticks <= max, "boost ticks must not exceed 0 or %s (inclusive)", max);
+ Preconditions.checkArgument(ticks >= 0 && ticks <= max, "boost ticks must be between 0 and %s (inclusive)", max);
this.getHandle().steering.boostTime = ticks;
}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
index 5f9002b16c71..23121ced8bfb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
@@ -63,7 +63,7 @@ public void setCurrentBoostTicks(int ticks) {
}
int max = this.getHandle().steering.boostTimeTotal();
- Preconditions.checkArgument(ticks >= 0 && ticks <= max, "boost ticks must not exceed 0 or %s (inclusive)", max);
+ Preconditions.checkArgument(ticks >= 0 && ticks <= max, "boost ticks must be between 0 and %s (inclusive)", max);
this.getHandle().steering.boostTime = ticks;
}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index a5ea91906abe..0ac92cbdb35d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -576,7 +576,7 @@ public static PlayerBucketEmptyEvent callPlayerBucketEmptyEvent(Level level, net
}
public static PlayerBucketFillEvent callPlayerBucketFillEvent(Level level, net.minecraft.world.entity.player.Player player, BlockPos changed, BlockPos clicked, Direction clickedFace, ItemStack itemInHand, net.minecraft.world.item.Item bucket, InteractionHand hand) {
- return (PlayerBucketFillEvent) CraftEventFactory.getPlayerBucketEvent(true, level, player, clicked, changed, clickedFace, itemInHand, bucket, hand);
+ return (PlayerBucketFillEvent) CraftEventFactory.getPlayerBucketEvent(true, level, player, changed, clicked, clickedFace, itemInHand, bucket, hand);
}
private static PlayerEvent getPlayerBucketEvent(boolean isFilling, Level level, net.minecraft.world.entity.player.Player player, BlockPos changed, BlockPos clicked, Direction clickedFace, ItemStack bucket, net.minecraft.world.item.Item item, InteractionHand hand) {
@@ -762,8 +762,7 @@ public static boolean doEntityAddEventCalling(Level level, Entity entity, SpawnR
// Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above)
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = level.spigotConfig.expMerge;
- event = CraftEventFactory.callEntitySpawnEvent(entity); // Call spawn event for ExperienceOrb entities
- if (radius > 0 && !event.isCancelled() && !entity.isRemoved()) {
+ if (radius > 0) {
// Paper start - Maximum exp value when merging; Whole section has been tweaked, see comments for specifics
final long maxValue = level.paperConfig().entities.behavior.experienceMergeMaxValue;
final boolean mergeUnconditionally = maxValue <= 0;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
index 6cd5078fec87..bd3e57d1ba9a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
@@ -27,7 +27,7 @@ private static void validateTextureUrl(@Nullable URL url) {
if (url == null) return;
Preconditions.checkArgument(url.getHost().equals(CraftPlayerTextures.MINECRAFT_HOST), "Expected host '%s' but got '%s'", CraftPlayerTextures.MINECRAFT_HOST, url.getHost());
- Preconditions.checkArgument(url.getPath().startsWith(CraftPlayerTextures.MINECRAFT_PATH), "Expected path starting with '%s' but got '%s", CraftPlayerTextures.MINECRAFT_PATH, url.getPath());
+ Preconditions.checkArgument(url.getPath().startsWith(CraftPlayerTextures.MINECRAFT_PATH), "Expected path starting with '%s' but got '%s'", CraftPlayerTextures.MINECRAFT_PATH, url.getPath());
}
private static @Nullable URL parseUrl(@Nullable String urlString) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java
index 2184aa82229e..87fa64ae749a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java
@@ -87,7 +87,7 @@ public void place(RegionAccessor regionAccessor, BlockVector location, boolean i
Preconditions.checkArgument(entityTransformers != null, "EntityTransformers cannot be null");
location.checkFinite();
- Preconditions.checkArgument(integrity >= 0F && integrity <= 1F, "Integrity value (%S) must be between 0 and 1 inclusive", integrity);
+ Preconditions.checkArgument(integrity >= 0F && integrity <= 1F, "Integrity value (%s) must be between 0 and 1 inclusive", integrity);
RandomSource randomSource = new RandomSourceWrapper(random);
StructurePlaceSettings definedstructureinfo = new StructurePlaceSettings()
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 3ac6c7571a20..fadaf706ebde 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -506,7 +506,7 @@ public byte[] serializeEntity(org.bukkit.entity.Entity entity, EntitySerializati
} else {
// Ensure misc flag is not needed
Preconditions.checkArgument(
- nmsEntity.getType().canSerialize() || allowMiscSerialization,
+ e.getType().canSerialize() || allowMiscSerialization,
"Cannot serialize misc non-saveable entity %s(%s) without the MISC flag",
e.getType().toShortString(),
e.getStringUUID()