If someone can't see someone. This will no longer changed if they are disguised
This commit is contained in:
parent
abe1a93000
commit
bd38aa428a
@ -24,7 +24,7 @@ public class DisguiseAPI {
|
|||||||
disguises.put(p.getName(), disguise);
|
disguises.put(p.getName(), disguise);
|
||||||
disguise.constructPacket(p);
|
disguise.constructPacket(p);
|
||||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||||
if (p.getWorld() != player.getWorld())
|
if (p.getWorld() != player.getWorld() || !player.canSee(p))
|
||||||
continue;
|
continue;
|
||||||
player.hidePlayer(p);
|
player.hidePlayer(p);
|
||||||
player.showPlayer(p);
|
player.showPlayer(p);
|
||||||
@ -88,7 +88,8 @@ public class DisguiseAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Boolean - Set if sounds play when the disguiser is hurt
|
* @param Boolean
|
||||||
|
* - Set if sounds play when the disguiser is hurt
|
||||||
*/
|
*/
|
||||||
public static void setPlaySounds(boolean sounds) {
|
public static void setPlaySounds(boolean sounds) {
|
||||||
playSounds = sounds;
|
playSounds = sounds;
|
||||||
|
Loading…
Reference in New Issue
Block a user