Add new permissions to plugin.yml and permission kits. Set scoreboards to enabled per player by default.
This commit is contained in:
parent
a8877cd869
commit
e290ac0320
@ -41,7 +41,7 @@ public class CmdSB extends FCommand {
|
|||||||
boolean toggle = toggle(me.getPlayer().getUniqueId());
|
boolean toggle = toggle(me.getPlayer().getUniqueId());
|
||||||
if(!toggle && fme.getActiveBoard() != null) {
|
if(!toggle && fme.getActiveBoard() != null) {
|
||||||
fme.getActiveBoard().cancel();
|
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);
|
FScoreboard board = new FDefaultBoard(fme);
|
||||||
fme.setActiveBoard(board);
|
fme.setActiveBoard(board);
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ public class CmdSB extends FCommand {
|
|||||||
* @return - true if now set to seeing scoreboards, otherwise false.
|
* @return - true if now set to seeing scoreboards, otherwise false.
|
||||||
*/
|
*/
|
||||||
public boolean toggle(UUID uuid) {
|
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);
|
yml.set(uuid.toString(), true);
|
||||||
save();
|
save();
|
||||||
return true;
|
return true;
|
||||||
@ -105,6 +105,6 @@ public class CmdSB extends FCommand {
|
|||||||
* @return - true if should show, otherwise false.
|
* @return - true if should show, otherwise false.
|
||||||
*/
|
*/
|
||||||
public boolean showBoard(UUID uuid) {
|
public boolean showBoard(UUID uuid) {
|
||||||
return yml.getBoolean(uuid.toString(), false);
|
return yml.getBoolean(uuid.toString(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,6 +86,8 @@ permissions:
|
|||||||
factions.version: true
|
factions.version: true
|
||||||
factions.unclaim: true
|
factions.unclaim: true
|
||||||
factions.unclaimall: true
|
factions.unclaimall: true
|
||||||
|
factions.scoreboard: true
|
||||||
|
factions.showinvites: true
|
||||||
factions.admin:
|
factions.admin:
|
||||||
description: hand over your admin rights
|
description: hand over your admin rights
|
||||||
factions.admin.any:
|
factions.admin.any:
|
||||||
@ -224,4 +226,8 @@ permissions:
|
|||||||
factions.unclaim:
|
factions.unclaim:
|
||||||
description: unclaim the land where you are standing
|
description: unclaim the land where you are standing
|
||||||
factions.unclaimall:
|
factions.unclaimall:
|
||||||
description: unclaim all of your factions land
|
description: unclaim all of your factions land
|
||||||
|
factions.scoreboard:
|
||||||
|
description: ability to toggle scoreboards
|
||||||
|
factions.showinvites:
|
||||||
|
description: show pending invites to your faction
|
Loading…
Reference in New Issue
Block a user