Don't allow warping to unclaimed territory. Fix #37

This commit is contained in:
Magnus Ulf 2019-08-11 16:21:56 +02:00
parent cd3b846ae1
commit 98be34e20b

View File

@ -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("<h>%s <i>in <reset>%s<i>.", warp.getName(), faction.describeTo(msender, false));
// Must be valid
if (!warp.verifyIsValid()) return;
// Any and MPerm
if ( ! MPerm.getPermWarp().has(msender, faction, true)) return;