Fixed general.errors.no-permission being sent twice

This commit is contained in:
Florian CUNY 2018-08-12 18:50:12 +02:00
parent 3212b7180d
commit 7ec497a93b
2 changed files with 0 additions and 2 deletions

View File

@ -39,7 +39,6 @@ public class CycleClick implements PanelItem.ClickHandler {
}
String reqPerm = plugin.getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".settings." + id;
if (!user.hasPermission(reqPerm)) {
user.sendMessage("general.errors.no-permission");
user.sendMessage("general.errors.no-permission", TextVariables.PERMISSION, reqPerm);
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
return true;

View File

@ -41,7 +41,6 @@ public class IslandToggleClick implements ClickHandler {
}
String reqPerm = plugin.getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".settings." + id;
if (!user.hasPermission(reqPerm)) {
user.sendMessage("general.errors.no-permission");
user.sendMessage("general.errors.no-permission", TextVariables.PERMISSION, reqPerm);
user.getPlayer().playSound(user.getLocation(), Sound.BLOCK_METAL_HIT, 1F, 1F);
return true;