shadow-single-player-owner-fix: (#1687)

* shadow-single-player-owner-fix:
* Disallow shadowing a single player server owner. Fixes #1442

* shadow-single-player-owner-fix:
* Remove some redundant calls
This commit is contained in:
James McCulloch authored and GitHub committed 2023-04-01 12:22:04 +02:00
1 parent ea693d0fb1
commit e7c02ea21a
1 file changed
+4
@@ -365,6 +365,10 @@ public class PlayerCommand
Messenger.m(context.getSource(), "r Cannot shadow fake players");
return 0;
}
if (player.getServer().isSingleplayerOwner(player.getGameProfile())) {
Messenger.m(context.getSource(), "r Cannot shadow single-player server owner");
return 0;
}
ServerPlayer sendingPlayer = null;
try
{