mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 20:39:13 +00:00
Fixed teleporting error with player leaving wardrobe
This commit is contained in:
@@ -136,7 +136,10 @@ public class Wardrobe extends User {
|
||||
this.cameraLocked = false;
|
||||
this.currentLocation = null;
|
||||
this.getPlayerArmor().clear();
|
||||
Bukkit.getScheduler().runTask(this.plugin, () -> viewer.teleport(settings.getLeaveLocation()));
|
||||
Bukkit.getScheduler().runTask(this.plugin, () -> {
|
||||
if (viewer == null || !viewer.isOnline()) return;
|
||||
viewer.teleport(settings.getLeaveLocation());
|
||||
});
|
||||
|
||||
if (settings.isAlwaysDisplay()) {
|
||||
this.currentLocation = settings.getWardrobeLocation();
|
||||
|
||||
Reference in New Issue
Block a user