diff --git a/pom.xml b/pom.xml index 1f37f3d71..f88cadbb4 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ me.blackvein.quests quests - 2.9.5 + 2.9.6 quests https://github.com/FlyingPikachu/Quests/ jar diff --git a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java index 634bdc672..4e266d5ca 100644 --- a/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java +++ b/src/main/java/me/blackvein/quests/prompts/CreateStagePrompt.java @@ -625,14 +625,16 @@ public class CreateStagePrompt extends FixedSetPrompt { } else { two = 0; } - if (one == two) { + if (one == two) { int missing; + LinkedList elements; if (context.getSessionData(pref + CK.S_BREAK_DURABILITY) != null) { missing = one - ((List) context.getSessionData(pref + CK.S_BREAK_DURABILITY)).size(); + elements = (LinkedList) context.getSessionData(pref + CK.S_BREAK_DURABILITY); } else { missing = one; + elements = new LinkedList(); } - LinkedList elements = (LinkedList) context.getSessionData(pref + CK.S_BREAK_DURABILITY); for (int i = 0; i < missing; i++) { elements.add(0); } @@ -842,12 +844,14 @@ public class CreateStagePrompt extends FixedSetPrompt { } if (one == two) { int missing; + LinkedList elements; if (context.getSessionData(pref + CK.S_DAMAGE_DURABILITY) != null) { missing = one - ((List) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY)).size(); + elements = (LinkedList) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY); } else { missing = one; + elements = new LinkedList(); } - LinkedList elements = (LinkedList) context.getSessionData(pref + CK.S_DAMAGE_DURABILITY); for (int i = 0; i < missing; i++) { elements.add(0); } @@ -1057,12 +1061,14 @@ public class CreateStagePrompt extends FixedSetPrompt { } if (one == two) { int missing; + LinkedList elements; if (context.getSessionData(pref + CK.S_PLACE_DURABILITY) != null) { missing = one - ((List) context.getSessionData(pref + CK.S_PLACE_DURABILITY)).size(); + elements = (LinkedList) context.getSessionData(pref + CK.S_PLACE_DURABILITY); } else { missing = one; + elements = new LinkedList(); } - LinkedList elements = (LinkedList) context.getSessionData(pref + CK.S_PLACE_DURABILITY); for (int i = 0; i < missing; i++) { elements.add(0); } @@ -1272,12 +1278,14 @@ public class CreateStagePrompt extends FixedSetPrompt { } if (one == two) { int missing; + LinkedList elements; if (context.getSessionData(pref + CK.S_USE_DURABILITY) != null) { missing = one - ((List) context.getSessionData(pref + CK.S_USE_DURABILITY)).size(); + elements = (LinkedList) context.getSessionData(pref + CK.S_USE_DURABILITY); } else { missing = one; + elements = new LinkedList(); } - LinkedList elements = (LinkedList) context.getSessionData(pref + CK.S_USE_DURABILITY); for (int i = 0; i < missing; i++) { elements.add(0); } @@ -1487,12 +1495,14 @@ public class CreateStagePrompt extends FixedSetPrompt { } if (one == two) { int missing; + LinkedList elements; if (context.getSessionData(pref + CK.S_CUT_DURABILITY) != null) { missing = one - ((List) context.getSessionData(pref + CK.S_CUT_DURABILITY)).size(); + elements = (LinkedList) context.getSessionData(pref + CK.S_CUT_DURABILITY); } else { missing = one; + elements = new LinkedList(); } - LinkedList elements = (LinkedList) context.getSessionData(pref + CK.S_CUT_DURABILITY); for (int i = 0; i < missing; i++) { elements.add(0); }