PC-372
This commit is contained in:
parent
26d3a77748
commit
1ecd46f7ee
@ -561,16 +561,23 @@ public class GameHostManager implements Listener
|
|||||||
@EventHandler
|
@EventHandler
|
||||||
public void whitelistCommand(PlayerCommandPreprocessEvent event)
|
public void whitelistCommand(PlayerCommandPreprocessEvent event)
|
||||||
{
|
{
|
||||||
if (_host == null || !event.getPlayer().equals(_host))
|
if (_host == null)
|
||||||
return;
|
return;
|
||||||
if (isCommunityServer())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!event.getMessage().toLowerCase().startsWith("/whitelist"))
|
if (!event.getMessage().toLowerCase().startsWith("/whitelist"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!isPrivateServer())
|
if (!event.getPlayer().equals(_host))
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
UtilPlayer.message(event.getPlayer(), F.main("MPS", "You do not have permission to whitelist players. Ask the MPS host"));
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
if (isCommunityServer() || !isPrivateServer())
|
||||||
|
{
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user