diff --git a/paper-server/checkstyle.xml b/paper-server/checkstyle.xml
new file mode 100644
index 0000000000..eb51bc2b86
--- /dev/null
+++ b/paper-server/checkstyle.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/paper-server/nms-patches/BlockPiston.patch b/paper-server/nms-patches/BlockPiston.patch
index ebdcfaca90..f8d0d3d3dc 100644
--- a/paper-server/nms-patches/BlockPiston.patch
+++ b/paper-server/nms-patches/BlockPiston.patch
@@ -1,16 +1,12 @@
--- a/net/minecraft/server/BlockPiston.java
+++ b/net/minecraft/server/BlockPiston.java
-@@ -6,6 +6,18 @@
+@@ -6,6 +6,14 @@
import java.util.List;
import java.util.Set;
+// CraftBukkit start
-+import java.util.AbstractList;
-+import java.util.Collection;
-+import java.util.Iterator;
-+import java.util.ListIterator;
-+
+import com.google.common.collect.ImmutableList;
++import java.util.AbstractList;
+import org.bukkit.craftbukkit.block.CraftBlock;
+import org.bukkit.event.block.BlockPistonRetractEvent;
+import org.bukkit.event.block.BlockPistonExtendEvent;
@@ -19,7 +15,7 @@
public class BlockPiston extends BlockDirectional {
public static final BlockStateBoolean EXTENDED = BlockProperties.g;
-@@ -112,6 +124,18 @@
+@@ -112,6 +120,18 @@
}
}
@@ -38,7 +34,7 @@
world.playBlockAction(blockposition, this, b0, enumdirection.a());
}
-@@ -281,6 +305,48 @@
+@@ -281,6 +301,48 @@
IBlockData[] aiblockdata = new IBlockData[j];
EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();
Set set = Sets.newHashSet(list);
diff --git a/paper-server/nms-patches/EntityLiving.patch b/paper-server/nms-patches/EntityLiving.patch
index e26829193e..9763ca8f50 100644
--- a/paper-server/nms-patches/EntityLiving.patch
+++ b/paper-server/nms-patches/EntityLiving.patch
@@ -278,12 +278,10 @@
return true;
} else {
return false;
-@@ -727,14 +869,40 @@
- public boolean cB() {
+@@ -728,13 +870,39 @@
return this.getMonsterType() == EnumMonsterType.UNDEAD;
}
--
-+
+
+ // CraftBukkit start
@Nullable
public MobEffect c(@Nullable MobEffectList mobeffectlist) {
diff --git a/paper-server/nms-patches/EntityPlayer.patch b/paper-server/nms-patches/EntityPlayer.patch
index def82375fc..532bc84370 100644
--- a/paper-server/nms-patches/EntityPlayer.patch
+++ b/paper-server/nms-patches/EntityPlayer.patch
@@ -279,16 +279,15 @@
this.releaseShoulderEntities();
- if (!this.isSpectator()) {
- this.d(damagesource);
-- }
+ // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
+ if (!event.getKeepInventory()) {
+ this.inventory.clear();
-+ }
-+
-+ this.setSpectatorTarget(this); // Remove spectated target
-+ // CraftBukkit end
+ }
- this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.DEATH_COUNT, this.getName(), ScoreboardScore::incrementScore);
++ this.setSpectatorTarget(this); // Remove spectated target
++ // CraftBukkit end
++
+ // CraftBukkit - Get our scores instead
+ this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.DEATH_COUNT, this.getName(), ScoreboardScore::incrementScore);
EntityLiving entityliving = this.getKillingEntity();
diff --git a/paper-server/nms-patches/EntityTrackerEntry.patch b/paper-server/nms-patches/EntityTrackerEntry.patch
index 11aa3109be..dd945fddb3 100644
--- a/paper-server/nms-patches/EntityTrackerEntry.patch
+++ b/paper-server/nms-patches/EntityTrackerEntry.patch
@@ -1,17 +1,17 @@
--- a/net/minecraft/server/EntityTrackerEntry.java
+++ b/net/minecraft/server/EntityTrackerEntry.java
-@@ -8,6 +8,11 @@
- import java.util.function.Consumer;
+@@ -9,6 +9,11 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-+
+
+// CraftBukkit start
+import org.bukkit.entity.Player;
+import org.bukkit.event.player.PlayerVelocityEvent;
+// CraftBukkit end
-
++
public class EntityTrackerEntry {
+ private static final Logger a = LogManager.getLogger();
@@ -29,8 +34,12 @@
private List p;
private boolean q;
diff --git a/paper-server/nms-patches/InventorySubcontainer.patch b/paper-server/nms-patches/InventorySubcontainer.patch
index 961e76a30b..470f422537 100644
--- a/paper-server/nms-patches/InventorySubcontainer.patch
+++ b/paper-server/nms-patches/InventorySubcontainer.patch
@@ -1,11 +1,10 @@
--- a/net/minecraft/server/InventorySubcontainer.java
+++ b/net/minecraft/server/InventorySubcontainer.java
-@@ -4,13 +4,65 @@
+@@ -4,13 +4,64 @@
import java.util.Iterator;
import java.util.List;
+// CraftBukkit start
-+import java.util.List;
+import org.bukkit.Location;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.entity.HumanEntity;
diff --git a/paper-server/nms-patches/ItemSign.patch b/paper-server/nms-patches/ItemSign.patch
index d538a04c07..df9c5018fd 100644
--- a/paper-server/nms-patches/ItemSign.patch
+++ b/paper-server/nms-patches/ItemSign.patch
@@ -5,7 +5,7 @@
public class ItemSign extends ItemBlockWallable {
+ public static boolean openSign; // CraftBukkit
-+
++
public ItemSign(Item.Info item_info, Block block, Block block1) {
super(block, block1, item_info);
}
diff --git a/paper-server/nms-patches/MinecraftServer.patch b/paper-server/nms-patches/MinecraftServer.patch
index 377c389870..e91f7e3ba6 100644
--- a/paper-server/nms-patches/MinecraftServer.patch
+++ b/paper-server/nms-patches/MinecraftServer.patch
@@ -1,12 +1,11 @@
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
-@@ -47,6 +47,14 @@
+@@ -47,6 +47,13 @@
import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
+// CraftBukkit start
+import jline.console.ConsoleReader;
-+import joptsimple.OptionSet;
+import org.bukkit.Bukkit;
+import org.bukkit.craftbukkit.CraftServer;
+import org.bukkit.craftbukkit.Main;
@@ -15,7 +14,7 @@
public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant implements IMojangStatistics, ICommandListener, AutoCloseable, Runnable {
-@@ -65,7 +73,7 @@
+@@ -65,7 +72,7 @@
public final DataFixer dataConverterManager;
private String serverIp;
private int serverPort = -1;
@@ -24,7 +23,7 @@
private PlayerList playerList;
private volatile boolean isRunning = true;
private boolean isStopped;
-@@ -104,7 +112,7 @@
+@@ -104,7 +111,7 @@
private final GameProfileRepository gameProfileRepository;
private final UserCache userCache;
private long Z;
@@ -33,7 +32,7 @@
thread.setUncaughtExceptionHandler((thread1, throwable) -> {
MinecraftServer.LOGGER.error(throwable);
});
-@@ -133,7 +141,20 @@
+@@ -133,7 +140,20 @@
@Nullable
private String av;
@@ -55,7 +54,7 @@
super("Server");
this.ae = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread);
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
-@@ -146,15 +167,15 @@
+@@ -146,15 +166,15 @@
this.ao = new CustomFunctionData(this);
this.ap = new CircularTimer();
this.proxy = proxy;
@@ -75,7 +74,7 @@
this.dataConverterManager = datafixer;
this.ae.a((IReloadListener) this.aj);
this.ae.a((IReloadListener) this.ai);
-@@ -163,7 +184,32 @@
+@@ -163,7 +183,32 @@
this.ae.a((IReloadListener) this.an);
this.executorService = SystemUtils.e();
this.K = s;
@@ -108,7 +107,7 @@
private void initializeScoreboards(WorldPersistentData worldpersistentdata) {
PersistentScoreboard persistentscoreboard = (PersistentScoreboard) worldpersistentdata.a(PersistentScoreboard::new, "scoreboard");
-@@ -199,11 +245,11 @@
+@@ -199,11 +244,11 @@
}
if (this.forceUpgrade) {
@@ -123,7 +122,7 @@
IChatBaseComponent ichatbasecomponent = null;
while (!worldupgrader.b()) {
-@@ -242,8 +288,9 @@
+@@ -242,8 +287,9 @@
}
protected void a(String s, String s1, long i, WorldType worldtype, JsonElement jsonelement) {
@@ -134,7 +133,7 @@
WorldNBTStorage worldnbtstorage = this.getConvertable().a(s, this);
this.a(this.getWorld(), worldnbtstorage);
-@@ -268,24 +315,134 @@
+@@ -268,24 +314,134 @@
}
this.a(worldnbtstorage.getDirectory(), worlddata);
@@ -282,7 +281,7 @@
if (!worlddata.v()) {
try {
-@@ -309,23 +466,8 @@
+@@ -309,23 +465,8 @@
worlddata.d(true);
}
@@ -307,7 +306,7 @@
private void a(WorldData worlddata) {
worlddata.f(false);
-@@ -344,6 +486,25 @@
+@@ -344,6 +485,25 @@
protected void a(File file, WorldData worlddata) {
this.resourcePackRepository.a((ResourcePackSource) (new ResourcePackSourceVanilla()));
this.resourcePackFolder = new ResourcePackSourceFolder(new File(file, "datapacks"));
@@ -333,7 +332,7 @@
this.resourcePackRepository.a((ResourcePackSource) this.resourcePackFolder);
this.resourcePackRepository.a();
List list = Lists.newArrayList();
-@@ -364,11 +525,13 @@
+@@ -364,11 +524,13 @@
this.b(worlddata);
}
@@ -350,7 +349,7 @@
BlockPosition blockposition = worldserver.getSpawn();
worldloadlistener.a(new ChunkCoordIntPair(blockposition));
-@@ -385,11 +548,13 @@
+@@ -385,11 +547,13 @@
this.nextTick += 100L;
this.sleepForTick();
@@ -368,7 +367,7 @@
if (forcedchunk != null) {
WorldServer worldserver1 = this.getWorldServer(dimensionmanager);
-@@ -408,6 +573,8 @@
+@@ -408,6 +572,8 @@
this.sleepForTick();
worldloadlistener.b();
chunkproviderserver.getLightEngine().a(5);
@@ -377,7 +376,7 @@
}
protected void a(String s, WorldNBTStorage worldnbtstorage) {
-@@ -466,8 +633,29 @@
+@@ -466,8 +632,29 @@
this.stop();
}
@@ -407,7 +406,7 @@
if (this.getServerConnection() != null) {
this.getServerConnection().b();
}
-@@ -476,6 +664,7 @@
+@@ -476,6 +663,7 @@
MinecraftServer.LOGGER.info("Saving players");
this.playerList.savePlayers();
this.playerList.shutdown();
@@ -415,7 +414,7 @@
}
MinecraftServer.LOGGER.info("Saving worlds");
-@@ -548,11 +737,13 @@
+@@ -548,11 +736,13 @@
if (i > 2000L && this.nextTick - this.lastOverloadTime >= 15000L) {
long j = i / 50L;
@@ -429,7 +428,7 @@
this.nextTick += 50L;
if (this.T) {
this.T = false;
-@@ -599,6 +790,12 @@
+@@ -599,6 +789,12 @@
} catch (Throwable throwable1) {
MinecraftServer.LOGGER.error("Exception stopping the server", throwable1);
} finally {
@@ -442,7 +441,7 @@
this.exit();
}
-@@ -709,7 +906,7 @@
+@@ -709,7 +905,7 @@
this.serverPing.b().a(agameprofile);
}
@@ -451,7 +450,7 @@
MinecraftServer.LOGGER.debug("Autosave started");
this.methodProfiler.enter("save");
this.playerList.savePlayers();
-@@ -739,27 +936,43 @@
+@@ -739,27 +935,43 @@
}
protected void b(BooleanSupplier booleansupplier) {
@@ -501,7 +500,7 @@
this.methodProfiler.enter("tick");
-@@ -798,7 +1011,8 @@
+@@ -798,7 +1010,8 @@
this.tickables.add(runnable);
}
@@ -511,7 +510,7 @@
OptionParser optionparser = new OptionParser();
OptionSpec optionspec = optionparser.accepts("nogui");
OptionSpec optionspec1 = optionparser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits");
-@@ -821,15 +1035,17 @@
+@@ -821,15 +1034,17 @@
optionparser.printHelpOn(System.err);
return;
}
@@ -531,7 +530,7 @@
MinecraftServer.LOGGER.info("Initialized '" + java_nio_file_path.toAbsolutePath().toString() + "' and '" + java_nio_file_path1.toAbsolutePath().toString() + "'");
return;
}
-@@ -841,14 +1057,15 @@
+@@ -841,14 +1056,15 @@
DispenserRegistry.init();
DispenserRegistry.c();
@@ -550,7 +549,7 @@
dedicatedserver.i((String) optionset.valueOf(optionspec7));
dedicatedserver.setPort((Integer) optionset.valueOf(optionspec10));
dedicatedserver.e(optionset.has(optionspec2));
-@@ -871,6 +1088,25 @@
+@@ -871,6 +1087,25 @@
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(MinecraftServer.LOGGER));
Runtime.getRuntime().addShutdownHook(thread);
@@ -576,7 +575,7 @@
} catch (Exception exception) {
MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception);
}
-@@ -890,7 +1126,9 @@
+@@ -890,7 +1125,9 @@
}
public void startServerThread() {
@@ -586,7 +585,7 @@
}
public File d(String s) {
-@@ -945,7 +1183,7 @@
+@@ -945,7 +1182,7 @@
}
public String getServerModName() {
@@ -595,7 +594,7 @@
}
public CrashReport b(CrashReport crashreport) {
-@@ -984,7 +1222,7 @@
+@@ -984,7 +1221,7 @@
}
public boolean E() {
@@ -604,7 +603,7 @@
}
@Override
-@@ -1480,4 +1718,16 @@
+@@ -1480,4 +1717,16 @@
}
public abstract boolean b(GameProfile gameprofile);
diff --git a/paper-server/nms-patches/PlayerInventory.patch b/paper-server/nms-patches/PlayerInventory.patch
index ab3a3893c1..0b90c81a58 100644
--- a/paper-server/nms-patches/PlayerInventory.patch
+++ b/paper-server/nms-patches/PlayerInventory.patch
@@ -1,14 +1,12 @@
--- a/net/minecraft/server/PlayerInventory.java
+++ b/net/minecraft/server/PlayerInventory.java
-@@ -5,6 +5,15 @@
+@@ -5,6 +5,13 @@
import java.util.List;
import java.util.function.Predicate;
+// CraftBukkit start
+import java.util.ArrayList;
-+import java.util.List;
+import org.bukkit.Location;
-+
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.entity.HumanEntity;
+// CraftBukkit end
@@ -16,7 +14,7 @@
public class PlayerInventory implements IInventory, INamableTileEntity {
public final NonNullList items;
-@@ -16,6 +25,54 @@
+@@ -16,6 +23,54 @@
private ItemStack carried;
private int h;
@@ -71,7 +69,7 @@
public PlayerInventory(EntityHuman entityhuman) {
this.items = NonNullList.a(36, ItemStack.a);
this.armor = NonNullList.a(4, ItemStack.a);
-@@ -41,6 +98,22 @@
+@@ -41,6 +96,22 @@
return itemstack.getItem() == itemstack1.getItem() && ItemStack.equals(itemstack, itemstack1);
}
@@ -94,7 +92,7 @@
public int getFirstEmptySlotIndex() {
for (int i = 0; i < this.items.size(); ++i) {
if (((ItemStack) this.items.get(i)).isEmpty()) {
-@@ -513,8 +586,9 @@
+@@ -513,8 +584,9 @@
ItemStack itemstack = (ItemStack) this.armor.get(i);
if (itemstack.getItem() instanceof ItemArmor) {
@@ -105,7 +103,7 @@
});
}
}
-@@ -550,6 +624,11 @@
+@@ -550,6 +622,11 @@
}
public ItemStack getCarried() {
diff --git a/paper-server/nms-patches/TileEntityFurnace.patch b/paper-server/nms-patches/TileEntityFurnace.patch
index 32af3869ef..5bdbc52759 100644
--- a/paper-server/nms-patches/TileEntityFurnace.patch
+++ b/paper-server/nms-patches/TileEntityFurnace.patch
@@ -1,11 +1,10 @@
--- a/net/minecraft/server/TileEntityFurnace.java
+++ b/net/minecraft/server/TileEntityFurnace.java
-@@ -7,6 +7,17 @@
+@@ -7,6 +7,16 @@
import java.util.Map;
import java.util.Map.Entry;
import javax.annotation.Nullable;
+// CraftBukkit start
-+import java.util.List;
+import org.bukkit.craftbukkit.block.CraftBlock;
+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -18,7 +17,7 @@
public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeHolder, AutoRecipeOutput, ITickable {
-@@ -135,6 +146,36 @@
+@@ -135,6 +145,36 @@
return map;
}
@@ -55,7 +54,7 @@
private static void a(Map- map, Tag
- tag, int i) {
Iterator iterator = tag.a().iterator();
-@@ -211,12 +252,23 @@
+@@ -211,12 +251,23 @@
this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.cookTimeTotal);
}
} else {
@@ -82,7 +81,7 @@
flag1 = true;
if (!itemstack.isEmpty()) {
Item item = itemstack.getItem();
-@@ -278,11 +330,38 @@
+@@ -278,11 +329,38 @@
ItemStack itemstack1 = irecipe.c();
ItemStack itemstack2 = (ItemStack) this.items.get(2);
@@ -121,7 +120,7 @@
if (!this.world.isClientSide) {
this.a(irecipe);
-@@ -307,7 +386,7 @@
+@@ -307,7 +385,7 @@
}
protected int getRecipeCookingTime() {
@@ -130,7 +129,7 @@
}
public static boolean isFuel(ItemStack itemstack) {
-@@ -434,7 +513,7 @@
+@@ -434,7 +512,7 @@
@Override
public void b(EntityHuman entityhuman) {}
@@ -139,7 +138,7 @@
List> list = Lists.newArrayList();
Iterator iterator = this.n.entrySet().iterator();
-@@ -443,7 +522,7 @@
+@@ -443,7 +521,7 @@
entityhuman.world.getCraftingManager().a((MinecraftKey) entry.getKey()).ifPresent((irecipe) -> {
list.add(irecipe);
@@ -148,7 +147,7 @@
});
}
-@@ -451,7 +530,7 @@
+@@ -451,7 +529,7 @@
this.n.clear();
}
@@ -157,7 +156,7 @@
int j;
if (f == 0.0F) {
-@@ -465,6 +544,14 @@
+@@ -465,6 +543,14 @@
i = j;
}
diff --git a/paper-server/pom.xml b/paper-server/pom.xml
index 9f99446b98..eb02a23937 100644
--- a/paper-server/pom.xml
+++ b/paper-server/pom.xml
@@ -268,6 +268,30 @@
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+ 3.0.0
+
+
+ validate
+
+ check
+
+
+
+
+ checkstyle.xml
+ true
+
+
+
+ com.puppycrawl.tools
+ checkstyle
+ 8.19
+
+
+
org.codehaus.mojo
animal-sniffer-maven-plugin
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
index 84a1f9c861..a0f8a2da14 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
@@ -68,7 +68,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
@Override
public Set getBanEntries() {
ImmutableSet.Builder builder = ImmutableSet.builder();
-
+
for (JsonListEntry entry : list.getValues()) {
GameProfile profile = (GameProfile) entry.getKey();
builder.add(new CraftProfileBanEntry(profile, (GameProfileBanEntry) entry, list));
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ae7d413e84..14cc7ddffa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1327,7 +1327,7 @@ public final class CraftServer implements Server {
for (JsonListEntry entry : playerList.getProfileBans().getValues()) {
result.add(getOfflinePlayer((GameProfile) entry.getKey()));
- }
+ }
return result;
}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
index 403c854c4d..044d46ac87 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
@@ -45,14 +45,14 @@ public class CraftWorldBorder implements WorldBorder {
if (time > 0L) {
this.handle.transitionSizeBetween(this.handle.getSize(), newSize, time * 1000L);
} else {
- this.handle.setSize(newSize);
+ this.handle.setSize(newSize);
}
}
@Override
public Location getCenter() {
- double x = this.handle.getCenterX();
- double z = this.handle.getCenterZ();
+ double x = this.handle.getCenterX();
+ double z = this.handle.getCenterZ();
return new Location(this.world, x, 0, z);
}
@@ -63,7 +63,7 @@ public class CraftWorldBorder implements WorldBorder {
x = Math.min(3.0E7D, Math.max(-3.0E7D, x));
z = Math.min(3.0E7D, Math.max(-3.0E7D, z));
- this.handle.setCenter(x, z);
+ this.handle.setCenter(x, z);
}
@Override
@@ -108,7 +108,7 @@ public class CraftWorldBorder implements WorldBorder {
@Override
public void setWarningDistance(int distance) {
- this.handle.setWarningDistance(distance);
+ this.handle.setWarningDistance(distance);
}
@Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 97385bd4d7..7fe1dd6015 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -273,4 +273,4 @@ public class CraftBlockState implements BlockState {
throw new IllegalStateException("The blockState must be placed to call this method");
}
}
-}
\ No newline at end of file
+}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java
index 011c9aea84..4e1a672fc7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java
@@ -1,7 +1,6 @@
package org.bukkit.craftbukkit.block.data;
import org.bukkit.block.data.Waterlogged;
-import org.bukkit.craftbukkit.block.data.CraftBlockData;
public abstract class CraftWaterlogged extends CraftBlockData implements Waterlogged {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
index a976238300..cc331c28c7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
@@ -61,11 +61,11 @@ public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderD
public void setPhase(Phase phase) {
getHandle().getDragonControllerManager().setControllerPhase(getMinecraftPhase(phase));
}
-
+
public static Phase getBukkitPhase(DragonControllerPhase phase) {
return Phase.values()[phase.b()];
}
-
+
public static DragonControllerPhase getMinecraftPhase(Phase phase) {
return DragonControllerPhase.getById(phase.ordinal());
}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
index bfb8f07abd..c124855e27 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
@@ -31,7 +31,7 @@ public class CraftRabbit extends CraftAnimals implements Rabbit {
@Override
public Type getRabbitType() {
- int type = getHandle().getRabbitType();
+ int type = getHandle().getRabbitType();
return CraftMagicMapping.fromMagic(type);
}
@@ -46,7 +46,7 @@ public class CraftRabbit extends CraftAnimals implements Rabbit {
entity.initializePathFinderGoals();
}
- entity.setRabbitType(CraftMagicMapping.toMagic(type));
+ entity.setRabbitType(CraftMagicMapping.toMagic(type));
}
private static class CraftMagicMapping {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
index 1724b9b9e0..479c6f36f7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -208,7 +208,7 @@ public class CraftContainer extends Container {
break;
case SMOKER:
delegate = new ContainerSmoker(windowId, bottom, top, new ContainerProperties(4));
- break;
+ break;
case LOOM:
delegate = new ContainerLoom(windowId, bottom);
break;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java
index 267581ec2e..8aa059157c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java
@@ -31,7 +31,7 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta {
setEffect(SerializableMeta.getObject(FireworkEffect.class, map, EXPLOSION.BUKKIT, true));
}
-
+
CraftMetaCharge(NBTTagCompound tag) {
super(tag);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java
index e5b1a73023..ec43877449 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java
@@ -102,7 +102,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
if (hasMapId()){
tag.setInt(MAP_ID.NBT, getMapId());
}
-
+
if (hasScaling()) {
tag.setBoolean(MAP_SCALING.NBT, isScaling());
}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java
index e3b5f42ada..b1cb56e2e0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java
@@ -61,4 +61,4 @@ public class InventoryIterator implements ListIterator {
public void remove() {
throw new UnsupportedOperationException("Can't change the size of an inventory!");
}
-}
\ No newline at end of file
+}
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 670146bdda..2780a10d1d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -305,7 +305,7 @@ public class CraftScheduler implements BukkitScheduler {
return false;
}
if (task.isSync()) {
- return (task == currentTask);
+ return (task == currentTask);
}
final CraftAsyncTask asyncTask = (CraftAsyncTask) task;
synchronized (asyncTask.getWorkers()) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
index 27bfe616ab..336cc967b2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
@@ -11,8 +11,8 @@ import org.fusesource.jansi.Ansi;
import org.fusesource.jansi.Ansi.Erase;
public class TerminalConsoleWriterThread extends Thread {
- final private ConsoleReader reader;
- final private OutputStream output;
+ private final ConsoleReader reader;
+ private final OutputStream output;
public TerminalConsoleWriterThread(OutputStream output, ConsoleReader reader) {
this.output = output;
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java
index c5194e3802..4b5a85302e 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java
@@ -60,19 +60,19 @@ public class ChunkDataTest extends AbstractTestingBase {
testSetRegion(data, 0, 0, 0, 0, 0, 0, RED_WOOL); // minimum == maximum
testSetRegion(data, 0, 0, 0, 16, 16, 16, RED_WOOL); // Whole Chunk Section
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
- testSetRegion(data, 0, 8, 0, 16, 24, 16, RED_WOOL); // Start middle of this section, end middle of next
+ testSetRegion(data, 0, 8, 0, 16, 24, 16, RED_WOOL); // Start middle of this section, end middle of next
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
testSetRegion(data, 0, 4, 0, 16, 12, 16, RED_WOOL); // Start in this section, end in this section
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
testSetRegion(data, 0, 0, 0, 16, 16, 1, RED_WOOL); // Whole Chunk Section
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
- testSetRegion(data, 0, 8, 0, 16, 24, 1, RED_WOOL); // Start middle of this section, end middle of next
+ testSetRegion(data, 0, 8, 0, 16, 24, 1, RED_WOOL); // Start middle of this section, end middle of next
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
testSetRegion(data, 0, 4, 0, 16, 12, 1, RED_WOOL); // Start in this section, end in this section
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
testSetRegion(data, 0, 0, 0, 1, 16, 1, RED_WOOL); // Whole Chunk Section
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
- testSetRegion(data, 0, 8, 0, 1, 24, 1, RED_WOOL); // Start middle of this section, end middle of next
+ testSetRegion(data, 0, 8, 0, 1, 24, 1, RED_WOOL); // Start middle of this section, end middle of next
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
testSetRegion(data, 0, 4, 0, 1, 12, 1, RED_WOOL); // Start in this section, end in this section
data.setRegion(0, 0, 0, 16, 256, 16, AIR);
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
index 32a9184fd2..99db06d06f 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
@@ -26,7 +26,7 @@ public class ItemStackLoreEnchantmentTest extends ItemStackTest {
return CompoundOperator.compound(
Joiner.on('+'),
NAME_PARAMETER,
- ~0l,
+ ~0L,
Arrays.asList(
new Object[] {
new Operator() {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
index 6140edeec4..058730e117 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
@@ -36,7 +36,7 @@ import com.google.common.collect.ImmutableList;
@RunWith(Parameterized.class)
public class ItemStackTest extends AbstractTestingBase {
- static abstract class StackProvider {
+ abstract static class StackProvider {
final Material material;
StackProvider(Material material) {
diff --git a/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java b/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java
index 7e8d5a0e54..3c42440456 100644
--- a/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java
@@ -17,7 +17,7 @@ public class EnderDragonPhaseTest {
assertNotNull(phase.name(), CraftEnderDragon.getBukkitPhase(dragonControllerPhase));
}
}
-
+
@Test
public void testBukkitToMinecraft() {
Assert.assertEquals("CIRCLING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CIRCLING), DragonControllerPhase.HOLDING_PATTERN);
@@ -46,5 +46,5 @@ public class EnderDragonPhaseTest {
Assert.assertEquals("CHARGE_PLAYER", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.CHARGING_PLAYER), EnderDragon.Phase.CHARGE_PLAYER);
Assert.assertEquals("DYING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.DYING), EnderDragon.Phase.DYING);
Assert.assertEquals("HOVER", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.HOVER), EnderDragon.Phase.HOVER);
- }
+ }
}