Skip to content

Commit

Permalink
Fixes wrong permissions (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
wellnesscookie authored and tastybento committed Jul 31, 2019
1 parent 43bc506 commit 9ae7e39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/world/bentobox/warps/WarpSignsListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void onSignBreak(BlockBreakEvent e) {
// Welcome sign detected - check to see if it is
// this player's sign
if ((list.containsKey(user.getUniqueId()) && list.get(user.getUniqueId()).equals(s.getLocation()))
|| user.isOp() || user.hasPermission(addon.getPermPrefix(e.getBlock().getWorld()) + ".mod.removesign")) {
|| user.isOp() || user.hasPermission(addon.getPermPrefix(e.getBlock().getWorld()) + "mod.removesign")) {
addon.getWarpSignsManager().removeWarp(s.getLocation());
Bukkit.getPluginManager().callEvent(new WarpRemoveEvent(addon, s.getLocation(), user.getUniqueId()));
} else {
Expand Down Expand Up @@ -95,9 +95,9 @@ public void onSignWarpCreate(SignChangeEvent e) {
// Check if someone is changing their own sign
if (title.equalsIgnoreCase(addon.getSettings().getWelcomeLine())) {
// Welcome sign detected - check permissions
if (!(user.hasPermission(addon.getPermPrefix(b.getWorld()) + ".island.addwarp"))) {
if (!(user.hasPermission(addon.getPermPrefix(b.getWorld()) + "island.addwarp"))) {
user.sendMessage("warps.error.no-permission");
user.sendMessage("general.errors.you-need", "[permission]", addon.getPermPrefix(b.getWorld()) + ".island.addwarp");
user.sendMessage("general.errors.you-need", "[permission]", addon.getPermPrefix(b.getWorld()) + "island.addwarp");
return;
}
// Get level if level addon is available
Expand Down

0 comments on commit 9ae7e39

Please sign in to comment.