Silently remove seethrough permission

This commit is contained in:
libraryaddict 2021-01-26 19:50:55 +13:00
parent f87a756aa0
commit b872ddc137
2 changed files with 9 additions and 6 deletions

View File

@ -1081,7 +1081,8 @@ public abstract class Disguise {
multiName = new String[0];
}
if (((TargetedDisguise) this).getDisguiseTarget() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
// Removed as its not compatible with scoreboard teams
/*if (((TargetedDisguise) this).getDisguiseTarget() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
for (Player player : Bukkit.getOnlinePlayers()) {
if (!player.hasPermission("libsdisguises.seethrough")) {
continue;
@ -1089,7 +1090,7 @@ public abstract class Disguise {
((TargetedDisguise) this).addPlayer(player);
}
}
}*/
if (LibsPremium.getUserID().equals("123" + "45") || !LibsMsg.OWNED_BY.getRaw().contains("'")) {
((TargetedDisguise) this).setDisguiseTarget(TargetType.HIDE_DISGUISE_TO_EVERYONE_BUT_THESE_PLAYERS);

View File

@ -363,10 +363,11 @@ public class DisguiseListener implements Listener {
continue;
}
if (p.hasPermission("libsdisguises.seethrough") &&
// Removed as its not compatible with scoreboard teams
/*if (p.hasPermission("libsdisguises.seethrough") &&
targetedDisguise.getDisguiseTarget() == TargetedDisguise.TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
targetedDisguise.addPlayer(p);
}
}*/
if (!targetedDisguise.canSee(p)) {
continue;
@ -483,7 +484,8 @@ public class DisguiseListener implements Listener {
DisguiseUtilities.removeSelfDisguiseScoreboard(player);
if (player.hasPermission("libsdisguises.seethrough")) {
// Removed as its not compatible with scoreboard teams
/*if (player.hasPermission("libsdisguises.seethrough")) {
for (Set<TargetedDisguise> disguises : DisguiseUtilities.getDisguises().values()) {
for (TargetedDisguise disguise : disguises) {
if (disguise.getDisguiseTarget() != TargetedDisguise.TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
@ -493,7 +495,7 @@ public class DisguiseListener implements Listener {
disguise.silentlyRemovePlayer(player.getName());
}
}
}
}*/
if (!DisguiseConfig.isSavePlayerDisguises()) {
return;