Prevent claiming via gui in nether or raid worlds
This commit is contained in:
parent
802cde9280
commit
01df9b7e44
@ -9,6 +9,7 @@ import org.bukkit.event.inventory.ClickType;
|
|||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilWorld;
|
import mineplex.core.common.util.UtilWorld;
|
||||||
import mineplex.game.clans.clans.ClanInfo;
|
import mineplex.game.clans.clans.ClanInfo;
|
||||||
import mineplex.game.clans.clans.ClanRole;
|
import mineplex.game.clans.clans.ClanRole;
|
||||||
@ -27,12 +28,18 @@ public class ClanTerritoryButton extends ClanButton
|
|||||||
{
|
{
|
||||||
if (UtilServer.CallEvent(new ClansButtonClickEvent(player, ClansButtonClickEvent.ButtonType.Territory)).isCancelled())
|
if (UtilServer.CallEvent(new ClansButtonClickEvent(player, ClansButtonClickEvent.ButtonType.Territory)).isCancelled())
|
||||||
return;
|
return;
|
||||||
// if (_clansManager.getNetherManager().isInNether(player))
|
if (_clansManager.getNetherManager().isInNether(player))
|
||||||
// {
|
{
|
||||||
// _clansManager.message(player, "You are not allowed to do anything with Territory while in " + F.clansNether("The Nether") + ".");
|
UtilPlayer.message(player, F.main(_clansManager.getNetherManager().getName(), "You cannot manage your clan's territory while in " + F.clansNether("The Nether") + "!"));
|
||||||
// player.closeInventory();
|
player.closeInventory();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
if (_clansManager.getWorldEvent().getRaidManager().isInRaid(player.getLocation()))
|
||||||
|
{
|
||||||
|
UtilPlayer.message(player, F.main(_clansManager.getWorldEvent().getRaidManager().getName(), "You cannot manage your clan's territory while in a raid!"));
|
||||||
|
player.closeInventory();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (clickType == ClickType.LEFT)
|
if (clickType == ClickType.LEFT)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user