mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-03 13:27:23 +01:00
Update to 1.8.4
This commit is contained in:
parent
a5b3760b6d
commit
80d0e8ffa7
156 changed files with 121 additions and 380 deletions
Bukkit-Patches
CraftBukkit-Patches
0001-POM-Changes.patch0002-mc-dev-imports.patch0004-Obfuscation-Helpers.patch0005-Spigot-Configuration.patch0008-Merge-tweaks-and-configuration.patch0008-More-Efficient-Chunk-Save-Queue.patch0009-Async-Operation-Catching.patch0010-View-Distance.patch0011-Spigot-Timings.patch0012-Fix-Mob-Spawning-Relative-to-View-Distance.patch0013-Handle-Null-Tile-Entities.patch0014-Entity-Activation-Range.patch0015-Metrics.patch0016-PlayerItemDamageEvent.patch0017-Prevent-NPE-in-CraftSign.patch0018-Entity-Tracking-Ranges.patch0019-Thread-Naming-and-Tweaks.patch0020-Close-Unloaded-Save-Files.patch0021-Remove-o-Option.patch0022-Recipe-Deconstruction.patch0023-Implement-Arrow-API.patch0024-Hopper-Customisations.patch0025-Implement-SpawnerSpawnEvent.patch0026-Firework-Meta-Crash-Fix.patch0027-Allow-Disabling-of-Command-Logging.patch0028-Allow-Disabling-of-Command-TabComplete.patch0029-Configurable-Messages.patch0030-Allow-Disabling-of-Random-Lighting-Updates.patch0031-Properly-Close-Inventories.patch0032-Disallow-Interaction-With-Self.patch0033-Entity-Mount-and-Dismount-Events.patch0034-Prevent-Ghost-Players-Caused-by-Plugins.patch0035-Plug-World-Unload-Memory-Leak.patch0036-Player-Collision-API.patch0037-Fully-Disable-Snooper-When-Not-Required.patch0038-Add-Getter-for-Entity-Invulnerability.patch0039-Cap-Minimum-Player-Speed.patch0040-Update-Inventory-and-Health-for-PlayerConsumeItemEve.patch0041-Call-EntityChangeBlockEvent-for-Fire-Arrows-hitting-.patch0042-Allow-Disabling-of-1.6.3-Structure-Saving.patch0043-Item-Despawn-Rate.patch0044-Don-t-Special-Case-X-Move-Value.patch0045-Implement-respawn-API.patch0046-Arrow-Despawn-Rate.patch0047-Fix-packed-ice-generation.patch0048-Watchdog-Thread.patch0049-Clear-Flower-Pot-on-Drop.patch0050-Fix-some-chunks-not-being-sent-to-the-client.patch0051-Fix-Broken-Async-Chat.patch0052-Orebfuscator.patch0053-Optimize-DataWatcher.patch0054-Fire-PreLogin-Events-in-Offline-Mode.patch0055-BungeeCord-Support.patch0056-Allow-Disabling-Zombie-Villager-Aggression.patch0057-Configurable-Amount-of-Netty-Threads.patch0058-Prevent-Mineshaft-Saving.patch0059-Log-Cause-of-Unexpected-Exceptions.patch0060-Particle-API.patch0061-Save-ticks-lived-to-nbttag.patch0062-More-Efficient-GetCubes.patch0063-Add-Option-to-Nerf-Mobs-from-Spawner-s.patch0064-Warn-if-PermGen-may-be-insufficient.patch0065-Disable-Connected-Check-on-setScoreboard.patch0066-Add-Late-Bind-Option.patch0067-Allow-statistics-to-be-disabled-forced.patch0068-Fix-ItemStack-Unbreakable-Code.patch0069-Try-and-Debug-Crash-Reports-Crashing.patch0070-Improve-AutoSave-Mechanism.patch0071-Catch-stalling-on-corrupted-map-data-NBT-arrays.patch0072-Allow-toggling-of-ZombiePigmen-spawning-in-portal-bl.patch0073-Highly-Optimized-Tick-Loop.patch0074-Add-Spigot-Links.patch0075-Configurable-Ping-Sample-Size.patch0076-Add-Optional-Tick-Shuffling.patch0077-Allow-Configuring-Chunks-per-Packet.patch0078-Implement-Locale-Getter-for-Players.patch0079-Cap-Entity-Collisions.patch0080-Fix-dispensing-bone-meal-not-having-the-correct-data.patch0081-Spam-Filter-Exclusions.patch0082-Add-Option-to-Silence-CommandBlock-Console.patch0083-Add-support-for-fetching-hidden-players.patch0084-Allow-Disabling-Creative-Item-Filter.patch0085-Cap-Channel-Registrations.patch0086-Allow-vanilla-commands-to-be-the-main-version-of-a-c.patch0087-Unfinalize-the-isDisconnected-method-by-bukkit.patch0088-Implement-Silenceable-Lightning-API.patch0089-Use-one-PermissibleBase-for-all-Command-Blocks.patch0090-Prevent-hoppers-from-loading-chunks.patch0091-Guard-Entity-List.patch0092-Fix-ConcurrentModificationException-while-being-idle.patch0093-Cancellable-WitherSkull-potion-effect.patch0094-Descriptive-kick-reasons-instead-of-Nope.patch0095-Configurable-dragon-death-and-wither-spawn-sounds.patch0096-Display-Spigot-in-client-crashes-server-lists-and-Mo.patch0097-Treat-Bungee-as-Online-Mode.patch0098-Add-Conversion-Message.patch0099-Properly-cancel-fishing-event.-Fixes-BUKKIT-5396.patch0100-Print-Stack-on-InternalException.patch0101-Use-Offline-Player-Data-Once-if-Required.patch
|
@ -16,7 +16,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <artifactId>bukkit</artifactId>
|
||||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot-api</artifactId>
|
||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Bukkit</name>
|
||||
|
|
|
@ -18,7 +18,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ <groupId>org.spigotmc</groupId>
|
||||
+ <artifactId>spigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||
- <name>CraftBukkit</name>
|
||||
- <url>http://www.bukkit.org</url>
|
||||
+ <name>Spigot</name>
|
||||
|
|
|
@ -1054,7 +1054,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.a((ICommand) (new CommandWorldBorder()));
|
||||
+ this.a((ICommand) (new CommandTitle()));
|
||||
+ this.a((ICommand) (new CommandEntityData()));
|
||||
+ if (MinecraftServer.getServer().ad()) {
|
||||
+ if (MinecraftServer.getServer().ae()) {
|
||||
+ this.a((ICommand) (new CommandOp()));
|
||||
+ this.a((ICommand) (new CommandDeop()));
|
||||
+ this.a((ICommand) (new CommandStop()));
|
||||
|
@ -1095,8 +1095,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ while (iterator.hasNext()) {
|
||||
+ EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
+
|
||||
+ if (entityhuman != icommandlistener && minecraftserver.getPlayerList().isOp(entityhuman.getProfile()) && icommand.canUse(icommandlistener) && (!(icommandlistener instanceof RemoteControlCommandListener) || MinecraftServer.getServer().q())) {
|
||||
+ entityhuman.sendMessage(chatmessage);
|
||||
+ if (entityhuman != icommandlistener && minecraftserver.getPlayerList().isOp(entityhuman.getProfile()) && icommand.canUse(icommandlistener)) {
|
||||
+ boolean flag1 = icommandlistener instanceof MinecraftServer && MinecraftServer.getServer().r();
|
||||
+ boolean flag2 = icommandlistener instanceof RemoteControlCommandListener && MinecraftServer.getServer().q();
|
||||
+
|
||||
+ if (flag1 || flag2 || !(icommandlistener instanceof RemoteControlCommandListener) && !(icommandlistener instanceof MinecraftServer)) {
|
||||
+ entityhuman.sendMessage(chatmessage);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
@ -1105,13 +1110,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ minecraftserver.sendMessage(chatmessage);
|
||||
+ }
|
||||
+
|
||||
+ boolean flag1 = minecraftserver.worldServer[0].getGameRules().getBoolean("sendCommandFeedback");
|
||||
+ boolean flag3 = minecraftserver.worldServer[0].getGameRules().getBoolean("sendCommandFeedback");
|
||||
+
|
||||
+ if (icommandlistener instanceof CommandBlockListenerAbstract) {
|
||||
+ flag1 = ((CommandBlockListenerAbstract) icommandlistener).m();
|
||||
+ flag3 = ((CommandBlockListenerAbstract) icommandlistener).m();
|
||||
+ }
|
||||
+
|
||||
+ if ((i & 1) != 1 && flag1) {
|
||||
+ if ((i & 1) != 1 && flag3 || icommandlistener instanceof MinecraftServer) {
|
||||
+ icommandlistener.sendMessage(new ChatMessage(s, aobject));
|
||||
+ }
|
||||
+
|
||||
|
@ -2011,10 +2016,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+
|
||||
+ private static final Logger f = LogManager.getLogger();
|
||||
+ public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.0D, Double.MAX_VALUE)).a("Max Health").a(true);
|
||||
+ public static final IAttribute b = (new AttributeRanged((IAttribute) null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).a("Follow Range");
|
||||
+ public static final IAttribute FOLLOW_RANGE = (new AttributeRanged((IAttribute) null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).a("Follow Range");
|
||||
+ public static final IAttribute c = (new AttributeRanged((IAttribute) null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).a("Knockback Resistance");
|
||||
+ public static final IAttribute d = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, Double.MAX_VALUE)).a("Movement Speed").a(true);
|
||||
+ public static final IAttribute e = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, Double.MAX_VALUE);
|
||||
+ public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, Double.MAX_VALUE)).a("Movement Speed").a(true);
|
||||
+ public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, Double.MAX_VALUE);
|
||||
+
|
||||
+ public static NBTTagList a(AttributeMapBase attributemapbase) {
|
||||
+ NBTTagList nbttaglist = new NBTTagList();
|
||||
|
@ -2609,6 +2614,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
|
||||
+ nbtreadlimiter.a(192L);
|
||||
+ int j = datainput.readInt();
|
||||
+
|
||||
+ nbtreadlimiter.a((long) (8 * j));
|
||||
|
@ -2676,6 +2682,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
|
||||
+ nbtreadlimiter.a(192L);
|
||||
+ int j = datainput.readInt();
|
||||
+
|
||||
+ nbtreadlimiter.a((long) (32 * j));
|
||||
|
@ -3725,7 +3732,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Class oclass;
|
||||
+ LazyInitVar lazyinitvar;
|
||||
+
|
||||
+ if (Epoll.isAvailable() && this.f.ah()) {
|
||||
+ if (Epoll.isAvailable() && this.f.ai()) {
|
||||
+ oclass = EpollServerSocketChannel.class;
|
||||
+ lazyinitvar = ServerConnection.b;
|
||||
+ ServerConnection.e.info("Using epoll channel type");
|
||||
|
@ -3806,8 +3813,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ ServerConnection.e.warn("Failed to handle packet for " + networkmanager.getSocketAddress(), exception);
|
||||
+ final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
|
||||
+
|
||||
+ networkmanager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new GenericFutureListener<Future<Void>>() {
|
||||
+ public void operationComplete(Future<Void> future) throws Exception {
|
||||
+ networkmanager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new GenericFutureListener() {
|
||||
+ public void operationComplete(Future future) throws Exception {
|
||||
+ networkmanager.close(chatcomponenttext);
|
||||
+ }
|
||||
+ }, new GenericFutureListener[0]);
|
||||
|
@ -3895,14 +3902,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.e.add(statistic);
|
||||
+ if (statistic.d() && j == 0 && i > 0) {
|
||||
+ this.g = true;
|
||||
+ if (this.c.aA()) {
|
||||
+ if (this.c.aB()) {
|
||||
+ this.c.getPlayerList().sendMessage(new ChatMessage("chat.type.achievement", new Object[] { entityhuman.getScoreboardDisplayName(), statistic.j()}));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (statistic.d() && j > 0 && i == 0) {
|
||||
+ this.g = true;
|
||||
+ if (this.c.aA()) {
|
||||
+ if (this.c.aB()) {
|
||||
+ this.c.getPlayerList().sendMessage(new ChatMessage("chat.type.achievement.taken", new Object[] { entityhuman.getScoreboardDisplayName(), statistic.j()}));
|
||||
+ }
|
||||
+ }
|
||||
|
@ -4005,7 +4012,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ public void a(EntityPlayer entityplayer) {
|
||||
+ int i = this.c.as();
|
||||
+ int i = this.c.at();
|
||||
+ HashMap hashmap = Maps.newHashMap();
|
||||
+
|
||||
+ if (this.g || i - this.f > 300) {
|
||||
|
@ -4408,14 +4415,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ UserCache.UserCacheEntry usercache_usercacheentry1 = (UserCache.UserCacheEntry) this.d.get(uuid);
|
||||
+
|
||||
+ this.c.remove(usercache_usercacheentry1.a().getName().toLowerCase(Locale.ROOT));
|
||||
+ this.c.put(gameprofile.getName().toLowerCase(Locale.ROOT), usercache_usercacheentry);
|
||||
+ this.e.remove(gameprofile);
|
||||
+ } else {
|
||||
+ this.d.put(uuid, usercache_usercacheentry);
|
||||
+ this.c.put(s, usercache_usercacheentry);
|
||||
+ }
|
||||
+
|
||||
+ this.c.put(gameprofile.getName().toLowerCase(Locale.ROOT), usercache_usercacheentry);
|
||||
+ this.d.put(uuid, usercache_usercacheentry);
|
||||
+ this.e.addFirst(gameprofile);
|
||||
+ this.c();
|
||||
+ }
|
||||
+
|
||||
+ public GameProfile getProfile(String s) {
|
||||
|
@ -4473,29 +4479,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ public void b() {
|
||||
+ List list = null;
|
||||
+ BufferedReader bufferedreader = null;
|
||||
+
|
||||
+ label64: {
|
||||
+ try {
|
||||
+ bufferedreader = Files.newReader(this.g, Charsets.UTF_8);
|
||||
+ list = (List) this.b.fromJson(bufferedreader, UserCache.h);
|
||||
+ break label64;
|
||||
+ } catch (FileNotFoundException filenotfoundexception) {
|
||||
+ ;
|
||||
+ } finally {
|
||||
+ IOUtils.closeQuietly(bufferedreader);
|
||||
+ }
|
||||
+ try {
|
||||
+ bufferedreader = Files.newReader(this.g, Charsets.UTF_8);
|
||||
+ List list = (List) this.b.fromJson(bufferedreader, UserCache.h);
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (list != null) {
|
||||
+ this.c.clear();
|
||||
+ this.d.clear();
|
||||
+ this.e.clear();
|
||||
+ list = Lists.reverse(list);
|
||||
+ Iterator iterator = list.iterator();
|
||||
+ Iterator iterator = Lists.reverse(list).iterator();
|
||||
+
|
||||
+ while (iterator.hasNext()) {
|
||||
+ UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) iterator.next();
|
||||
|
@ -4504,6 +4497,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ this.a(usercache_usercacheentry.a(), usercache_usercacheentry.b());
|
||||
+ }
|
||||
+ }
|
||||
+ } catch (FileNotFoundException filenotfoundexception) {
|
||||
+ ;
|
||||
+ } catch (JsonParseException jsonparseexception) {
|
||||
+ ;
|
||||
+ } finally {
|
||||
+ IOUtils.closeQuietly(bufferedreader);
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
|
|
|
@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return this.q;
|
||||
+ }
|
||||
+ // Spigot End
|
||||
public ServerConnection ap() {
|
||||
public ServerConnection aq() {
|
||||
return this.q;
|
||||
}
|
||||
--
|
|
@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
if (this.Q() < 0) {
|
||||
if (this.R() < 0) {
|
||||
this.setPort(this.propertyManager.getInt("server-port", 25565));
|
||||
}
|
||||
+ // Spigot start
|
||||
|
|
|
@ -1,107 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:09:45 +1000
|
||||
Subject: [PATCH] More Efficient Chunk Save Queue
|
||||
|
||||
Optimizes the data structures behind the chunk save queue into ones more suitable for the type of data and access which they are used for.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||
public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
- private List<ChunkRegionLoader.PendingChunkToSave> b = Lists.newArrayList();
|
||||
- private Set<ChunkCoordIntPair> c = Sets.newHashSet();
|
||||
+ // Spigot start
|
||||
+ private java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave> pendingSaves = new java.util.LinkedHashMap<ChunkCoordIntPair, PendingChunkToSave>();
|
||||
+ // private List<ChunkRegionLoader.PendingChunkToSave> b = Lists.newArrayList();
|
||||
+ // private Set<ChunkCoordIntPair> c = Sets.newHashSet();
|
||||
+ // Spigot end
|
||||
private Object d = new Object();
|
||||
private final File e;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
|
||||
|
||||
synchronized (this.d) {
|
||||
- if (this.c.contains(chunkcoordintpair)) {
|
||||
- for (int k = 0; k < this.b.size(); ++k) {
|
||||
- if (((PendingChunkToSave) this.b.get(k)).a.equals(chunkcoordintpair)) {
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
+ // Spigot start
|
||||
+ if (pendingSaves.containsKey(chunkcoordintpair)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ // Spigot end
|
||||
}
|
||||
|
||||
return RegionFileCache.a(this.e, i, j).chunkExists(i & 31, j & 31);
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
Object object = this.d;
|
||||
|
||||
synchronized (this.d) {
|
||||
- if (this.c.contains(chunkcoordintpair)) {
|
||||
- for (int k = 0; k < this.b.size(); ++k) {
|
||||
- if (((ChunkRegionLoader.PendingChunkToSave) this.b.get(k)).a.equals(chunkcoordintpair)) {
|
||||
- nbttagcompound = ((ChunkRegionLoader.PendingChunkToSave) this.b.get(k)).b;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
+ // Spigot start
|
||||
+ PendingChunkToSave pendingchunktosave = pendingSaves.get(chunkcoordintpair);
|
||||
+ if (pendingchunktosave != null) {
|
||||
+ nbttagcompound = pendingchunktosave.b;
|
||||
}
|
||||
+ // Spigot end
|
||||
}
|
||||
|
||||
if (nbttagcompound == null) {
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
Object object = this.d;
|
||||
|
||||
synchronized (this.d) {
|
||||
- if (this.c.contains(chunkcoordintpair)) {
|
||||
- for (int i = 0; i < this.b.size(); ++i) {
|
||||
- if (((ChunkRegionLoader.PendingChunkToSave) this.b.get(i)).a.equals(chunkcoordintpair)) {
|
||||
- this.b.set(i, new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
- return;
|
||||
- }
|
||||
- }
|
||||
+ // Spigot start
|
||||
+ if (this.pendingSaves.put(chunkcoordintpair, new PendingChunkToSave(chunkcoordintpair, nbttagcompound)) != null) {
|
||||
+ return;
|
||||
}
|
||||
|
||||
- this.b.add(new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
- this.c.add(chunkcoordintpair);
|
||||
+ // this.b.add(new ChunkRegionLoader.PendingChunkToSave(chunkcoordintpair, nbttagcompound));
|
||||
+ // this.c.add(chunkcoordintpair);
|
||||
+ // Spigot end
|
||||
FileIOThread.a().a(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
Object object = this.d;
|
||||
|
||||
synchronized (this.d) {
|
||||
- if (this.b.isEmpty()) {
|
||||
+ // Spigot start
|
||||
+ if (this.pendingSaves.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
- chunkregionloader_pendingchunktosave = (ChunkRegionLoader.PendingChunkToSave) this.b.remove(0);
|
||||
- this.c.remove(chunkregionloader_pendingchunktosave.a);
|
||||
+ chunkregionloader_pendingchunktosave = this.pendingSaves.values().iterator().next();
|
||||
+ this.pendingSaves.remove(chunkregionloader_pendingchunktosave.a);
|
||||
+ // Spigot end
|
||||
}
|
||||
|
||||
if (chunkregionloader_pendingchunktosave != null) {
|
||||
--
|
|
@ -120,7 +120,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public void aN() {
|
||||
public void aO() {
|
||||
+ SpigotTimings.serverCommandTimer.startTiming(); // Spigot
|
||||
while (!this.l.isEmpty()) {
|
||||
ServerCommand servercommand = (ServerCommand) this.l.remove(0);
|
||||
|
@ -132,7 +132,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ SpigotTimings.serverCommandTimer.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
public boolean ad() {
|
||||
public boolean ae() {
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
|
@ -254,9 +254,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
import org.bukkit.event.world.WorldSaveEvent;
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
protected void y() {}
|
||||
protected void z() {}
|
||||
|
||||
protected void z() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
||||
protected void A() throws ExceptionWorldConflict { // CraftBukkit - added throws
|
||||
+ SpigotTimings.serverTickTimer.startTiming(); // Spigot
|
||||
long i = System.nanoTime();
|
||||
|
||||
|
@ -282,7 +282,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ org.spigotmc.CustomTimingsHandler.tick(); // Spigot
|
||||
}
|
||||
|
||||
public void A() {
|
||||
public void B() {
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
|
||||
this.methodProfiler.c("levels");
|
||||
|
@ -350,7 +350,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
this.methodProfiler.c("connection");
|
||||
+ SpigotTimings.connectionTimer.startTiming(); // Spigot
|
||||
this.ap().c();
|
||||
this.aq().c();
|
||||
+ SpigotTimings.connectionTimer.stopTiming(); // Spigot
|
||||
this.methodProfiler.c("players");
|
||||
+ SpigotTimings.playerListTimer.startTiming(); // Spigot
|
|
@ -12,13 +12,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// CraftBukkit end
|
||||
|
||||
if (packethandshakinginsetprotocol.b() > 47) {
|
||||
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.3");
|
||||
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8.3" ) ); // Spigot
|
||||
- chatcomponenttext = new ChatComponentText("Outdated server! I\'m still on 1.8.4");
|
||||
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedServerMessage, "1.8.4" ) ); // Spigot
|
||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
|
||||
this.b.close(chatcomponenttext);
|
||||
} else if (packethandshakinginsetprotocol.b() < 47) {
|
||||
- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8.3");
|
||||
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8.3" ) ); // Spigot
|
||||
- chatcomponenttext = new ChatComponentText("Outdated client! Please use 1.8.4");
|
||||
+ chatcomponenttext = new ChatComponentText( java.text.MessageFormat.format( org.spigotmc.SpigotConfig.outdatedClientMessage, "1.8.4" ) ); // Spigot
|
||||
this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
|
||||
this.b.close(chatcomponenttext);
|
||||
} else {
|
||||
|
@ -37,8 +37,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
} else {
|
||||
// return this.players.size() >= this.maxPlayers ? "The server is full!" : null;
|
||||
if (this.players.size() >= this.maxPlayers) {
|
||||
// return this.players.size() >= this.maxPlayers && !this.f(gameprofile) ? "The server is full!" : null;
|
||||
if (this.players.size() >= this.maxPlayers && !this.f(gameprofile)) {
|
||||
- event.disallow(PlayerLoginEvent.Result.KICK_FULL, "The server is full");
|
||||
+ event.disallow(PlayerLoginEvent.Result.KICK_FULL, org.spigotmc.SpigotConfig.serverFullMessage); // Spigot
|
||||
}
|
|
@ -13,13 +13,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||
Entity entity = packetplayinuseentity.a((World) worldserver);
|
||||
+ // Spigot Start
|
||||
+ if ( entity == player && !player.v() ) // RENAME
|
||||
+ if ( entity == player && !player.isSpectator() )
|
||||
+ {
|
||||
+ disconnect( "Cannot interact with self!" );
|
||||
+ return;
|
||||
+ }
|
||||
+ // Spigot End
|
||||
|
||||
this.player.z();
|
||||
this.player.resetIdleTimer();
|
||||
if (entity != null) {
|
||||
--
|
|
@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- if (this.aR() > 0L) {
|
||||
+ if (false && this.aR() > 0L) { // Spigot - disable
|
||||
- if (this.aS() > 0L) {
|
||||
+ if (false && this.aS() > 0L) { // Spigot - disable
|
||||
Thread thread1 = new Thread(new ThreadWatchdog(this));
|
||||
|
||||
thread1.setName("Server Watchdog");
|
|
@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.i, hostname);
|
||||
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||
this.g = LoginListener.EnumProtocolState.KEY;
|
||||
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
||||
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.Q().getPublic(), this.e));
|
||||
} else {
|
||||
- this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||
+ // Spigot start
|
||||
|
@ -62,7 +62,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
|
||||
+ new LoginHandler().fireEvents();
|
||||
+ } else if (LoginListener.this.server.S()) {
|
||||
+ } else if (LoginListener.this.server.T()) {
|
||||
+ LoginListener.c.warn("Failed to verify username but will let them in anyway!");
|
||||
+ LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||
+ LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||
|
@ -71,7 +71,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
|
||||
+ }
|
||||
+ } catch (AuthenticationUnavailableException authenticationunavailableexception) {
|
||||
+ if (LoginListener.this.server.S()) {
|
||||
+ if (LoginListener.this.server.T()) {
|
||||
+ LoginListener.c.warn("Authentication servers are down but will let them in anyway!");
|
||||
+ LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||
+ LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||
|
@ -102,7 +102,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// CraftBukkit end
|
||||
LoginListener.c.info("UUID of player " + LoginListener.this.i.getName() + " is " + LoginListener.this.i.getId());
|
||||
LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||
- } else if (LoginListener.this.server.S()) {
|
||||
- } else if (LoginListener.this.server.T()) {
|
||||
- LoginListener.c.warn("Failed to verify username but will let them in anyway!");
|
||||
- LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||
- LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
||||
|
@ -111,7 +111,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
|
||||
- }
|
||||
- } catch (AuthenticationUnavailableException authenticationunavailableexception) {
|
||||
- if (LoginListener.this.server.S()) {
|
||||
- if (LoginListener.this.server.T()) {
|
||||
- LoginListener.c.warn("Authentication servers are down but will let them in anyway!");
|
||||
- LoginListener.this.i = LoginListener.this.a(gameprofile);
|
||||
- LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
|
|
@ -75,7 +75,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// Spigot end
|
||||
|
||||
@@ -0,0 +0,0 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
|
||||
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.P().getPublic(), this.e));
|
||||
this.networkManager.handle(new PacketLoginOutEncryptionBegin(this.j, this.server.Q().getPublic(), this.e));
|
||||
} else {
|
||||
// Spigot start
|
||||
- try {
|
||||
|
@ -108,7 +108,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet> {
|
||||
private final Queue<NetworkManager.QueuedPacket> i = Queues.newConcurrentLinkedQueue();
|
||||
private final ReentrantReadWriteLock j = new ReentrantReadWriteLock();
|
||||
public Channel k; // CraftBukkit - public, PAIL: Rename channel
|
||||
public Channel channel; // CraftBukkit - public
|
||||
- private SocketAddress l;
|
||||
+ // Spigot Start
|
||||
+ public SocketAddress l;
|
||||
|
@ -126,7 +126,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ // Spigot Start
|
||||
+ public SocketAddress getRawAddress()
|
||||
+ {
|
||||
+ return this.k.remoteAddress();
|
||||
+ return this.channel.remoteAddress();
|
||||
+ }
|
||||
+ // Spigot End
|
||||
}
|
|
@ -30,12 +30,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
}
|
||||
// Spigot End
|
||||
public ServerConnection ap() {
|
||||
public ServerConnection aq() {
|
||||
- return this.q;
|
||||
+ return this.q == null ? this.q = new ServerConnection(this) : this.q; // Spigot
|
||||
}
|
||||
|
||||
public boolean ar() {
|
||||
public boolean as() {
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@ -11,11 +11,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
this.a(MinecraftEncryption.b());
|
||||
DedicatedServer.LOGGER.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.Q());
|
||||
DedicatedServer.LOGGER.info("Starting Minecraft server on " + (this.getServerIp().length() == 0 ? "*" : this.getServerIp()) + ":" + this.R());
|
||||
|
||||
+ if (!org.spigotmc.SpigotConfig.lateBind) {
|
||||
try {
|
||||
this.ap().a(inetaddress, this.Q());
|
||||
this.aq().a(inetaddress, this.R());
|
||||
} catch (IOException ioexception) {
|
||||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
|
||||
|
@ -31,7 +31,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
+ if (org.spigotmc.SpigotConfig.lateBind) {
|
||||
+ try {
|
||||
+ this.ap().a(inetaddress, this.Q());
|
||||
+ this.aq().a(inetaddress, this.R());
|
||||
+ } catch (IOException ioexception) {
|
||||
+ DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
|
||||
+ DedicatedServer.LOGGER.warn("The exception was: {}", new Object[] { ioexception.toString()});
|
||||
|
@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
if (false && this.aR() > 0L) { // Spigot - disable
|
||||
if (false && this.aS() > 0L) { // Spigot - disable
|
||||
Thread thread1 = new Thread(new ThreadWatchdog(this));
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
|
@ -9,8 +9,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagByteArray extends NBTBase {
|
||||
|
||||
void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
|
||||
nbtreadlimiter.a(192L);
|
||||
int j = datainput.readInt();
|
||||
+ com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
|
||||
|
||||
|
@ -21,8 +21,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagIntArray extends NBTBase {
|
||||
|
||||
void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
|
||||
nbtreadlimiter.a(192L);
|
||||
int j = datainput.readInt();
|
||||
+ com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
|
||||
|
|
@ -36,14 +36,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
try {
|
||||
if (this.init()) {
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
|
||||
this.r.setServerInfo(new ServerPing.ServerData("1.8.3", 47));
|
||||
this.r.setServerInfo(new ServerPing.ServerData("1.8.4", 47));
|
||||
this.a(this.r);
|
||||
|
||||
+ // Spigot start
|
||||
+ Arrays.fill( recentTps, 20 );
|
||||
+ long lastTick = System.nanoTime(), catchupTime = 0, curTime, wait, tickSection = lastTick;
|
||||
while (this.isRunning) {
|
||||
- long j = ay();
|
||||
- long j = az();
|
||||
- long k = j - this.ab;
|
||||
-
|
||||
- if (k > 2000L && this.ab - this.R >= 15000L) {
|
||||
|
@ -68,14 +68,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
|
||||
- i += k;
|
||||
- this.ab = j;
|
||||
- if (this.worlds.get(0).everyoneDeeplySleeping()) {
|
||||
- this.z();
|
||||
- if (this.worlds.get(0).everyoneDeeplySleeping()) { // CraftBukkit
|
||||
- this.A();
|
||||
- i = 0L;
|
||||
- } else {
|
||||
- while (i > 50L) {
|
||||
- MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
|
||||
- i -= 50L;
|
||||
- this.z();
|
||||
- this.A();
|
||||
- }
|
||||
+ if ( MinecraftServer.currentTick++ % SAMPLE_INTERVAL == 0 )
|
||||
+ {
|
||||
|
@ -88,7 +88,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ lastTick = curTime;
|
||||
|
||||
- Thread.sleep(Math.max(1L, 50L - i));
|
||||
+ this.z();
|
||||
+ this.A();
|
||||
this.Q = true;
|
||||
}
|
||||
+ // Spigot end
|
|
@ -15,7 +15,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
// CraftBukkit start - Add "isDisconnected" method
|
||||
- public final boolean isDisconnected() {
|
||||
+ public boolean isDisconnected() { // Spigot
|
||||
return !this.player.joining && !this.networkManager.k.config().isAutoRead();
|
||||
return !this.player.joining && !this.networkManager.channel.config().isAutoRead();
|
||||
}
|
||||
|
||||
--
|
|
@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
}
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||
this.player.z();
|
||||
this.player.resetIdleTimer();
|
||||
} else {
|
||||
PlayerConnection.c.warn(this.player.getName() + " tried to set an invalid carried item");
|
||||
- this.disconnect("Nope!"); // CraftBukkit
|
|
@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
@@ -0,0 +0,0 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
protected boolean aQ() {
|
||||
protected boolean aR() {
|
||||
+ server.getLogger().info( "**** Beginning UUID conversion, this may take A LONG time ****"); // Spigot, let the user know whats up!
|
||||
boolean flag = false;
|
||||
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Print Stack on InternalException
|
|||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 0000000000000000000000000000000000000000..00000000000000000000000000000000000000000 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -0,0 +0,0 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet> {
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue