mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 16:29:39 +00:00
fix the strange places
This commit is contained in:
1 parent
30714e92a5
commit
002a64cb88
2 files changed
+9
-11
No files matched your search
@@ -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){
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user