PaperMC/paper-server/nms-patches/net/minecraft/server/commands/CommandSpreadPlayers.patch
CraftBukkit/Spigot b97cc9b99f #1209: Clean up various patches
By: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-06-24 17:15:05 +10:00

20 lines
1.3 KiB
Diff

--- a/net/minecraft/server/commands/CommandSpreadPlayers.java
+++ b/net/minecraft/server/commands/CommandSpreadPlayers.java
@@ -92,7 +92,7 @@
if (entity instanceof EntityHuman) {
set.add(entity.getTeam());
} else {
- set.add((Object) null);
+ set.add((ScoreboardTeamBase) null); // CraftBukkit - decompile error
}
}
@@ -202,7 +202,7 @@
commandspreadplayers_a = acommandspreadplayers_a[j++];
}
- entity.teleportTo(worldserver, (double) MathHelper.floor(commandspreadplayers_a.x) + 0.5D, (double) commandspreadplayers_a.getSpawnY(worldserver, i), (double) MathHelper.floor(commandspreadplayers_a.z) + 0.5D, Set.of(), entity.getYRot(), entity.getXRot());
+ entity.teleportTo(worldserver, (double) MathHelper.floor(commandspreadplayers_a.x) + 0.5D, (double) commandspreadplayers_a.getSpawnY(worldserver, i), (double) MathHelper.floor(commandspreadplayers_a.z) + 0.5D, Set.of(), entity.getYRot(), entity.getXRot(), org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.COMMAND); // CraftBukkit - handle teleport reason
d1 = Double.MAX_VALUE;
CommandSpreadPlayers.a[] acommandspreadplayers_a1 = acommandspreadplayers_a;
int k = acommandspreadplayers_a.length;