mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Fix some errors
This commit is contained in:
parent
55427dc1fe
commit
82e86f6669
@ -45,6 +45,18 @@ public abstract class TargetedDisguise extends Disguise {
|
||||
targetType = newTargetType;
|
||||
}
|
||||
|
||||
public void silentlySetViewDisguise(String playername) {
|
||||
if (!disguiseViewers.contains(playername)) {
|
||||
disguiseViewers.add(playername);
|
||||
}
|
||||
}
|
||||
|
||||
public void silentlyUnsetViewDisguise(String playername) {
|
||||
if (disguiseViewers.contains(playername)) {
|
||||
disguiseViewers.remove(playername);
|
||||
}
|
||||
}
|
||||
|
||||
public void setViewDisguise(String playername) {
|
||||
if (!disguiseViewers.contains(playername)) {
|
||||
disguiseViewers.add(playername);
|
||||
|
@ -65,7 +65,7 @@ public class DisguiseUtilities {
|
||||
d.unsetViewDisguise(name);
|
||||
} else {
|
||||
for (String playername : disguise.getObservers()) {
|
||||
d.unsetViewDisguise(playername);
|
||||
d.silentlyUnsetViewDisguise(playername);
|
||||
}
|
||||
}
|
||||
} else if (disguise.getTargetType() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
||||
@ -90,7 +90,7 @@ public class DisguiseUtilities {
|
||||
d.setViewDisguise(name);
|
||||
} else {
|
||||
for (String playername : disguise.getObservers()) {
|
||||
d.setViewDisguise(playername);
|
||||
d.silentlySetViewDisguise(playername);
|
||||
}
|
||||
}
|
||||
} else if (disguise.getTargetType() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
||||
|
Loading…
Reference in New Issue
Block a user