You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
index 217d6b3077ff0cc9524104f0aeb043e2271e96d1..1f2a7435aacf9925228de8eb3a5d38eff437ba82 100644
1449
+
index 406849772f764eb5f5f986ea5e3e0213f83b3255..758cb258a7e0478bfaacfc1b6c93ce8a501b0e6c 100644
1450
1450
--- a/net/minecraft/network/PacketProcessor.java
1451
1451
+++ b/net/minecraft/network/PacketProcessor.java
1452
1452
@@ -103,7 +103,10 @@ public class PacketProcessor implements AutoCloseable {
1453
-
if (this.listener instanceof net.minecraft.server.network.ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // Paper - Don't handle sync packets for kicked players
1453
+
if (this.listener instanceof net.minecraft.server.network.ServerCommonPacketListenerImpl serverCommonPacketListener && (serverCommonPacketListener.processedDisconnect || serverCommonPacketListener.handledDisconnect)) return; // Paper - Don't handle sync packets for kicked players // Folia - correctly handle cases where the configuration listener disconnects, ensure that no login packets get processed
1454
1454
if (this.listener.shouldHandleMessage(this.packet)) {
1455
1455
try {
1456
1456
+ final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle profiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler(); // Folia - profiler
@@ -1461,7 +1461,7 @@ index 217d6b3077ff0cc9524104f0aeb043e2271e96d1..1f2a7435aacf9925228de8eb3a5d38ef
1461
1461
if (var3 instanceof ReportedException reportedException && reportedException.getCause() instanceof OutOfMemoryError) {
public int getSpawnLimit(SpawnCategory spawnCategory) {
1203
-
+ io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Cannot modify server settings off of the global region"); // Folia - region threading
1204
-
Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
1205
-
Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
1206
-
1207
-
@@ -1534,6 +1559,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1201
+
@@ -1534,6 +1558,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1208
1202
1209
1203
@Override
1210
1204
public void setSpawnLimit(SpawnCategory spawnCategory, int limit) {
1211
1205
+ io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Cannot modify server settings off of the global region"); // Folia - region threading
1212
1206
Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
1213
1207
Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
1214
1208
1215
-
@@ -1591,7 +1617,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1209
+
@@ -1591,7 +1616,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1216
1210
if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return;
1217
1211
1218
1212
ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
@@ -1221,7 +1215,7 @@ index 6cd3469d49f0e56f212d393f133205aa3b295a88..df936767a7d7a252d362bd97cad4aaf0
@@ -1663,6 +1689,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1227
+
@@ -1663,6 +1688,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1234
1228
@SuppressWarnings({"unchecked", "rawtypes"})
1235
1229
@Override
1236
1230
public boolean setGameRuleValue(String rule, String value) {
1237
1231
+ io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Cannot modify server settings off of the global region"); // Folia - region threading
1238
1232
// No null values allowed
1239
1233
if (rule == null || value == null) return false;
1240
1234
1241
-
@@ -1726,6 +1753,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1235
+
@@ -1726,6 +1752,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1242
1236
1243
1237
@Override
1244
1238
public <T> boolean setGameRule(org.bukkit.@NotNull GameRule<T> rule, @NotNull T newValue) {
1245
1239
+ io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Cannot modify server settings off of the global region"); // Folia - region threading
1246
1240
Preconditions.checkArgument(rule != null, "GameRule cannot be null");
1247
1241
Preconditions.checkArgument(newValue != null, "GameRule value cannot be null");
1248
1242
1249
-
@@ -1879,6 +1907,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1243
+
@@ -1879,6 +1906,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
1250
1244
1251
1245
@Override
1252
1246
public void sendGameEvent(Entity sourceEntity, org.bukkit.GameEvent gameEvent, Vector position) {
@@ -1259,7 +1253,7 @@ index 6cd3469d49f0e56f212d393f133205aa3b295a88..df936767a7d7a252d362bd97cad4aaf0
0 commit comments