9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2026-01-06 15:51:50 +00:00

clean: finish wardrobe location overhaul

This commit is contained in:
LoJoSho
2023-05-16 15:21:20 -05:00
parent cd3a9f1af4
commit f9465e8206
5 changed files with 36 additions and 17 deletions

View File

@@ -15,15 +15,15 @@ public class WardrobeLocation {
}
public Location getNpcLocation() {
return npcLocation;
return npcLocation.clone();
}
public Location getViewerLocation() {
return viewerLocation;
return viewerLocation.clone();
}
public Location getLeaveLocation() {
return leaveLocation;
return leaveLocation.clone();
}
public void setNPCLocation(Location wardrobeLocation) {

View File

@@ -172,18 +172,35 @@ public class WardrobeSettings {
return returnLastLocation;
}
/**
*
* @Deprecated use {@link #getLocation()}
*/
@Deprecated (since = "2.3.2", forRemoval = true)
public static Location getWardrobeLocation() {
return wardrobeLocation.getNpcLocation().clone();
}
/**
*
* @Deprecated use {@link #getLocation()}
*/
@Deprecated (since = "2.3.2", forRemoval = true)
public static Location getViewerLocation() {
return wardrobeLocation.getViewerLocation().clone();
}
/**
*
* @Deprecated use {@link #getLocation()}
*/
@Deprecated (since = "2.3.2", forRemoval = true)
public static Location getLeaveLocation() {
return wardrobeLocation.getLeaveLocation().clone();
}
public static WardrobeLocation getLocation() {
return wardrobeLocation;
}
public static boolean inDistanceOfWardrobe(final Location wardrobeLocation, final Location playerLocation) {
if (displayRadius == -1) return true;
if (!wardrobeLocation.getWorld().equals(playerLocation.getWorld())) return false;
@@ -248,7 +265,7 @@ public class WardrobeSettings {
/**
* Sets where the NPC will spawn in the wardrobe
*
* @Deprecated use {{@link #setNPCLocation(Location)}}
* @Deprecated use {@link #setNPCLocation(Location)}
* @param newLocation
*/
@Deprecated (since = "2.3.2", forRemoval = true)