Package me.fami6xx.rpuniverse.core.jobs
Class WorkingStep
java.lang.Object
me.fami6xx.rpuniverse.core.jobs.WorkingStep
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionWorkingStep(List<org.bukkit.Location> workingLocations, int timeForStep, List<WorkingStep.NeededItem> neededItems, int neededPermissionLevel, String name, String description, String workingStepBeingDoneMessage, UUID jobUUID, boolean interactableFirstStage, List<PossibleDrop> possibleDrops)Creates a WorkingStep. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNeededItem(WorkingStep.NeededItem neededItem)Adds needed item.voidaddWorkingLocation(org.bukkit.Location location)Adds working location.static WorkingStepfromJsonObject(com.google.gson.JsonObject jsonObject)Converts a JSON object to a WorkingStep.static WorkingStepfromString(String s)Builds a WorkingStep from a YAML string.intGets depletion amount.doubleGets depletion chance.Gets description.Gets job UUID.getName()Gets name.Gets needed items.intGets needed permission level.Gets possible drops.intGets replenish time ticks.intGets time for step.getUuid()Gets the internal UUID.List<org.bukkit.Location>Gets working locations.Gets working step being done message.booleanChecks if depletion is allowed.booleanChecks if first stage is interactable.voidremoveNeededItem(WorkingStep.NeededItem neededItem)Removes needed item.voidremoveWorkingLocation(org.bukkit.Location location)Removes working location.voidsetAllowDepletion(boolean allowDepletion)Sets if depletion is allowed.voidsetDepletionAmount(int depletionAmount)Sets depletion amount.voidsetDepletionChance(double depletionChance)Sets depletion chance.voidsetDescription(String description)Sets description.voidsetInteractableFirstStage(boolean interactableFirstStage)Sets first stage interactable.voidSets name.voidsetNeededItems(List<WorkingStep.NeededItem> neededItems)Sets needed items.voidsetNeededPermissionLevel(int neededPermissionLevel)Sets needed permission level.voidsetPossibleDrops(List<PossibleDrop> possibleDrops)Sets possible drops.voidsetReplenishTimeTicks(int replenishTimeTicks)Sets replenish time ticks.voidsetTimeForStep(int timeForStep)Sets time for step.voidsetWorkingLocations(List<org.bukkit.Location> workingLocations)Sets working locations.voidsetWorkingStepBeingDoneMessage(String workingStepBeingDoneMessage)Sets working step being done message.com.google.gson.JsonObjectConverts this WorkingStep to a JSON object.toString()Converts this WorkingStep to a YAML string.
-
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
Builds a WorkingStep from a YAML string. -
toString
Converts this WorkingStep to a YAML string. -
toJsonObject
public com.google.gson.JsonObject toJsonObject()Converts this WorkingStep to a JSON object. -
fromJsonObject
Converts a JSON object to a WorkingStep. -
getJobUUID
Gets job UUID. -
getName
Gets name. -
setName
Sets name. -
getDescription
Gets description. -
setDescription
Sets description. -
getWorkingStepBeingDoneMessage
Gets working step being done message. -
setWorkingStepBeingDoneMessage
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
Gets working locations. -
setWorkingLocations
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
Gets the internal UUID. -
getPossibleDrops
Gets possible drops. -
setPossibleDrops
Sets possible drops. -
getNeededItems
Gets needed items. -
setNeededItems
Sets needed items. -
addNeededItem
Adds needed item. -
removeNeededItem
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.
-