Version 1.0.4 - updated to the latest EaglercraftBungee (0.2.0)

This commit is contained in:
LAX1DUDE 2022-04-08 01:56:03 -07:00
parent 3aa3741fd5
commit d827fbaab5
4 changed files with 103 additions and 98 deletions

Binary file not shown.

View File

@ -338,6 +338,9 @@ public class EaglerMOTD extends Plugin implements Listener {
@EventHandler @EventHandler
public void onMOTD(WebsocketMOTDEvent evt) { public void onMOTD(WebsocketMOTDEvent evt) {
if(!evt.getAccept().equalsIgnoreCase("motd") && !evt.getAccept().equalsIgnoreCase("motd.noicon")) {
return;
}
MOTDConnection con = new MOTDConnection(evt.getListener(), evt.getMOTD()); MOTDConnection con = new MOTDConnection(evt.getListener(), evt.getMOTD());
if(con.execute()) { if(con.execute()) {
if(max_total_sockets > 0) { if(max_total_sockets > 0) {

View File

@ -235,6 +235,7 @@ public class MOTDConnection {
} }
shouldPush = true; shouldPush = true;
} }
if(!this.motd.getAccept().equalsIgnoreCase("motd.noicon")) {
boolean shouldRenderIcon = false; boolean shouldRenderIcon = false;
Object icon = frame.opt("icon"); Object icon = frame.opt("icon");
if(icon != null) { if(icon != null) {
@ -336,6 +337,7 @@ public class MOTDConnection {
motd.setBitmap(newIcon); motd.setBitmap(newIcon);
shouldPush = true; shouldPush = true;
} }
}
if(shouldPush) { if(shouldPush) {
motd.sendToUser(); motd.sendToUser();
} }

View File

@ -1,4 +1,4 @@
name: EaglerMOTD name: EaglerMOTD
main: net.lax1dude.eaglercraft.eaglermotd.EaglerMOTD main: net.lax1dude.eaglercraft.eaglermotd.EaglerMOTD
version: 1.0.3 version: 1.0.4
author: LAX1DUDE author: LAX1DUDE