1.4 Beta Initiated
- Fixed F Inspect - Added F Global - Toggle Global Chat - Added F ViewChest - View a Factions Chest - Updated Perms in plugin.yml
This commit is contained in:
@@ -41,7 +41,7 @@ public class CmdFGlobal extends FCommand {
|
||||
toggled.add(p.getUniqueId());
|
||||
}
|
||||
|
||||
fme.msg(TL.COMMAND_F_GLOBAL_TOGGLE, toggled.contains(p.getUniqueId()) ? "enabled" : "disabled");
|
||||
fme.msg(TL.COMMAND_F_GLOBAL_TOGGLE, toggled.contains(p.getUniqueId()) ? "disabled" : "enabled");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.massivecraft.factions.cmd;
|
||||
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.SaberFactions;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
|
||||
public class CmdViewChest extends FCommand {
|
||||
|
||||
public CmdViewChest() {
|
||||
this.aliases.add("viewchest");
|
||||
this.aliases.add("viewpv");
|
||||
|
||||
this.requiredArgs.add("faction name");
|
||||
|
||||
|
||||
this.permission = Permission.VIEWCHEST.node;
|
||||
this.disableOnLock = false;
|
||||
|
||||
senderMustBePlayer = true;
|
||||
senderMustBeMember = false;
|
||||
senderMustBeModerator = false;
|
||||
senderMustBeAdmin = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
if (!SaberFactions.plugin.getConfig().getBoolean("fchest.Enabled")) {
|
||||
fme.msg(TL.GENERIC_DISABLED);
|
||||
return;
|
||||
}
|
||||
|
||||
Faction faction = this.argAsFaction(0, fme == null ? null : myFaction);
|
||||
if (faction == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
me.openInventory(faction.getChestInventory());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_VIEWCHEST_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,6 +112,7 @@ public class FCmdRoot extends FCommand {
|
||||
public CmdCorner cmdCorner = new CmdCorner();
|
||||
public CmdInventorySee cmdInventorySee = new CmdInventorySee();
|
||||
public CmdFGlobal cmdFGlobal = new CmdFGlobal();
|
||||
public CmdViewChest cmdViewChest = new CmdViewChest();
|
||||
|
||||
|
||||
|
||||
@@ -229,6 +230,7 @@ public class FCmdRoot extends FCommand {
|
||||
this.addSubCommand(this.cmdSpam);
|
||||
this.addSubCommand(this.cmdCorner);
|
||||
this.addSubCommand(this.cmdFGlobal);
|
||||
this.addSubCommand(this.cmdViewChest);
|
||||
|
||||
|
||||
if (SaberFactions.plugin.getConfig().getBoolean("f-inventory-see.Enabled")) {
|
||||
|
||||
Reference in New Issue
Block a user