Class Structure
java.lang.Object
me.gamercoder215.starcosmetics.api.cosmetics.structure.Structure
- All Implemented Interfaces:
Cloneable
Represents a StarCosmetics Structure
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longRepresents the default removal time, in ticks, of a Structure (30 seconds). -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanfinal @NotNull StructureInfogetInfo()Fetches the Structure's Structure Info.@NotNull StringFetches the localized name of this Structure.abstract @NotNull Map<StructurePoint,Material> Fetches a Map of StructurePoints to Materials that the Structure will place.abstract @NotNull Set<StructurePoint>Fetches all of the points of this Structure that have been placed.abstract RarityFetches the rarity of this Structure.inthashCode()abstract voidPlaces this Structure WITHOUT automatically removing it.abstract voidplaceAndRemove(@NotNull Location center, long delay) Places this Structure.toString()
-
Field Details
-
DEFAULT_REMOVAL_TIME
public static final long DEFAULT_REMOVAL_TIMERepresents the default removal time, in ticks, of a Structure (30 seconds).- See Also:
-
-
Method Details
-
getMaterials
Fetches a Map of StructurePoints to Materials that the Structure will place.- Returns:
- StructurePoint to Material Blueprint Map
-
getInfo
Fetches the Structure's Structure Info.- Returns:
- Structure Info
-
place
public abstract void place(@NotNull @NotNull Location center) throws IllegalArgumentException, IllegalStateException Places this Structure WITHOUT automatically removing it.- Parameters:
center- Center of Structure- Throws:
IllegalArgumentException- if center is nullIllegalStateException- if this instance has already been placed
-
getRarity
Fetches the rarity of this Structure.- Returns:
- Structure Rarity
-
placeAndRemove
public abstract void placeAndRemove(@NotNull @NotNull Location center, long delay) throws IllegalArgumentException, IllegalStateException Places this Structure.- Parameters:
center- Center of Structuredelay- Delay, in ticks, to remove this Structure- Throws:
IllegalArgumentException- if delay is negative or center is nullIllegalStateException- if this instance has already been placed and not removed
-
getPointsPlaced
Fetches all of the points of this Structure that have been placed.
If the structure hasn't been placed, this set will be empty. This is to ensure nothing that was previously there doesn't get removed.
- Returns:
- All Structure Points
-
getLocalizedName
Fetches the localized name of this Structure.- Returns:
- Localized Name
-
clone
-
equals
-
hashCode
public int hashCode() -
toString
-