Semi-rename home/warp MPerms

So the names for MPerms have been renamed, but their id's have not
This commit is contained in:
Magnus Ulf
2019-01-27 17:29:28 +01:00
parent 19de471de0
commit 442e90759d
6 changed files with 62 additions and 13 deletions

View File

@@ -46,7 +46,7 @@ public class CmdFactionsWarpAdd extends FactionsCommandWarp
Warp warp = new Warp(name, ps);
// MPerm
if ( ! MPerm.getPermSethome().has(msender, faction, true)) return;
if ( ! MPerm.getPermSetwarp().has(msender, faction, true)) return;
if (faction.getWarps().getAll().stream().map(Warp::getName).anyMatch(s -> s.equalsIgnoreCase(name)))
{

View File

@@ -54,7 +54,7 @@ public class CmdFactionsWarpGo extends FactionsCommandWarp
String warpDesc = Txt.parse("<h>%s <i>in <reset>%s<i>.", warp.getName(), faction.describeTo(msender, false));
// Any and MPerm
if ( ! MPerm.getPermHome().has(msender, faction, true)) return;
if ( ! MPerm.getPermWarp().has(msender, faction, true)) return;
if ( ! MConf.get().warpsTeleportAllowedFromEnemyTerritory && msender.isInEnemyTerritory())
{

View File

@@ -36,7 +36,7 @@ public class CmdFactionsWarpList extends FactionsCommandWarp
int idx = this.readArg();
// Any and MPerm
if ( ! MPerm.getPermHome().has(msender, faction, true)) return;
if ( ! MPerm.getPermWarp().has(msender, faction, true)) return;
Pager<Warp> pager = new Pager<>(this, "Warps for " + faction.getName(), idx, faction.getWarps().getAll());
pager.setMsonifier((Stringifier<Warp>) (warp, i) ->

View File

@@ -33,7 +33,7 @@ public class CmdFactionsWarpRemove extends FactionsCommandWarp
Warp warp = TypeWarp.get(faction).read(this.argAt(0), sender);
// Any and MPerm
if ( ! MPerm.getPermSethome().has(msender, faction, true)) return;
if ( ! MPerm.getPermSetwarp().has(msender, faction, true)) return;
// Event
EventFactionsWarpRemove event = new EventFactionsWarpRemove(sender, faction, warp);