Fix players not being added to collide rule (Fixes #6024)
This commit is contained in:
parent
ba7ffd06e9
commit
143f38113e
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ index e250db8035b2d53e724a47da6dc6118d85ca148b..6bed68a09e427f0846f322b5a30a44ed
|
||||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||||
this.connection.acceptConnections();
|
this.connection.acceptConnections();
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index dd0cde1ef149ae708fa7b0c043acfcc489fe497c..9cd5ed55c8ee13412662a2d7a5b636833e3a813e 100644
|
index dd0cde1ef149ae708fa7b0c043acfcc489fe497c..9af086f022ed41081a77d9cf82b04567967b4b61 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -85,6 +85,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
@@ -85,6 +85,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
||||||
|
@ -90,7 +90,7 @@ index dd0cde1ef149ae708fa7b0c043acfcc489fe497c..9cd5ed55c8ee13412662a2d7a5b63683
|
||||||
// CraftBukkit - Moved from above, added world
|
// CraftBukkit - Moved from above, added world
|
||||||
+ // Paper start - Add to collideRule team if needed
|
+ // Paper start - Add to collideRule team if needed
|
||||||
+ final Scoreboard scoreboard = this.getServer().getLevel(Level.OVERWORLD).getScoreboard();
|
+ final Scoreboard scoreboard = this.getServer().getLevel(Level.OVERWORLD).getScoreboard();
|
||||||
+ final PlayerTeam collideRuleTeam = scoreboard.getPlayersTeam(this.collideRuleTeamName);
|
+ final PlayerTeam collideRuleTeam = scoreboard.getPlayerTeam(this.collideRuleTeamName);
|
||||||
+ if (this.collideRuleTeamName != null && collideRuleTeam != null && player.getTeam() == null) {
|
+ if (this.collideRuleTeamName != null && collideRuleTeam != null && player.getTeam() == null) {
|
||||||
+ scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
+ scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam);
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue