[BUGFIX] Solved issue with AbstractMethodError on getLongId

Cannot try-catch on AbstractMethodError
This commit is contained in:
JKetelaar
2017-02-06 20:37:51 +01:00
parent 73af642de6
commit 408aff5fd2
@@ -31,15 +31,15 @@ public class NpcDef {
if (avoidLong) { if (avoidLong) {
return accessor.getId(); return accessor.getId();
} else { } else {
try { // try {
long id = getLongId(); // long id = getLongId();
if (id > Integer.MAX_VALUE){ // if (id > Integer.MAX_VALUE){
throw new NoSuchMethodException("This server only supports long ids; change NpcDef#getId to NpcDef#getLongId"); // throw new NoSuchMethodException("This server only supports long ids; change NpcDef#getId to NpcDef#getLongId");
} // }
return (int) id; // return (int) id;
} catch (Exception e) { // } catch (Exception e) {
return accessor.getId(); return accessor.getId();
} // }
} }
} }