Quick patch for the last commit

Fixed some bugs that appeared with the last commit. Added more info on
the event functions documentation.
This commit is contained in:
ronancpl
2017-06-11 11:50:37 -03:00
parent 1afbac2429
commit 9ab79f216a
62 changed files with 178 additions and 75 deletions

View File

@@ -303,6 +303,12 @@ public class EventInstanceManager {
public void unregisterPlayer(MapleCharacter chr) {
wL.lock();
try {
try {
em.getIv().invokeFunction("playerUnregistered", EventInstanceManager.this, chr);
} catch (ScriptException | NoSuchMethodException ex) {
Logger.getLogger(EventManager.class.getName()).log(Level.SEVERE, null, ex);
}
chars.remove(chr);
gridRemove(chr);
dropExclusiveItems(chr);
@@ -554,12 +560,8 @@ public class EventInstanceManager {
return props;
}
public Integer getIntProperty(String key) {
try {
return Integer.parseInt(props.getProperty(key));
} catch(Exception e) {
return null;
}
public int getIntProperty(String key) {
return Integer.parseInt(props.getProperty(key));
}
public void leftParty(MapleCharacter chr) {