fixed logic on setgame
This commit is contained in:
parent
80588a308b
commit
25f93bac2e
@ -82,13 +82,30 @@ public class EventModule extends MiniPlugin
|
||||
if (!event.getMessage().toLowerCase().startsWith("/sethost "))
|
||||
return;
|
||||
|
||||
boolean eventTestServer = _plugin.getConfig().getString("serverstatus.name").equalsIgnoreCase("SMTestServer-1");
|
||||
|
||||
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.JNR_DEV, true)
|
||||
&& !event.getPlayer().isOp() &&
|
||||
(!eventTestServer && !Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.SNR_MODERATOR, true)))
|
||||
return;
|
||||
|
||||
//Player isnt OP! Check if allowed.
|
||||
if (!event.getPlayer().isOp())
|
||||
{
|
||||
//Not JNR Dev either
|
||||
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.JNR_DEV, true))
|
||||
{
|
||||
boolean eventTestServer = _plugin.getConfig().getString("serverstatus.name").equalsIgnoreCase("SMTestServer-1");
|
||||
|
||||
//NOT EVENT TEST!
|
||||
if (!eventTestServer)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not Snr Mod
|
||||
if (!Manager.GetClients().Get(event.getPlayer()).GetRank().Has(event.getPlayer(), Rank.SNR_MODERATOR, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Manager.GetServerConfig().HostName = event.getMessage().split(" ")[1];
|
||||
|
||||
event.getPlayer().sendMessage("Set host to: " + event.getMessage().split(" ")[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user