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 16:49:24 -07:00
committed by Ronan Lana
parent e169971384
commit 181573dc74
163 changed files with 1531 additions and 1113 deletions

View File

@@ -31,6 +31,7 @@ import client.inventory.MapleInventoryType;
import client.inventory.MaplePet;
import client.inventory.ModifyInventory;
import client.newyear.NewYearCardRecord;
import config.YamlConfig;
import constants.ItemConstants;
import constants.ServerConstants;
@@ -689,9 +690,9 @@ public class MapleInventoryManipulator {
if (ii.isDropRestricted(it.getItemId())) {
return true;
} else if (ii.isCash(it.getItemId())) {
if (ServerConstants.USE_ENFORCE_UNMERCHABLE_CASH) { // thanks Ari for noticing cash drops not available server-side
if (YamlConfig.config.server.USE_ENFORCE_UNMERCHABLE_CASH) { // thanks Ari for noticing cash drops not available server-side
return true;
} else if (ItemConstants.isPet(it.getItemId()) && ServerConstants.USE_ENFORCE_UNMERCHABLE_PET) {
} else if (ItemConstants.isPet(it.getItemId()) && YamlConfig.config.server.USE_ENFORCE_UNMERCHABLE_PET) {
return true;
}
} else if (isDroppedItemRestricted(it)) {
@@ -802,7 +803,7 @@ public class MapleInventoryManipulator {
}
private static boolean isDroppedItemRestricted(Item it) {
return ServerConstants.USE_ERASE_UNTRADEABLE_DROP && it.isUntradeable();
return YamlConfig.config.server.USE_ERASE_UNTRADEABLE_DROP && it.isUntradeable();
}
public static boolean isSandboxItem(Item it) {