Skip to content

Commit

Permalink
Updating permission: now taking full lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume-Lebegue committed Jun 30, 2020
1 parent 3b62f28 commit c697766
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public boolean isShowed(User user, Island island) {

Player player = user.getPlayer();
String gamemode = island.getGameMode();
String permissionStart = gamemode + ".upgrades." + this.getName() + ".";
String permissionStart = gamemode + ".upgrades." + this.getName() + ".";
permissionStart = permissionStart.toLowerCase();

// For each permission of the player
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public boolean isShowed(User user, Island island) {
Player player = user.getPlayer();
String gamemode = island.getGameMode();
String permissionStart = gamemode + ".upgrades." + this.getName() + ".";
permissionStart = permissionStart.toLowerCase();

// For each permission of the player
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ public boolean isShowed(User user, Island island) {

Player player = user.getPlayer();
String gamemode = island.getGameMode();
String permissionStart = gamemode + ".upgrades." + this.getName() + ".";
String permissionStart = gamemode + ".upgrades." + this.getName() + ".";
permissionStart = permissionStart.toLowerCase();

// For each permission of the player
for (PermissionAttachmentInfo perms : player.getEffectivePermissions()) {
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ disabled-gamemodes: []
# [numberPlayer] : Is the number of players in team
#
# Caution: You should always check that at max level, your players won't attain max range for island
# Permission upgrade name: rangeupgrade
range-upgrade:
tier1:
max-level: 5
Expand All @@ -38,8 +39,10 @@ range-upgrade:
island-min-level: "4"
vault-cost: "[level]*[numberPlayer]*200"

# Permission upgrade name: limitsupgrade-[BLOCK] -> In lower case
block-limits-upgrade:
HOPPER:
# Permission upgrade name: limitsupgrade-hopper
tier1:
max-level: 2
upgrade: "1"
Expand All @@ -52,8 +55,10 @@ block-limits-upgrade:
vault-cost: "([level]-2)*[numberPlayer]*700"
permission-level: 1

# Permission upgrade name: limitsupgrade-[ENTITY] -> In lower case
entity-limits-upgrade:
CHICKEN:
# Permission upgrade name: limitsupgrade-chicken
tier1:
max-level: 2
upgrade: "1"
Expand Down

0 comments on commit c697766

Please sign in to comment.