mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-15 15:28:36 +01:00
Move undisguising on world change to world change event
This commit is contained in:
parent
4ab9b14993
commit
4bd420570e
@ -163,15 +163,6 @@ public class DisguiseListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPortalEnter(PlayerPortalEvent event) {
|
||||
if (DisguiseConfig.isUndisguiseOnWorldChange() && event.getFrom().getWorld() != event.getTo().getWorld()) {
|
||||
for (Disguise disguise : DisguiseAPI.getDisguises(event.getPlayer())) {
|
||||
disguise.removeDisguise();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onRespawn(PlayerRespawnEvent event) {
|
||||
Disguise[] disguises = DisguiseAPI.getDisguises(event.getPlayer());
|
||||
@ -331,6 +322,11 @@ public class DisguiseListener implements Listener {
|
||||
if (DisguiseConfig.isBedPacketsEnabled()) {
|
||||
chunkMove(event.getPlayer(), event.getPlayer().getLocation(), null);
|
||||
}
|
||||
if (DisguiseConfig.isUndisguiseOnWorldChange() && event.getFrom().getWorld() != event.getTo().getWorld()) {
|
||||
for (Disguise disguise : DisguiseAPI.getDisguises(event.getPlayer())) {
|
||||
disguise.removeDisguise();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setDisguiseClone(final String player, Boolean[] options) {
|
||||
|
Loading…
Reference in New Issue
Block a user