Moves some code from Stargate to EconomyHandler

This commit is contained in:
2021-09-19 15:05:19 +02:00
parent b191ac1de5
commit 8835e69e3c
8 changed files with 166 additions and 113 deletions

View File

@ -161,7 +161,7 @@ public class Gate {
* @return <p>The cost of creating a portal with this gate</p>
*/
public Integer getCreateCost() {
return createCost < 0 ? EconomyHandler.getCreateCost() : createCost;
return createCost < 0 ? EconomyHandler.getDefaultCreateCost() : createCost;
}
/**
@ -170,8 +170,7 @@ public class Gate {
* @return <p>The cost of destroying a portal with this gate</p>
*/
public Integer getDestroyCost() {
if (destroyCost < 0) return EconomyHandler.getDestroyCost();
return destroyCost;
return destroyCost < 0 ? EconomyHandler.getDefaultDestroyCost() : destroyCost;
}
/**