Block territory claiming and setting clan homes in the nether

This commit is contained in:
AlexTheCoder 2017-06-12 01:02:38 -04:00
parent c265b235be
commit 3d88c2c9a5

View File

@ -500,13 +500,19 @@ public class NetherManager extends MiniPlugin
@EventHandler
public void onTpHome(ClansCommandExecutedEvent event)
{
if (!isInNether(event.getPlayer()))
{
return;
}
if (event.getCommand().equalsIgnoreCase("tphome") || event.getCommand().equalsIgnoreCase("stuck"))
{
if (isInNether(event.getPlayer()))
{
event.setCancelled(true);
UtilPlayer.message(event.getPlayer(), F.main(getName(), "You cannot teleport while in " + F.clansNether("The Nether") + "!"));
}
event.setCancelled(true);
UtilPlayer.message(event.getPlayer(), F.main(getName(), "You cannot teleport while in " + F.clansNether("The Nether") + "!"));
}
if (event.getCommand().equalsIgnoreCase("claim") || event.getCommand().equalsIgnoreCase("unclaim") || event.getCommand().equalsIgnoreCase("unclaimall") || event.getCommand().equalsIgnoreCase("homeset"))
{
event.setCancelled(true);
UtilPlayer.message(event.getPlayer(), F.main(getName(), "You cannot manage your clan's territory while in " + F.clansNether("The Nether") + "!"));
}
}