diff --git a/src/com/dre/dungeonsxl/signs/SIGNMob.java b/src/com/dre/dungeonsxl/signs/SIGNMob.java index 502d7a67..87485e11 100644 --- a/src/com/dre/dungeonsxl/signs/SIGNMob.java +++ b/src/com/dre/dungeonsxl/signs/SIGNMob.java @@ -34,15 +34,23 @@ public class SIGNMob extends DSign { @Override public boolean check() { - // TODO Auto-generated method stub + String lines[] = sign.getLines(); + if (!lines[1].equals("") && !lines[2].equals("")) { + if (lines[1] != null) { + String[] atributes = lines[2].split(","); + if (atributes.length == 2) { + return true; + } + } + } - return true; + return false; } @Override public void onInit() { String lines[] = sign.getLines(); - if (lines[1] != "" && lines[2] != "") { + if (!lines[1].equals("") && !lines[2].equals("")) { String mob = lines[1]; if (mob != null) { String[] atributes = lines[2].split(","); diff --git a/src/com/dre/dungeonsxl/signs/SIGNMsg.java b/src/com/dre/dungeonsxl/signs/SIGNMsg.java index 3403f648..445295ee 100644 --- a/src/com/dre/dungeonsxl/signs/SIGNMsg.java +++ b/src/com/dre/dungeonsxl/signs/SIGNMsg.java @@ -23,7 +23,9 @@ public class SIGNMsg extends DSign { @Override public boolean check() { - // TODO Auto-generated method stub + if (sign.getLine(1).equals("")) { + return false; + } return true; } @@ -32,7 +34,7 @@ public class SIGNMsg extends DSign { public void onInit() { String lines[] = sign.getLines(); - if (lines[1] != "" && lines[2] != "") { + if (!lines[1].equals("")) { String msg = gworld.config.getMsg(p.parseInt(lines[1]), true); if (msg != null) { this.msg = msg; diff --git a/src/com/dre/dungeonsxl/signs/SIGNPlace.java b/src/com/dre/dungeonsxl/signs/SIGNPlace.java index 183bf69d..9ae7206d 100644 --- a/src/com/dre/dungeonsxl/signs/SIGNPlace.java +++ b/src/com/dre/dungeonsxl/signs/SIGNPlace.java @@ -17,7 +17,9 @@ public class SIGNPlace extends DSign { @Override public boolean check() { - // TODO Auto-generated method stub + if (sign.getLine(1).equals("")) { + return false; + } return true; } diff --git a/src/com/dre/dungeonsxl/signs/SIGNSoundMsg.java b/src/com/dre/dungeonsxl/signs/SIGNSoundMsg.java index 2a57fa43..e3f81065 100644 --- a/src/com/dre/dungeonsxl/signs/SIGNSoundMsg.java +++ b/src/com/dre/dungeonsxl/signs/SIGNSoundMsg.java @@ -28,7 +28,9 @@ public class SIGNSoundMsg extends DSign { @Override public boolean check() { - // TODO Auto-generated method stub + if (sign.getLine(1).equals("")) { + return false; + } return true; } @@ -37,7 +39,7 @@ public class SIGNSoundMsg extends DSign { public void onInit() { String lines[] = sign.getLines(); - if (lines[1] != "" && lines[2] != "") { + if (!lines[1].equals("")) { String msg = gworld.config.getMsg(p.parseInt(lines[1]), true); if (msg != null) { this.msg = msg;