Adds more unfinished code for parsing and tab-completing advanced cost
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good
This commit is contained in:
@@ -28,6 +28,46 @@ import java.util.Set;
|
||||
public record ActionCost(double monetaryCost, int expCost, @Nullable ItemStack itemCost,
|
||||
@NotNull Set<String> requiredPermissions) implements ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
* Changes the monetary cost of this action
|
||||
*
|
||||
* @param monetaryCost <p>The new monetary cost</p>
|
||||
* @return <p>The resulting action cost</p>
|
||||
*/
|
||||
public ActionCost changeMonetaryCost(double monetaryCost) {
|
||||
return new ActionCost(monetaryCost, this.expCost, this.itemCost, this.requiredPermissions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the experience cost of this action
|
||||
*
|
||||
* @param expCost <p>The new experience cost</p>
|
||||
* @return <p>The resulting action cost</p>
|
||||
*/
|
||||
public ActionCost changeExpCost(int expCost) {
|
||||
return new ActionCost(this.monetaryCost, expCost, this.itemCost, this.requiredPermissions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the item cost of this action
|
||||
*
|
||||
* @param itemCost <p>The new item cost</p>
|
||||
* @return <p>The resulting action cost</p>
|
||||
*/
|
||||
public ActionCost changeItemCost(@Nullable ItemStack itemCost) {
|
||||
return new ActionCost(this.monetaryCost, this.expCost, itemCost, this.requiredPermissions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the permission cost of this action
|
||||
*
|
||||
* @param requiredPermissions <p>The new permission cost</p>
|
||||
* @return <p>The resulting action cost</p>
|
||||
*/
|
||||
public ActionCost changePermissionCost(@NotNull Set<String> requiredPermissions) {
|
||||
return new ActionCost(this.monetaryCost, this.expCost, this.itemCost, requiredPermissions);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String displayCost() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
Reference in New Issue
Block a user