cannot shadow other players if you are not OP. Fixes #208

This commit is contained in:
gnembon committed 2020-04-12 20:47:39 -03:00
1 parent 66e361167d
commit 19a01bee1b
1 file changed
+8
@@ -296,6 +296,14 @@ public class PlayerCommand
Messenger.m(context.getSource(), "r Cannot shadow fake players");
return 0;
}
ServerPlayerEntity sendingPlayer = null;
try
{
sendingPlayer = context.getSource().getPlayer();
}
catch (CommandSyntaxException ignored) { }
if (sendingPlayer!=player && cantManipulate(context)) return 0;
EntityPlayerMPFake.createShadow(player.server, player);
return 1;
}