Riizade/config file (#520)

* added POJO + yaml file

* made config members public

* switched to yaml

* modified files to use YamlConfig over ServerConstants

* removed constants from ServerConstants

* removed unused imports

* removed unused import

* removed world ini

* removed now unused .ini files

* fixed docker-launch.sh

* added jackson dependency JARs

* fixed errors

* removed unused server config values, added world defaults

* don't use env variables for docker

* fixed package imports/specifiers for js files
This commit is contained in:
Adam James-Liebau Johnson
2019-09-20 20:49:24 -03:00
committed by Ronan Lana
parent e169971384
commit 181573dc74
163 changed files with 1531 additions and 1113 deletions
+3 -2
View File
@@ -33,6 +33,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.locks.Lock;
import config.YamlConfig;
import net.server.Server;
import net.server.audit.locks.factory.MonitoredReentrantLockFactory;
@@ -278,7 +279,7 @@ public class CashShop {
this.accountId = accountId;
this.characterId = characterId;
if (!ServerConstants.USE_JOINT_CASHSHOP_INVENTORY) {
if (!YamlConfig.config.server.USE_JOINT_CASHSHOP_INVENTORY) {
if (jobType == 0) {
factory = ItemFactory.CASH_EXPLORER;
} else if (jobType == 1) {
@@ -358,7 +359,7 @@ public class CashShop {
public void gainCash(int type, CashItem buyItem, int world) {
gainCash(type, -buyItem.getPrice());
if(!ServerConstants.USE_ENFORCE_ITEM_SUGGESTION) Server.getInstance().getWorld(world).addCashItemBought(buyItem.getSN());
if(!YamlConfig.config.server.USE_ENFORCE_ITEM_SUGGESTION) Server.getInstance().getWorld(world).addCashItemBought(buyItem.getSN());
}
public boolean isOpened() {