aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/server/commands/SetSpawnCommand.java.patch
blob: 356262cf04820d75ee0ae9ced20e0961b88c748e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- a/net/minecraft/server/commands/SetSpawnCommand.java
+++ b/net/minecraft/server/commands/SetSpawnCommand.java
@@ -67,8 +38,10 @@
     private static int setSpawn(CommandSourceStack source, Collection<ServerPlayer> targets, BlockPos pos, float angle) {
         ResourceKey<Level> resourceKey = source.getLevel().dimension();
 
-        for (ServerPlayer serverPlayer : targets) {
-            serverPlayer.setRespawnPosition(resourceKey, pos, angle, true, false);
+        while (iterator.hasNext()) {
+            ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+
+            entityplayer.setRespawnPosition(resourcekey, pos, angle, true, false, org.bukkit.event.player.PlayerSpawnChangeEvent.Cause.COMMAND); // CraftBukkit
         }
 
         String string = resourceKey.location().toString();