summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/DedicatedServer.patch37
-rw-r--r--nms-patches/DispenserRegistry.patch9
-rw-r--r--nms-patches/HandshakeListener.patch2
-rw-r--r--nms-patches/PlayerConnection.patch22
-rw-r--r--nms-patches/TileEntity.patch2
-rw-r--r--nms-patches/TileEntitySign.patch2
6 files changed, 32 insertions, 42 deletions
diff --git a/nms-patches/DedicatedServer.patch b/nms-patches/DedicatedServer.patch
index a1ce3652..9085d707 100644
--- a/nms-patches/DedicatedServer.patch
+++ b/nms-patches/DedicatedServer.patch
@@ -68,11 +68,10 @@
}
} catch (IOException ioexception) {
DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
-@@ -67,13 +93,35 @@
+@@ -65,6 +91,27 @@
+ }
+ };
- thread.setDaemon(true);
- thread.start();
-+
+ // CraftBukkit start - TODO: handle command-line logging arguments
+ java.util.logging.Logger global = java.util.logging.Logger.getLogger("");
+ global.setUseParentHandlers(false);
@@ -94,9 +93,10 @@
+ System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
+ // CraftBukkit end
+
- DedicatedServer.LOGGER.info("Starting minecraft server version 1.8.5");
- if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
- DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
+ thread.setDaemon(true);
+ thread.start();
+ DedicatedServer.LOGGER.info("Starting minecraft server version 1.8.6");
+@@ -73,7 +120,7 @@
}
DedicatedServer.LOGGER.info("Loading properties");
@@ -105,7 +105,7 @@
this.p = new EULA(new File("eula.txt"));
if (!this.p.a()) {
DedicatedServer.LOGGER.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info.");
-@@ -129,6 +177,8 @@
+@@ -129,6 +176,8 @@
return false;
}
@@ -114,7 +114,7 @@
if (!this.getOnlineMode()) {
DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
-@@ -143,7 +193,7 @@
+@@ -143,7 +192,7 @@
if (!NameReferencingFileConverter.a(this.propertyManager)) {
return false;
} else {
@@ -123,13 +123,13 @@
long j = System.nanoTime();
if (this.U() == null) {
-@@ -198,8 +248,19 @@
+@@ -198,7 +247,18 @@
DedicatedServer.LOGGER.info("Starting remote control listener");
this.n = new RemoteControlListener(this);
this.n.a();
+ this.remoteConsole = new org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender(); // CraftBukkit
- }
-
++ }
++
+ // CraftBukkit start
+ if (this.server.getBukkitSpawnRadius() > -1) {
+ DedicatedServer.LOGGER.info("'settings.spawn-radius' in bukkit.yml has been moved to 'spawn-protection' in server.properties. I will move your config for you.");
@@ -137,13 +137,12 @@
+ this.propertyManager.getInt("spawn-protection", this.server.getBukkitSpawnRadius());
+ this.server.removeBukkitSpawnRadius();
+ this.propertyManager.savePropertiesFile();
-+ }
+ }
+ // CraftBukkit end
-+
+
if (this.aS() > 0L) {
Thread thread1 = new Thread(new ThreadWatchdog(this));
-
-@@ -213,6 +274,12 @@
+@@ -213,6 +273,12 @@
}
}
@@ -156,7 +155,7 @@
public void setGamemode(WorldSettings.EnumGamemode worldsettings_enumgamemode) {
super.setGamemode(worldsettings_enumgamemode);
this.r = worldsettings_enumgamemode;
-@@ -265,7 +332,7 @@
+@@ -265,7 +331,7 @@
System.exit(0);
}
@@ -165,7 +164,7 @@
super.B();
this.aO();
}
-@@ -296,7 +363,14 @@
+@@ -296,7 +362,14 @@
while (!this.l.isEmpty()) {
ServerCommand servercommand = (ServerCommand) this.l.remove(0);
@@ -181,7 +180,7 @@
}
}
-@@ -491,13 +565,57 @@
+@@ -491,13 +564,57 @@
}
public String getPlugins() {
diff --git a/nms-patches/DispenserRegistry.patch b/nms-patches/DispenserRegistry.patch
index 911725e2..a9f582da 100644
--- a/nms-patches/DispenserRegistry.patch
+++ b/nms-patches/DispenserRegistry.patch
@@ -381,12 +381,3 @@
return itemstack;
}
});
-@@ -372,7 +639,7 @@
- World world = isourceblock.i();
- BlockPosition blockposition = isourceblock.getBlockPosition().shift(BlockDispenser.b(isourceblock.f()));
-
-- if (world.isEmpty(blockposition)) {
-+ if (world.isEmpty(blockposition) && false) { // Craftbukkit - yeah... no, TODO: see if its safe to readd
- if (!world.isClientSide) {
- IBlockData iblockdata = Blocks.COMMAND_BLOCK.getBlockData().set(BlockCommand.TRIGGERED, Boolean.valueOf(false));
-
diff --git a/nms-patches/HandshakeListener.patch b/nms-patches/HandshakeListener.patch
index bcf16cf6..89fa10ff 100644
--- a/nms-patches/HandshakeListener.patch
+++ b/nms-patches/HandshakeListener.patch
@@ -58,7 +58,7 @@
+ // CraftBukkit end
+
if (packethandshakinginsetprotocol.b() > 47) {
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.5");
+ chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.6");
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
@@ -26,6 +71,7 @@
this.b.close(chatcomponenttext);
diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch
index c701f78b..766b26c6 100644
--- a/nms-patches/PlayerConnection.patch
+++ b/nms-patches/PlayerConnection.patch
@@ -1263,7 +1263,7 @@
if (ItemStack.matches(packetplayinwindowclick.e(), itemstack)) {
this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), true));
-@@ -809,8 +1671,48 @@
+@@ -797,8 +1659,48 @@
}
boolean flag1 = packetplayinsetcreativeslot.a() >= 1 && packetplayinsetcreativeslot.a() < 36 + PlayerInventory.getHotbarSize();
@@ -1313,7 +1313,7 @@
if (flag1 && flag2 && flag3) {
if (itemstack == null) {
-@@ -833,6 +1735,7 @@
+@@ -821,6 +1723,7 @@
}
public void a(PacketPlayInTransaction packetplayintransaction) {
@@ -1321,7 +1321,7 @@
PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.u());
Short oshort = (Short) this.n.get(this.player.activeContainer.windowId);
-@@ -843,6 +1746,7 @@
+@@ -831,6 +1734,7 @@
}
public void a(PacketPlayInUpdateSign packetplayinupdatesign) {
@@ -1329,7 +1329,7 @@
PlayerConnectionUtils.ensureMainThread(packetplayinupdatesign, this, this.player.u());
this.player.resetIdleTimer();
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
-@@ -859,14 +1763,29 @@
+@@ -847,14 +1751,29 @@
if (!tileentitysign.b() || tileentitysign.c() != this.player) {
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
@@ -1360,7 +1360,7 @@
tileentitysign.update();
worldserver.notify(blockposition);
-@@ -889,11 +1808,27 @@
+@@ -877,11 +1796,27 @@
public void a(PacketPlayInAbilities packetplayinabilities) {
PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.u());
@@ -1389,7 +1389,7 @@
ArrayList arraylist = Lists.newArrayList();
Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b()).iterator();
-@@ -933,13 +1868,16 @@
+@@ -921,13 +1856,16 @@
itemstack1 = this.player.inventory.getItemInHand();
if (itemstack1 != null) {
if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
@@ -1406,7 +1406,7 @@
return;
} finally {
packetdataserializer.release();
-@@ -962,16 +1900,21 @@
+@@ -950,16 +1888,21 @@
itemstack1 = this.player.inventory.getItemInHand();
if (itemstack1 != null) {
if (itemstack.getItem() == Items.WRITTEN_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) {
@@ -1428,7 +1428,7 @@
return;
} finally {
packetdataserializer.release();
-@@ -988,11 +1931,12 @@
+@@ -976,11 +1919,12 @@
}
} catch (Exception exception2) {
PlayerConnection.c.error("Couldn\'t select trade", exception2);
@@ -1442,7 +1442,7 @@
packetdataserializer = packetplayincustompayload.b();
try {
-@@ -1028,6 +1972,7 @@
+@@ -1016,6 +1960,7 @@
}
} catch (Exception exception3) {
PlayerConnection.c.error("Couldn\'t set command block", exception3);
@@ -1450,7 +1450,7 @@
} finally {
packetdataserializer.release();
}
-@@ -1053,6 +1998,7 @@
+@@ -1041,6 +1986,7 @@
}
} catch (Exception exception4) {
PlayerConnection.c.error("Couldn\'t set beacon", exception4);
@@ -1458,7 +1458,7 @@
}
}
} else if ("MC|ItemName".equals(packetplayincustompayload.a()) && this.player.activeContainer instanceof ContainerAnvil) {
-@@ -1068,7 +2014,28 @@
+@@ -1056,7 +2002,28 @@
containeranvil.a("");
}
}
diff --git a/nms-patches/TileEntity.patch b/nms-patches/TileEntity.patch
index 2acbd59a..c4c4ea66 100644
--- a/nms-patches/TileEntity.patch
+++ b/nms-patches/TileEntity.patch
@@ -9,7 +9,7 @@
public abstract class TileEntity {
private static final Logger a = LogManager.getLogger();
-@@ -217,4 +219,13 @@
+@@ -221,4 +223,13 @@
a(TileEntityFlowerPot.class, "FlowerPot");
a(TileEntityBanner.class, "Banner");
}
diff --git a/nms-patches/TileEntitySign.patch b/nms-patches/TileEntitySign.patch
index c99a4b39..c0849289 100644
--- a/nms-patches/TileEntitySign.patch
+++ b/nms-patches/TileEntitySign.patch
@@ -47,7 +47,7 @@
try {
this.lines[i] = ChatComponentUtils.filterForDisplay(icommandlistener, ichatbasecomponent, (Entity) null);
} catch (CommandException commandexception) {
-@@ -151,7 +169,10 @@
+@@ -155,7 +173,10 @@
ChatClickable chatclickable = chatmodifier.h();
if (chatclickable.a() == ChatClickable.EnumClickAction.RUN_COMMAND) {