mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 11:45:31 +01:00
Fixed Invincible Visitors still using "general.errors.you-need".
This commit is contained in:
parent
63e004415b
commit
ea1fea66ff
@ -42,8 +42,7 @@ public class InvincibleVisitorsListener extends AbstractFlagListener implements
|
|||||||
}
|
}
|
||||||
String reqPerm = getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".admin.settings.INVINCIBLE_VISITORS";
|
String reqPerm = getIWM().getPermissionPrefix(Util.getWorld(user.getWorld())) + ".admin.settings.INVINCIBLE_VISITORS";
|
||||||
if (!user.hasPermission(reqPerm)) {
|
if (!user.hasPermission(reqPerm)) {
|
||||||
user.sendMessage("general.errors.no-permission");
|
user.sendMessage("general.errors.no-permission", "[permission]", reqPerm);
|
||||||
user.sendMessage("general.errors.you-need", "[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;
|
||||||
}
|
}
|
||||||
@ -76,7 +75,6 @@ public class InvincibleVisitorsListener extends AbstractFlagListener implements
|
|||||||
// Make panel items
|
// Make panel items
|
||||||
Arrays.stream(EntityDamageEvent.DamageCause.values()).forEach(c -> pb.item(getPanelItem(c, user)));
|
Arrays.stream(EntityDamageEvent.DamageCause.values()).forEach(c -> pb.item(getPanelItem(c, user)));
|
||||||
pb.build();
|
pb.build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private PanelItem getPanelItem(DamageCause c, User user) {
|
private PanelItem getPanelItem(DamageCause c, User user) {
|
||||||
@ -116,8 +114,5 @@ public class InvincibleVisitorsListener extends AbstractFlagListener implements
|
|||||||
getIslands().getIslandAt(p.getLocation()).ifPresent(i -> new SafeTeleportBuilder(getPlugin()).entity(p).island(i).build());
|
getIslands().getIslandAt(p.getLocation()).ifPresent(i -> new SafeTeleportBuilder(getPlugin()).entity(p).island(i).build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user