Fix player collision patch cleanup (#5947)

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-06-22 15:58:20 +02:00 committet von GitHub
Ursprung a9394b8c1a
Commit f110140f96
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -32,7 +32,7 @@ index 8885220e4813b34627b42523834bbec995d8950d..4c9660176e783999301565790b8cf6f4
buf.writeComponent(this.playerPrefix);
buf.writeComponent(this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e250db8035b2d53e724a47da6dc6118d85ca148b..7dca3357b8a758172ed09a8c1f823d9a94435f25 100644
index e250db8035b2d53e724a47da6dc6118d85ca148b..6bed68a09e427f0846f322b5a30a44ed09654fa6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -163,6 +163,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
@ -51,7 +51,7 @@ index e250db8035b2d53e724a47da6dc6118d85ca148b..7dca3357b8a758172ed09a8c1f823d9a
+ final ServerScoreboard scoreboard = this.getScoreboard();
+ final java.util.Collection<String> toRemove = scoreboard.getPlayerTeams().stream().filter(team -> team.getName().startsWith("collideRule_")).map(PlayerTeam::getName).collect(java.util.stream.Collectors.toList());
+ for (String teamName : toRemove) {
+ scoreboard.removePlayerTeam(scoreboard.getPlayersTeam(teamName)); // Clean up after ourselves
+ scoreboard.removePlayerTeam(scoreboard.getPlayerTeam(teamName)); // Clean up after ourselves
+ }
+
+ if (!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions) {