Class WorkingStep

java.lang.Object
me.fami6xx.rpuniverse.core.jobs.WorkingStep

public class WorkingStep extends Object
  • Constructor Details

    • WorkingStep

      public WorkingStep(@Nonnull List<org.bukkit.Location> workingLocations, int timeForStep, @Nonnull List<WorkingStep.NeededItem> neededItems, int neededPermissionLevel, @Nonnull String name, @Nonnull String description, @Nonnull String workingStepBeingDoneMessage, @Nonnull UUID jobUUID, boolean interactableFirstStage, @Nonnull List<PossibleDrop> possibleDrops)
      Creates a WorkingStep.
  • Method Details

    • fromString

      public static WorkingStep fromString(String s)
      Builds a WorkingStep from a YAML string.
    • toString

      public String toString()
      Converts this WorkingStep to a YAML string.
      Overrides:
      toString in class Object
    • toJsonObject

      public com.google.gson.JsonObject toJsonObject()
      Converts this WorkingStep to a JSON object.
    • fromJsonObject

      public static WorkingStep fromJsonObject(com.google.gson.JsonObject jsonObject)
      Converts a JSON object to a WorkingStep.
    • getJobUUID

      public UUID getJobUUID()
      Gets job UUID.
    • getName

      public String getName()
      Gets name.
    • setName

      public void setName(@Nonnull String name)
      Sets name.
    • getDescription

      public String getDescription()
      Gets description.
    • setDescription

      public void setDescription(@Nonnull String description)
      Sets description.
    • getWorkingStepBeingDoneMessage

      public String getWorkingStepBeingDoneMessage()
      Gets working step being done message.
    • setWorkingStepBeingDoneMessage

      public void setWorkingStepBeingDoneMessage(@Nonnull String workingStepBeingDoneMessage)
      Sets working step being done message.
    • getNeededPermissionLevel

      public int getNeededPermissionLevel()
      Gets needed permission level.
    • setNeededPermissionLevel

      public void setNeededPermissionLevel(int neededPermissionLevel)
      Sets needed permission level.
    • getWorkingLocations

      public List<org.bukkit.Location> getWorkingLocations()
      Gets working locations.
    • setWorkingLocations

      public void setWorkingLocations(@Nonnull List<org.bukkit.Location> workingLocations)
      Sets working locations.
    • addWorkingLocation

      public void addWorkingLocation(@Nonnull org.bukkit.Location location)
      Adds working location.
    • removeWorkingLocation

      public void removeWorkingLocation(@Nonnull org.bukkit.Location location)
      Removes working location.
    • getTimeForStep

      public int getTimeForStep()
      Gets time for step.
    • setTimeForStep

      public void setTimeForStep(int timeForStep)
      Sets time for step.
    • isInteractableFirstStage

      public boolean isInteractableFirstStage()
      Checks if first stage is interactable.
    • setInteractableFirstStage

      public void setInteractableFirstStage(boolean interactableFirstStage)
      Sets first stage interactable.
    • getUuid

      public UUID getUuid()
      Gets the internal UUID.
    • getPossibleDrops

      public List<PossibleDrop> getPossibleDrops()
      Gets possible drops.
    • setPossibleDrops

      public void setPossibleDrops(@Nonnull List<PossibleDrop> possibleDrops)
      Sets possible drops.
    • getNeededItems

      public List<WorkingStep.NeededItem> getNeededItems()
      Gets needed items.
    • setNeededItems

      public void setNeededItems(@Nonnull List<WorkingStep.NeededItem> neededItems)
      Sets needed items.
    • addNeededItem

      public void addNeededItem(@Nonnull WorkingStep.NeededItem neededItem)
      Adds needed item.
    • removeNeededItem

      public void removeNeededItem(@Nonnull WorkingStep.NeededItem neededItem)
      Removes needed item.
    • getDepletionChance

      public double getDepletionChance()
      Gets depletion chance.
    • setDepletionChance

      public void setDepletionChance(double depletionChance)
      Sets depletion chance.
    • getDepletionAmount

      public int getDepletionAmount()
      Gets depletion amount.
    • setDepletionAmount

      public void setDepletionAmount(int depletionAmount)
      Sets depletion amount.
    • isAllowDepletion

      public boolean isAllowDepletion()
      Checks if depletion is allowed.
    • setAllowDepletion

      public void setAllowDepletion(boolean allowDepletion)
      Sets if depletion is allowed.
    • getReplenishTimeTicks

      public int getReplenishTimeTicks()
      Gets replenish time ticks.
    • setReplenishTimeTicks

      public void setReplenishTimeTicks(int replenishTimeTicks)
      Sets replenish time ticks.