From e290ac0320085ca0f647bbeb75daa94a6c933b90 Mon Sep 17 00:00:00 2001 From: drtshock Date: Thu, 16 Oct 2014 13:35:21 -0500 Subject: [PATCH] Add new permissions to plugin.yml and permission kits. Set scoreboards to enabled per player by default. --- src/main/java/com/massivecraft/factions/cmd/CmdSB.java | 6 +++--- src/main/resources/plugin.yml | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdSB.java b/src/main/java/com/massivecraft/factions/cmd/CmdSB.java index 35f151b9..686e9414 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdSB.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdSB.java @@ -41,7 +41,7 @@ public class CmdSB extends FCommand { boolean toggle = toggle(me.getPlayer().getUniqueId()); if(!toggle && fme.getActiveBoard() != null) { fme.getActiveBoard().cancel(); - } else if(toggle && P.p.getConfig().getBoolean("scoreboards.default-enabled", false)){ + } else if(toggle && P.p.getConfig().getBoolean("scoreboards.default-enabled", true)){ FScoreboard board = new FDefaultBoard(fme); fme.setActiveBoard(board); } @@ -56,7 +56,7 @@ public class CmdSB extends FCommand { * @return - true if now set to seeing scoreboards, otherwise false. */ public boolean toggle(UUID uuid) { - if(!yml.getBoolean(uuid.toString(), false)) { // check if it's false, if never been toggled, default to false. + if(!yml.getBoolean(uuid.toString(), true)) { // check if it's false, if never been toggled, default to false. yml.set(uuid.toString(), true); save(); return true; @@ -105,6 +105,6 @@ public class CmdSB extends FCommand { * @return - true if should show, otherwise false. */ public boolean showBoard(UUID uuid) { - return yml.getBoolean(uuid.toString(), false); + return yml.getBoolean(uuid.toString(), true); } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0d143bcc..1ea99931 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -86,6 +86,8 @@ permissions: factions.version: true factions.unclaim: true factions.unclaimall: true + factions.scoreboard: true + factions.showinvites: true factions.admin: description: hand over your admin rights factions.admin.any: @@ -224,4 +226,8 @@ permissions: factions.unclaim: description: unclaim the land where you are standing factions.unclaimall: - description: unclaim all of your factions land \ No newline at end of file + description: unclaim all of your factions land + factions.scoreboard: + description: ability to toggle scoreboards + factions.showinvites: + description: show pending invites to your faction \ No newline at end of file