mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 20:39:13 +00:00
Moved wardrobe check before startup
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.hibiscusmc.hmccosmetics.user;
|
||||
|
||||
import com.hibiscusmc.hmccosmetics.HMCCosmeticsPlugin;
|
||||
import com.hibiscusmc.hmccosmetics.config.WardrobeSettings;
|
||||
import com.hibiscusmc.hmccosmetics.cosmetic.Cosmetic;
|
||||
import com.hibiscusmc.hmccosmetics.cosmetic.CosmeticSlot;
|
||||
import com.hibiscusmc.hmccosmetics.cosmetic.types.CosmeticBackpackType;
|
||||
@@ -98,6 +99,10 @@ public class CosmeticUser {
|
||||
}
|
||||
|
||||
public void enterWardrobe() {
|
||||
if (!WardrobeSettings.inDistanceOfStatic(getPlayer().getLocation())) {
|
||||
getPlayer().sendMessage("You are to far away!");
|
||||
return;
|
||||
}
|
||||
wardrobe = new Wardrobe(this);
|
||||
wardrobe.start();
|
||||
}
|
||||
|
||||
@@ -41,11 +41,6 @@ public class Wardrobe {
|
||||
player.sendMessage("NPC ID " + NPC_ID);
|
||||
player.sendMessage("armorstand id " + ARMORSTAND_ID);
|
||||
|
||||
if (!WardrobeSettings.inDistanceOfStatic(player.getLocation())) {
|
||||
player.sendMessage("You are to far away!");
|
||||
return;
|
||||
}
|
||||
|
||||
this.originalGamemode = player.getGameMode();
|
||||
if (WardrobeSettings.isReturnLastLocation()) {
|
||||
this.exitLocation = player.getLocation().clone();
|
||||
|
||||
Reference in New Issue
Block a user