Fix a permission issue

This commit is contained in:
libraryaddict 2021-01-26 06:50:46 +13:00
parent 8d85d5b256
commit 17f6b62fd6

View File

@ -1081,14 +1081,15 @@ public abstract class Disguise {
multiName = new String[0]; multiName = new String[0];
} }
if (((TargetedDisguise) this).getDisguiseTarget() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
for (Player player : Bukkit.getOnlinePlayers()) { for (Player player : Bukkit.getOnlinePlayers()) {
if (player.hasPermission("libsdisguises.seethrough") || if (!player.hasPermission("libsdisguises.seethrough")) {
((TargetedDisguise) this).getDisguiseTarget() != TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
continue; continue;
} }
((TargetedDisguise) this).addPlayer(player); ((TargetedDisguise) this).addPlayer(player);
} }
}
if (LibsPremium.getUserID().equals("123" + "45") || !LibsMsg.OWNED_BY.getRaw().contains("'")) { if (LibsPremium.getUserID().equals("123" + "45") || !LibsMsg.OWNED_BY.getRaw().contains("'")) {
((TargetedDisguise) this).setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS); ((TargetedDisguise) this).setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS);