diff --git a/pom.xml b/pom.xml
index a652e920..519dfd84 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.massivecraft
Factions
- 1.6.9.5-U0.2.1-1.3-BETA
+ 1.6.9.5-U0.2.1-1.4-BETA
jar
SaberFactions
diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java b/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java
index 2d5a90d6..869cf301 100644
--- a/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java
+++ b/src/main/java/com/massivecraft/factions/cmd/CmdFGlobal.java
@@ -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
diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java b/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java
new file mode 100644
index 00000000..6331f84a
--- /dev/null
+++ b/src/main/java/com/massivecraft/factions/cmd/CmdViewChest.java
@@ -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;
+ }
+}
+
diff --git a/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java b/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java
index 8cb9c1b3..327304dd 100644
--- a/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java
+++ b/src/main/java/com/massivecraft/factions/cmd/FCmdRoot.java
@@ -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")) {
diff --git a/src/main/java/com/massivecraft/factions/struct/Permission.java b/src/main/java/com/massivecraft/factions/struct/Permission.java
index 357f92ed..fda3f115 100644
--- a/src/main/java/com/massivecraft/factions/struct/Permission.java
+++ b/src/main/java/com/massivecraft/factions/struct/Permission.java
@@ -99,6 +99,7 @@ public enum Permission {
SEECHUNK("seechunk"),
SETWARP("setwarp"),
TOP("top"),
+ VIEWCHEST("viewchest"),
VAULT("vault"),
GETVAULT("getvault"),
SETMAXVAULTS("setmaxvaults"),
diff --git a/src/main/java/com/massivecraft/factions/zcore/util/TL.java b/src/main/java/com/massivecraft/factions/zcore/util/TL.java
index 88f7f9f4..05f997a8 100644
--- a/src/main/java/com/massivecraft/factions/zcore/util/TL.java
+++ b/src/main/java/com/massivecraft/factions/zcore/util/TL.java
@@ -654,6 +654,8 @@ public enum TL {
COMMAND_STRIKEGIVE_DESCRIPTION("Give a faction strikes"),
+ COMMAND_VIEWCHEST_DESCRIPTION("view a factions chest/pv"),
+
COMMAND_VAULT_DESCRIPTION("Open your placed faction vault!"),
COMMAND_VAULT_INVALID("&c&l[!]&7 Your vault was either&c claimed&7, &cbroken&7, or has&c not been&7 placed yet."),
COMMAND_VAULT_OPENING("&c&l[!]&7 Opening faction vault."),
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index e57fd629..f01794bd 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -126,6 +126,8 @@ permissions:
description: ability to change/modify strike counts
factions.spam:
description: ability to toggle spam commands on and off
+ factions.viewchest:
+ description: ability to view a factions chest/pv
factions.grace:
description: gives ability to toggle grace period on and off
factions.invsee: