Simplify handling of spawning not online fake players
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user