Updated Upstream (Bukkit/CraftBukkit/Spigot)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround
e677c370 Update ECJ version
5058a35d SPIGOT-5860: Item.setItemStack should be NotNull

CraftBukkit Changes:
d77f4d9b SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround
53c95627 SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent
2ab04d24 Update ECJ version
7884e079 SPIGOT-5868: Blocks do not tick in custom nether / end
2a848286 SPIGOT-5863: Don't check colour in scoreboard length validation
f2cbce30 SPIGOT-5866: Beehive unknown TargetReason

Spigot Changes:
ad703da0 SPIGOT-5870: /plugins "website" field shows "version"
1a27cfd8 #98: Improve output of /plugins command using text components
732d5bab Disable checkstyle in Spigot blocks
0199a9a6 #97: Add Memory Usage to Ticks Per Second Command.
33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension
This commit is contained in:
Aikar 2020-06-27 21:54:05 -04:00
parent 5b8bdf1dbc
commit e1088e833c
9 changed files with 22 additions and 35 deletions

View file

@ -9,11 +9,12 @@ diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukki
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Item.java
+++ b/src/main/java/org/bukkit/entity/Item.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.ItemStack;
@@ -0,0 +0,0 @@ package org.bukkit.entity;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+// Paper start
+import org.jetbrains.annotations.Nullable;
+import java.util.UUID;
+// Paper end
+

View file

@ -26,12 +26,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- Plugin[] plugins = Bukkit.getPluginManager().getPlugins();
+ // Paper start
+ TreeMap<String, Plugin> plugins = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
+
- for (Plugin plugin : plugins) {
+ for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
+ plugins.put(plugin.getDescription().getName(), plugin);
+ }
- for (Plugin plugin : plugins) {
+
+ StringBuilder pluginList = new StringBuilder();
+ for (Map.Entry<String, Plugin> entry : plugins.entrySet()) {
if (pluginList.length() > 0) {
@ -56,4 +56,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return "(" + plugins.size() + "): " + pluginList.toString();
+ // Paper end
}
}
// Spigot start

View file

@ -165,15 +165,6 @@ diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/ja
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
@@ -0,0 +0,0 @@
package org.spigotmc;
-import com.google.common.base.Joiner;
-import net.minecraft.server.MinecraftServer;
-import com.google.common.collect.Iterables;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -0,0 +0,0 @@ public class TicksPerSecondCommand extends Command
return true;
}
@ -191,7 +182,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ tpsAvg[i] = format( tps[i] );
}
- sender.sendMessage( sb.substring( 0, sb.length() - 2 ) );
+ sender.sendMessage( ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", "));
- sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: "
- + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)");
+ sender.sendMessage(ChatColor.GOLD + "TPS from last 1m, 5m, 15m: " + org.apache.commons.lang.StringUtils.join(tpsAvg, ", "));
+ sender.sendMessage(ChatColor.GOLD + "Current Memory Usage: " + ChatColor.GREEN + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024)) + "/" + (Runtime.getRuntime().totalMemory() / (1024 * 1024)) + " mb (Max: " + (Runtime.getRuntime().maxMemory() / (1024 * 1024)) + " mb)");
+ // Paper end
return true;

View file

@ -556,15 +556,6 @@ diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {
// Spigot - view distance
networkmanager.queueImmunity = true; // Paper
- playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld()));
+ playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver1.getChunkProvider().playerChunkMap.getLoadViewDistance(), flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld())); // Paper - no-tick view distance
entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName())));
playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
@@ -0,0 +0,0 @@ public abstract class PlayerList {
// CraftBukkit start
WorldData worlddata = worldserver1.getWorldData();

View file

@ -342,13 +342,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -0,0 +0,0 @@ public abstract class PlayerList {
boolean flag1 = gamerules.getBoolean(GameRules.REDUCED_DEBUG_INFO);
// Spigot - view distance
entityplayer.playerInteractManager.a((WorldServer) entityplayer.world);
entityplayer.setPositionRaw(loc.getX(), loc.getY(), loc.getZ()); // Paper - set raw so we aren't fully joined to the world (not added to chunk or world)
entityplayer.setYawPitch(loc.getYaw(), loc.getPitch());
+ networkmanager.queueImmunity = true; // Paper
playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), entityplayer.playerInteractManager.c(), BiomeManager.a(worldserver1.getSeed()), worlddata.isHardcore(), this.server.E(), this.s, worldserver1.getTypeKey(), worldserver1.getDimensionKey(), this.getMaxPlayers(), worldserver.spigotConfig.viewDistance, flag1, !flag, worldserver1.isDebugWorld(), worldserver1.isFlatWorld()));
entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
playerconnection.sendPacket(new PacketPlayOutCustomPayload(PacketPlayOutCustomPayload.a, (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName())));
// Spigot end
// CraftBukkit - Moved message to after join
@@ -0,0 +0,0 @@ public abstract class PlayerList {
playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b()));
playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry()));

View file

@ -18,9 +18,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
this.player.move(EnumMoveType.PLAYER, new Vec3D(d7, d8, d9));
this.player.c(packetplayinflying.b()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move
+ // Paper start - prevent position desync
+ if (this.teleportPos != null) {
+ return; // ... thanks Mojang for letting move calls teleport across dimensions.

@ -1 +1 @@
Subproject commit 3284612a10e704b4658aa087213a3fa9670b6926
Subproject commit f009c3dd945c627246b383aa4ffad63a067df9ff

@ -1 +1 @@
Subproject commit 983305bb4a8601367e31f44b691f6e598bde9d0c
Subproject commit d77f4d9bf348534a2a5b2498d0ea7fbe5297521c

@ -1 +1 @@
Subproject commit 6f4ff1b691828e538ae534eac66e80a1bf2c1adf
Subproject commit ad703da04d2ffbf84a75e5ee32f2829380864bb7