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