Adds per faction warps functionality from #72.
Default max warps per faction is 5. It can be changed in the config.yml.
You can now use {warps} in the info board to show how many warps a faction has when you walk into their territory.
Only faction mods+ can set faction warps.
This commit is contained in:
29
src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java
Normal file
29
src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
|
||||
public class CmdDelFWarp extends FCommand {
|
||||
|
||||
public CmdDelFWarp() {
|
||||
super();
|
||||
this.aliases.add("delwarp");
|
||||
this.aliases.add("dw");
|
||||
this.aliases.add("deletewarp");
|
||||
this.requiredArgs.add("warp name");
|
||||
this.senderMustBeMember = true;
|
||||
this.senderMustBeModerator = true;
|
||||
this.senderMustBePlayer = true;
|
||||
this.permission = Permission.SETWARP.node;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
String warp = argAsString(0);
|
||||
if (myFaction.isWarp(warp)) {
|
||||
myFaction.removeWarp(warp);
|
||||
fme.msg("<i>Deleted warp <a>%s", warp);
|
||||
} else {
|
||||
fme.msg("<i>Couldn't find warp <a>%s", warp);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user