Fixed memory leak

This commit is contained in:
LAX1DUDE 2022-04-02 10:56:01 -07:00
parent cfa513a4f8
commit 1fd47f074e
3 changed files with 14 additions and 2 deletions

Binary file not shown.

View File

@ -1,3 +1,5 @@
### THIS IS A BUNGEE PLUGIN! Install in 'bungee_command/plugins' not 'bukkit_command/plugins'
# EaglerMOTD
### This plugin can add animated MOTDs to your Eaglercraft server

View File

@ -117,7 +117,12 @@ public class MOTDConnection {
currentFrame = currentMessage.random ? rand.nextInt(currentMessage.frames.size()) : 0;
applyFrame(currentMessage.frames.get(currentFrame));
motd.sendToUser();
return true;
if(currentMessage.next == null && currentMessage.interval <= 0) {
motd.close();
return false;
}else {
return true;
}
}else {
this.motd.close();
return false;
@ -143,7 +148,12 @@ public class MOTDConnection {
motd.sendToUser();
}
}
return true;
if(currentMessage.next == null && currentMessage.interval <= 0) {
motd.close();
return false;
}else {
return true;
}
}
}