From 98be34e20b71e0fd39e4d290b0543860be16ffbc Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Sun, 11 Aug 2019 16:21:56 +0200 Subject: [PATCH] Don't allow warping to unclaimed territory. Fix #37 --- src/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java b/src/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java index 5b98e568..0fd88dd8 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsWarpGo.java @@ -52,7 +52,10 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp Faction faction = this.readArgAt(1, msenderFaction); Warp warp = TypeWarp.get(faction).read(this.argAt(0), sender); String warpDesc = Txt.parse("%s in %s.", warp.getName(), faction.describeTo(msender, false)); - + + // Must be valid + if (!warp.verifyIsValid()) return; + // Any and MPerm if ( ! MPerm.getPermWarp().has(msender, faction, true)) return;