Simplify handling of spawning not online fake players

This commit is contained in:
altrisi committed 2023-11-04 14:47:03 +01:00
1 parent fd7c337094
commit e1bd03cbef
2 files changed
+9 -6

No files matched your search

@@ -293,10 +293,12 @@ public class PlayerCommand
Messenger.m(source, "rb Player " + playerName + " cannot be placed outside of the world");
return 0;
}
EntityPlayerMPFake.createFake(playerName, source.getServer(), pos, facing.y, facing.x, dimType, mode, flying, () -> {
boolean success = EntityPlayerMPFake.createFake(playerName, source.getServer(), pos, facing.y, facing.x, dimType, mode, flying);
if (!success) {
Messenger.m(source, "rb Player " + playerName + " doesn't exist and cannot spawn in online mode. " +
"Turn the server offline to spawn non-existing players");
});
"Turn the server offline or the allowSpawningOfflinePlayers on to spawn non-existing players");
return 0;
};
return 1;
}