mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-28 03:57:39 +01:00
Fixed general.errors.no-permission being sent twice
This commit is contained in:
parent
3212b7180d
commit
7ec497a93b
@ -39,7 +39,6 @@ public class CycleClick implements PanelItem.ClickHandler {
|
|||||||
}
|
}
|
||||||
String reqPerm = plugin.getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".settings." + id;
|
String reqPerm = plugin.getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".settings." + id;
|
||||||
if (!user.hasPermission(reqPerm)) {
|
if (!user.hasPermission(reqPerm)) {
|
||||||
user.sendMessage("general.errors.no-permission");
|
|
||||||
user.sendMessage("general.errors.no-permission", TextVariables.PERMISSION, reqPerm);
|
user.sendMessage("general.errors.no-permission", TextVariables.PERMISSION, reqPerm);
|
||||||
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
|
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
|
||||||
return true;
|
return true;
|
||||||
|
@ -41,7 +41,6 @@ public class IslandToggleClick implements ClickHandler {
|
|||||||
}
|
}
|
||||||
String reqPerm = plugin.getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".settings." + id;
|
String reqPerm = plugin.getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".settings." + id;
|
||||||
if (!user.hasPermission(reqPerm)) {
|
if (!user.hasPermission(reqPerm)) {
|
||||||
user.sendMessage("general.errors.no-permission");
|
|
||||||
user.sendMessage("general.errors.no-permission", TextVariables.PERMISSION, reqPerm);
|
user.sendMessage("general.errors.no-permission", TextVariables.PERMISSION, reqPerm);
|
||||||
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
|
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user