geforkt von Mirrors/Paper
and some more patches
Dieser Commit ist enthalten in:
Ursprung
4c24ef27fa
Commit
d5469c16d1
@ -20,9 +20,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
server.getPluginManager().callEvent(asyncEvent);
|
server.getPluginManager().callEvent(asyncEvent);
|
||||||
+ profile = asyncEvent.getPlayerProfile();
|
+ profile = asyncEvent.getPlayerProfile();
|
||||||
+ profile.complete();
|
+ profile.complete();
|
||||||
+ gameProfile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
|
+ gameprofile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
|
||||||
+ playerName = gameProfile.getName();
|
+ playerName = gameprofile.getName();
|
||||||
+ uniqueId = gameProfile.getId();
|
+ uniqueId = gameprofile.getId();
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
if (PlayerPreLoginEvent.getHandlerList().getRegisteredListeners().length != 0) {
|
||||||
|
@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
if (!this.player.containerMenu.stillValid(this.player)) {
|
if (!this.player.containerMenu.stillValid(this.player)) {
|
||||||
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
||||||
} else {
|
} else {
|
||||||
@ -37,18 +37,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ recipeName = CraftNamespacedKey.toMinecraft(((org.bukkit.Keyed) event.getRecipe()).getKey());
|
+ recipeName = CraftNamespacedKey.toMinecraft(((org.bukkit.Keyed) event.getRecipe()).getKey());
|
||||||
+ makeAll = event.isShiftClick();
|
+ makeAll = event.isShiftClick();
|
||||||
+ }
|
+ }
|
||||||
+ if (!(this.player.containerMenu instanceof RecipeBookMenu<?>)) {
|
+ if (!(this.player.containerMenu instanceof RecipeBookMenu<?> recipeBookMenu)) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
// Cast to keyed should be safe as the recipe will never be a MerchantRecipe.
|
// Cast to keyed should be safe as the recipe will never be a MerchantRecipe.
|
||||||
- this.server.getRecipeManager().byKey(CraftNamespacedKey.toMinecraft(((org.bukkit.Keyed) event.getRecipe()).getKey())).ifPresent((irecipe) -> {
|
- this.server.getRecipeManager().byKey(CraftNamespacedKey.toMinecraft(((org.bukkit.Keyed) event.getRecipe()).getKey())).ifPresent((recipeholder) -> {
|
||||||
- ((RecipeBookMenu) this.player.containerMenu).handlePlacement(event.isShiftClick(), irecipe, this.player);
|
- ((RecipeBookMenu) this.player.containerMenu).handlePlacement(event.isShiftClick(), recipeholder, this.player);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ final boolean finalMakeAll = makeAll;
|
+ final boolean finalMakeAll = makeAll;
|
||||||
+ this.server.getRecipeManager().byKey(recipeName).ifPresent((irecipe) -> {
|
+ this.server.getRecipeManager().byKey(recipeName).ifPresent((recipeholder) -> {
|
||||||
+ ((RecipeBookMenu) this.player.containerMenu).handlePlacement(finalMakeAll, irecipe, this.player);
|
+ recipeBookMenu.handlePlacement(finalMakeAll, recipeholder, this.player);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
});
|
});
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
@ -21,7 +21,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||||
if (!this.server.isCommandBlockEnabled()) {
|
if (!this.server.isCommandBlockEnabled()) {
|
||||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||||
@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
||||||
} else {
|
} else {
|
||||||
BaseCommandBlock commandblocklistenerabstract = null;
|
BaseCommandBlock commandblocklistenerabstract = null;
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||||
if (!this.server.isCommandBlockEnabled()) {
|
if (!this.server.isCommandBlockEnabled()) {
|
||||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||||
implementation("commons-lang:commons-lang:2.6")
|
implementation("commons-lang:commons-lang:2.6")
|
||||||
+ implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
+ implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
|
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||||
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
|
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||||
@@ -0,0 +0,0 @@ tasks.check {
|
@@ -0,0 +0,0 @@ tasks.check {
|
||||||
}
|
}
|
||||||
@ -498,22 +498,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||||
@@ -0,0 +0,0 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -0,0 +0,0 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
});
|
public static final AttributeKey<ConnectionProtocol.CodecData<?>> ATTRIBUTE_SERVERBOUND_PROTOCOL = AttributeKey.valueOf("serverbound_protocol");
|
||||||
public static final AttributeKey<ConnectionProtocol> ATTRIBUTE_PROTOCOL = AttributeKey.valueOf("protocol");
|
public static final AttributeKey<ConnectionProtocol.CodecData<?>> ATTRIBUTE_CLIENTBOUND_PROTOCOL = AttributeKey.valueOf("clientbound_protocol");
|
||||||
public static final LazyLoadedValue<NioEventLoopGroup> NETWORK_WORKER_GROUP = new LazyLoadedValue<>(() -> {
|
public static final Supplier<NioEventLoopGroup> NETWORK_WORKER_GROUP = Suppliers.memoize(() -> {
|
||||||
- return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Client IO #%d").setDaemon(true).build());
|
- return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Client IO #%d").setDaemon(true).build());
|
||||||
+ return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Client IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
+ return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Client IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
||||||
});
|
});
|
||||||
public static final LazyLoadedValue<EpollEventLoopGroup> NETWORK_EPOLL_WORKER_GROUP = new LazyLoadedValue<>(() -> {
|
public static final Supplier<EpollEventLoopGroup> NETWORK_EPOLL_WORKER_GROUP = Suppliers.memoize(() -> {
|
||||||
- return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Client IO #%d").setDaemon(true).build());
|
- return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Client IO #%d").setDaemon(true).build());
|
||||||
+ return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Client IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
+ return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Client IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
||||||
});
|
});
|
||||||
public static final LazyLoadedValue<DefaultEventLoopGroup> LOCAL_WORKER_GROUP = new LazyLoadedValue<>(() -> {
|
public static final Supplier<DefaultEventLoopGroup> LOCAL_WORKER_GROUP = Suppliers.memoize(() -> {
|
||||||
- return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).build());
|
- return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).build());
|
||||||
+ return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
+ return new DefaultEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Local Client IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
||||||
});
|
});
|
||||||
private final PacketFlow receiving;
|
private final PacketFlow receiving;
|
||||||
private final Queue<Connection.PacketHolder> queue = Queues.newConcurrentLinkedQueue();
|
private final Queue<Consumer<Connection>> pendingActions = Queues.newConcurrentLinkedQueue();
|
||||||
@@ -0,0 +0,0 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -0,0 +0,0 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -559,6 +559,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
getAddToWorldStackTrace(entity).printStackTrace();
|
getAddToWorldStackTrace(entity).printStackTrace();
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||||
|
@@ -0,0 +0,0 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||||
|
ServerConfigurationPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
|
||||||
|
// Paper start
|
||||||
|
if (MinecraftServer.getServer().isDebugging()) {
|
||||||
|
- exception.printStackTrace();
|
||||||
|
+ io.papermc.paper.util.TraceUtil.printStackTrace(exception);
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
|
this.connection.send(new ClientboundDisconnectPacket(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA));
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
|
||||||
@ -566,29 +579,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public class ServerConnectionListener {
|
@@ -0,0 +0,0 @@ public class ServerConnectionListener {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
public static final LazyLoadedValue<NioEventLoopGroup> SERVER_EVENT_GROUP = new LazyLoadedValue<>(() -> {
|
public static final Supplier<NioEventLoopGroup> SERVER_EVENT_GROUP = Suppliers.memoize(() -> {
|
||||||
- return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).build());
|
- return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).build());
|
||||||
+ return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
+ return new NioEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Server IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
||||||
});
|
});
|
||||||
public static final LazyLoadedValue<EpollEventLoopGroup> SERVER_EPOLL_EVENT_GROUP = new LazyLoadedValue<>(() -> {
|
public static final Supplier<EpollEventLoopGroup> SERVER_EPOLL_EVENT_GROUP = Suppliers.memoize(() -> {
|
||||||
- return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Server IO #%d").setDaemon(true).build());
|
- return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Server IO #%d").setDaemon(true).build());
|
||||||
+ return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Server IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
+ return new EpollEventLoopGroup(0, (new ThreadFactoryBuilder()).setNameFormat("Netty Epoll Server IO #%d").setDaemon(true).setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(LOGGER)).build()); // Paper
|
||||||
});
|
});
|
||||||
final MinecraftServer server;
|
final MinecraftServer server;
|
||||||
public volatile boolean running;
|
public volatile boolean running;
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
|
||||||
@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
|
||||||
MutableComponent ichatmutablecomponent = Component.translatable("multiplayer.disconnect.invalid_player_data");
|
|
||||||
// Paper start
|
|
||||||
if (MinecraftServer.getServer().isDebugging()) {
|
|
||||||
- exception.printStackTrace();
|
|
||||||
+ io.papermc.paper.util.TraceUtil.printStackTrace(exception);
|
|
||||||
}
|
|
||||||
// Paper end
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
|
||||||
@ -644,7 +644,7 @@ diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
@@ -0,0 +0,0 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
@@ -0,0 +0,0 @@ public class WatchdogThread extends Thread
|
||||||
log.log( Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity" );
|
log.log( Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity" );
|
||||||
log.log( Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated" );
|
log.log( Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated" );
|
||||||
log.log( Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage());
|
log.log( Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage());
|
||||||
@ -653,7 +653,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
{
|
{
|
||||||
log.log( Level.SEVERE, "\t\t" + stack );
|
log.log( Level.SEVERE, "\t\t" + stack );
|
||||||
}
|
}
|
||||||
@@ -0,0 +0,0 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
@@ -0,0 +0,0 @@ public class WatchdogThread extends Thread
|
||||||
}
|
}
|
||||||
log.log( Level.SEVERE, "\tStack:" );
|
log.log( Level.SEVERE, "\tStack:" );
|
||||||
//
|
//
|
@ -28,9 +28,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
|
+ public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
// Paper start - rewrite chunk system
|
if (this.position.x != x || this.position.y != y || this.position.z != z) {
|
||||||
if (this.updatingSectionStatus) {
|
this.position = new Vec3(x, y, z);
|
||||||
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
|
int i = Mth.floor(x);
|
||||||
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.levelCallback.onMove();
|
this.levelCallback.onMove();
|
||||||
}
|
}
|
@ -82,7 +82,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
@@ -0,0 +0,0 @@ public class ServerPlayer extends Player {
|
||||||
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||||
|
|
||||||
this.connection.send(new ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), (byte) 3, this.getLastDeathLocation(), this.getPortalCooldown()));
|
this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3));
|
||||||
- this.connection.send(new ClientboundChangeDifficultyPacket(this.level().getDifficulty(), this.level().getLevelData().isDifficultyLocked()));
|
- this.connection.send(new ClientboundChangeDifficultyPacket(this.level().getDifficulty(), this.level().getLevelData().isDifficultyLocked()));
|
||||||
+ this.connection.send(new ClientboundChangeDifficultyPacket(worldserver.getDifficulty(), this.level().getLevelData().isDifficultyLocked())); // Paper - fix difficulty sync issue
|
+ this.connection.send(new ClientboundChangeDifficultyPacket(worldserver.getDifficulty(), this.level().getLevelData().isDifficultyLocked())); // Paper - fix difficulty sync issue
|
||||||
PlayerList playerlist = this.server.getPlayerList();
|
PlayerList playerlist = this.server.getPlayerList();
|
||||||
@ -92,7 +92,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
||||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
@ -12,8 +12,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
public boolean addPotionEffect(PotionEffect effect, boolean force) {
|
||||||
- this.getHandle().addEffect(new MobEffectInstance(MobEffect.byId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles()), EntityPotionEffectEvent.Cause.PLUGIN);
|
- this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraft(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles()), EntityPotionEffectEvent.Cause.PLUGIN);
|
||||||
+ this.getHandle().addEffect(new MobEffectInstance(MobEffect.byId(effect.getType().getId()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
+ this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraft(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()), EntityPotionEffectEvent.Cause.PLUGIN); // Paper - Don't ignore icon
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -38,12 +38,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
@@ -0,0 +0,0 @@ public class PistonBaseBlock extends DirectionalBlock {
|
@@ -0,0 +0,0 @@ public class PistonBaseBlock extends DirectionalBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (k = list.size() - 1; k >= 0; --k) {
|
for (j = list.size() - 1; j >= 0; --j) {
|
||||||
- blockposition3 = (BlockPos) list.get(k);
|
- blockposition3 = (BlockPos) list.get(j);
|
||||||
- iblockdata1 = world.getBlockState(blockposition3);
|
- iblockdata1 = world.getBlockState(blockposition3);
|
||||||
+ // Paper start - fix a variety of piston desync dupes
|
+ // Paper start - fix a variety of piston desync dupes
|
||||||
+ boolean allowDesync = io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPistonDuplication;
|
+ boolean allowDesync = io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPistonDuplication;
|
||||||
+ BlockPos oldPos = blockposition3 = (BlockPos) list.get(k);
|
+ BlockPos oldPos = blockposition3 = (BlockPos) list.get(j);
|
||||||
+ iblockdata1 = allowDesync ? world.getBlockState(oldPos) : null;
|
+ iblockdata1 = allowDesync ? world.getBlockState(oldPos) : null;
|
||||||
+ // Paper end - fix a variety of piston desync dupes
|
+ // Paper end - fix a variety of piston desync dupes
|
||||||
blockposition3 = blockposition3.relative(enumdirection1);
|
blockposition3 = blockposition3.relative(enumdirection1);
|
||||||
@ -51,18 +51,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
BlockState iblockdata2 = (BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(PistonBaseBlock.FACING, dir);
|
BlockState iblockdata2 = (BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(PistonBaseBlock.FACING, dir);
|
||||||
|
|
||||||
world.setBlock(blockposition3, iblockdata2, 68);
|
world.setBlock(blockposition3, iblockdata2, 68);
|
||||||
- world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, (BlockState) list1.get(k), dir, retract, false));
|
- world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, (BlockState) list1.get(j), dir, retract, false));
|
||||||
+ // Paper start - fix a variety of piston desync dupes
|
+ // Paper start - fix a variety of piston desync dupes
|
||||||
+ if (!allowDesync) {
|
+ if (!allowDesync) {
|
||||||
+ iblockdata1 = world.getBlockState(oldPos);
|
+ iblockdata1 = world.getBlockState(oldPos);
|
||||||
+ map.replace(oldPos, iblockdata1);
|
+ map.replace(oldPos, iblockdata1);
|
||||||
+ }
|
+ }
|
||||||
+ world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, allowDesync ? list1.get(k) : iblockdata1, dir, retract, false));
|
+ world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, allowDesync ? list1.get(j) : iblockdata1, dir, retract, false));
|
||||||
+ if (!allowDesync) {
|
+ if (!allowDesync) {
|
||||||
+ world.setBlock(oldPos, Blocks.AIR.defaultBlockState(), Block.UPDATE_CLIENTS | Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_MOVE_BY_PISTON | 1024); // set air to prevent later physics updates from seeing this block
|
+ world.setBlock(oldPos, Blocks.AIR.defaultBlockState(), Block.UPDATE_CLIENTS | Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_MOVE_BY_PISTON | 1024); // set air to prevent later physics updates from seeing this block
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - fix a variety of piston desync dupes
|
+ // Paper end - fix a variety of piston desync dupes
|
||||||
aiblockdata[j++] = iblockdata1;
|
aiblockdata[i++] = iblockdata1;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
|
@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||||
@@ -0,0 +0,0 @@ public final class PaperCommand extends Command {
|
@@ -0,0 +0,0 @@ public final class PaperCommand extends Command {
|
||||||
|
commands.put(Set.of("dumpplugins"), new DumpPluginsCommand());
|
||||||
commands.put(Set.of("fixlight"), new FixLightCommand());
|
commands.put(Set.of("fixlight"), new FixLightCommand());
|
||||||
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand());
|
|
||||||
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
|
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
|
||||||
+ commands.put(Set.of("dumpitem"), new DumpItemCommand());
|
+ commands.put(Set.of("dumpitem"), new DumpItemCommand());
|
||||||
|
|
@ -30,15 +30,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
- com.destroystokyo.paper.profile.PlayerProfile profile = org.bukkit.Bukkit.createProfile(uniqueId, playerName);
|
- com.destroystokyo.paper.profile.PlayerProfile profile = org.bukkit.Bukkit.createProfile(uniqueId, playerName);
|
||||||
+ com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(ServerLoginPacketListenerImpl.this.gameProfile);
|
+ com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile);
|
||||||
AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile);
|
AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile);
|
||||||
server.getPluginManager().callEvent(asyncEvent);
|
server.getPluginManager().callEvent(asyncEvent);
|
||||||
profile = asyncEvent.getPlayerProfile();
|
profile = asyncEvent.getPlayerProfile();
|
||||||
- profile.complete();
|
- profile.complete();
|
||||||
+ profile.complete(true); // Paper - setPlayerProfileAPI
|
+ profile.complete(true); // Paper - setPlayerProfileAPI
|
||||||
gameProfile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
|
gameprofile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
|
||||||
playerName = gameProfile.getName();
|
playerName = gameprofile.getName();
|
||||||
uniqueId = gameProfile.getId();
|
uniqueId = gameprofile.getId();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||||
|
@ -17,7 +17,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
|
|
||||||
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
}
|
}
|
||||||
|
|
||||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
|
@ -50,14 +50,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
--- a/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
+++ b/src/main/java/net/minecraft/nbt/NbtUtils.java
|
||||||
@@ -0,0 +0,0 @@ public final class NbtUtils {
|
@@ -0,0 +0,0 @@ public final class NbtUtils {
|
||||||
if (nbt.contains("Name", 8)) {
|
@Nullable
|
||||||
string = nbt.getString("Name");
|
public static GameProfile readGameProfile(CompoundTag nbt) {
|
||||||
}
|
UUID uUID = nbt.hasUUID("Id") ? nbt.getUUID("Id") : Util.NIL_UUID;
|
||||||
+ // Paper start - support string UUID's
|
+ // Paper start - support string UUID's
|
||||||
+ if (nbt.contains("Id", 8)) {
|
+ if (nbt.contains("Id", Tag.TAG_STRING)) {
|
||||||
+ uUID = UUID.fromString(nbt.getString("Id"));
|
+ uUID = UUID.fromString(nbt.getString("Id"));
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
String string = nbt.getString("Name");
|
||||||
|
|
||||||
if (nbt.hasUUID("Id")) {
|
try {
|
||||||
uUID = nbt.getUUID("Id");
|
|
@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||||
@Override
|
@Override
|
||||||
public void handlePickItem(ServerboundPickItemPacket packet) {
|
public void handlePickItem(ServerboundPickItemPacket packet) {
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
|
@ -20,7 +20,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ this.server.waitForAsyncTasksShutdown(); // Paper
|
+ this.server.waitForAsyncTasksShutdown(); // Paper
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (this.getConnection() != null) {
|
this.getConnection().stop();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
@ -112,8 +112,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
public void save(@Nullable ProgressListener progressListener, boolean flush, boolean savingDisabled) {
|
public void save(@Nullable ProgressListener progressListener, boolean flush, boolean savingDisabled) {
|
||||||
// Paper start - rewrite chunk system - add close param
|
ServerChunkCache chunkproviderserver = this.getChunkSource();
|
||||||
this.save(progressListener, flush, savingDisabled, false);
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
@ -57,22 +57,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
// Paper end
|
// Paper end
|
||||||
this.running = false;
|
this.running = false;
|
||||||
if (waitForShutdown) {
|
if (waitForShutdown) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
|
||||||
@@ -0,0 +0,0 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@@ -0,0 +0,0 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
|
||||||
} catch (Exception exception) {
|
this.connection.resumeInboundAfterProtocolChange();
|
||||||
ServerLoginPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
|
} catch (Exception exception) {
|
||||||
MutableComponent ichatmutablecomponent = Component.translatable("multiplayer.disconnect.invalid_player_data");
|
ServerConfigurationPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (MinecraftServer.getServer().isDebugging()) {
|
+ if (MinecraftServer.getServer().isDebugging()) {
|
||||||
+ exception.printStackTrace();
|
+ exception.printStackTrace();
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
this.connection.send(new ClientboundDisconnectPacket(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA));
|
||||||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
|
||||||
this.connection.disconnect(ichatmutablecomponent);
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren