Fix some errors
This commit is contained in:
parent
55427dc1fe
commit
82e86f6669
@ -45,6 +45,18 @@ public abstract class TargetedDisguise extends Disguise {
|
|||||||
targetType = newTargetType;
|
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) {
|
public void setViewDisguise(String playername) {
|
||||||
if (!disguiseViewers.contains(playername)) {
|
if (!disguiseViewers.contains(playername)) {
|
||||||
disguiseViewers.add(playername);
|
disguiseViewers.add(playername);
|
||||||
|
@ -65,7 +65,7 @@ public class DisguiseUtilities {
|
|||||||
d.unsetViewDisguise(name);
|
d.unsetViewDisguise(name);
|
||||||
} else {
|
} else {
|
||||||
for (String playername : disguise.getObservers()) {
|
for (String playername : disguise.getObservers()) {
|
||||||
d.unsetViewDisguise(playername);
|
d.silentlyUnsetViewDisguise(playername);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (disguise.getTargetType() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
} else if (disguise.getTargetType() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
||||||
@ -90,7 +90,7 @@ public class DisguiseUtilities {
|
|||||||
d.setViewDisguise(name);
|
d.setViewDisguise(name);
|
||||||
} else {
|
} else {
|
||||||
for (String playername : disguise.getObservers()) {
|
for (String playername : disguise.getObservers()) {
|
||||||
d.setViewDisguise(playername);
|
d.silentlySetViewDisguise(playername);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (disguise.getTargetType() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
} else if (disguise.getTargetType() == TargetType.SHOW_TO_EVERYONE_BUT_THESE_PLAYERS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user