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:
committed by
Ronan Lana
parent
e169971384
commit
181573dc74
@@ -26,6 +26,7 @@ package client.command.commands.gm2;
|
||||
import client.command.Command;
|
||||
import client.MapleClient;
|
||||
import client.MapleCharacter;
|
||||
import config.YamlConfig;
|
||||
import constants.ServerConstants;
|
||||
|
||||
public class ApCommand extends Command {
|
||||
@@ -44,7 +45,7 @@ public class ApCommand extends Command {
|
||||
if (params.length < 2) {
|
||||
int newAp = Integer.parseInt(params[0]);
|
||||
if (newAp < 0) newAp = 0;
|
||||
else if (newAp > ServerConstants.MAX_AP) newAp = ServerConstants.MAX_AP;
|
||||
else if (newAp > YamlConfig.config.server.MAX_AP) newAp = YamlConfig.config.server.MAX_AP;
|
||||
|
||||
player.changeRemainingAp(newAp, false);
|
||||
} else {
|
||||
@@ -52,7 +53,7 @@ public class ApCommand extends Command {
|
||||
if (victim != null) {
|
||||
int newAp = Integer.parseInt(params[1]);
|
||||
if (newAp < 0) newAp = 0;
|
||||
else if (newAp > ServerConstants.MAX_AP) newAp = ServerConstants.MAX_AP;
|
||||
else if (newAp > YamlConfig.config.server.MAX_AP) newAp = YamlConfig.config.server.MAX_AP;
|
||||
|
||||
victim.changeRemainingAp(newAp, false);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user