Skip to content

Commit

Permalink
fix fishing event (#130)
Browse files Browse the repository at this point in the history
making the "while" function working
  • Loading branch information
BloodEko authored and mcmonkey4eva committed Jun 8, 2018
1 parent 7c99a3e commit 32ad9bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
String lower = CoreUtilities.toLowerCase(s);
String fish = CoreUtilities.getXthArg(2, lower);

if (!fish.isEmpty() && !fish.equals("in")) {
if (!fish.isEmpty() && !fish.equals("in") && !fish.equals("while")) {
if (entity == null) {
return false;
}
Expand All @@ -75,7 +75,7 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
}

List<String> data = CoreUtilities.split(lower, ' ');
for (int index = 0; index < data.size(); index++) {
for (int index = 2; index < data.size(); index++) {
if (data.get(index).equals("while") && !data.get(index + 1).equalsIgnoreCase(state.asString())) {
return false;
}
Expand Down

0 comments on commit 32ad9bc

Please sign in to comment.