diff --git a/src/main/java/noppes/npcs/client/gui/util/TextContainer.java b/src/main/java/noppes/npcs/client/gui/util/TextContainer.java index 5ee8c8e5e..5eee41b99 100644 --- a/src/main/java/noppes/npcs/client/gui/util/TextContainer.java +++ b/src/main/java/noppes/npcs/client/gui/util/TextContainer.java @@ -31,9 +31,7 @@ public class TextContainer { public TextContainer(String text){ - this.text = text; - text.replaceAll("\\r?\\n|\\r", "\n"); - double l = 1d; + this.text = text.replaceAll("\\r?\\n|\\r", "\n"); } public void init(int width, int height){ diff --git a/src/main/java/noppes/npcs/controllers/data/Availability.java b/src/main/java/noppes/npcs/controllers/data/Availability.java index 1b039d730..1407569a8 100644 --- a/src/main/java/noppes/npcs/controllers/data/Availability.java +++ b/src/main/java/noppes/npcs/controllers/data/Availability.java @@ -270,7 +270,7 @@ public class Availability implements ICompatibilty, IAvailability { } public int getDialog(int i) { - if (i < 0 && i > 3) { + if (i < 0 || i > 3) { throw new CustomNPCsException(i + " isnt between 0 and 3", new Object[0]); } else if (i == 0) { return this.dialogId; @@ -282,7 +282,7 @@ public class Availability implements ICompatibilty, IAvailability { } public void setDialog(int i, int id, int type) { - if (i < 0 && i > 3) { + if (i < 0 || i > 3) { throw new CustomNPCsException(i + " isnt between 0 and 3", new Object[0]); } else { EnumAvailabilityDialog e = EnumAvailabilityDialog.values()[MathHelper.clamp_int(type, 0, 2)]; @@ -304,7 +304,7 @@ public class Availability implements ICompatibilty, IAvailability { } public void removeDialog(int i) { - if (i < 0 && i > 3) { + if (i < 0 || i > 3) { throw new CustomNPCsException(i + " isnt between 0 and 3", new Object[0]); } else { if (i == 0) { @@ -325,7 +325,7 @@ public class Availability implements ICompatibilty, IAvailability { } public int getQuest(int i) { - if (i < 0 && i > 3) { + if (i < 0 || i > 3) { throw new CustomNPCsException(i + " isnt between 0 and 3", new Object[0]); } else if (i == 0) { return this.questId; @@ -337,7 +337,7 @@ public class Availability implements ICompatibilty, IAvailability { } public void setQuest(int i, int id, int type) { - if (i < 0 && i > 3) { + if (i < 0 || i > 3) { throw new CustomNPCsException(i + " isnt between 0 and 3", new Object[0]); } else { EnumAvailabilityQuest e = EnumAvailabilityQuest.values()[MathHelper.clamp_int(type, 0, 5)]; @@ -359,7 +359,7 @@ public class Availability implements ICompatibilty, IAvailability { } public void removeQuest(int i) { - if (i < 0 && i > 3) { + if (i < 0 || i > 3) { throw new CustomNPCsException(i + " isnt between 0 and 3", new Object[0]); } else { if (i == 0) { @@ -380,7 +380,7 @@ public class Availability implements ICompatibilty, IAvailability { } public void setFaction(int i, int id, int type, int stance) { - if (i < 0 && i > 1) { + if (i < 0 || i > 1) { throw new CustomNPCsException(i + " isnt between 0 and 1", new Object[0]); } else { EnumAvailabilityFactionType e = EnumAvailabilityFactionType.values()[MathHelper.clamp_int(type, 0, 2)]; @@ -399,7 +399,7 @@ public class Availability implements ICompatibilty, IAvailability { } public void removeFaction(int i) { - if (i < 0 && i > 1) { + if (i < 0 || i > 1) { throw new CustomNPCsException(i + " isnt between 0 and 1", new Object[0]); } else { if (i == 0) {