Add new permissions to plugin.yml and permission kits. Set scoreboards to enabled per player by default.

This commit is contained in:
drtshock 2014-10-16 13:35:21 -05:00
parent a8877cd869
commit e290ac0320
2 changed files with 10 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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:
@ -225,3 +227,7 @@ permissions:
description: unclaim the land where you are standing
factions.unclaimall:
description: unclaim all of your factions land
factions.scoreboard:
description: ability to toggle scoreboards
factions.showinvites:
description: show pending invites to your faction