mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Allow skin uploader to log messages instead of closing the connection
This commit is contained in:
parent
404419df08
commit
11b10e2857
2 changed files with 19 additions and 1 deletions
|
@ -30,7 +30,8 @@ public enum WebsocketEventType {
|
||||||
SUBSCRIBERS_COUNT,
|
SUBSCRIBERS_COUNT,
|
||||||
ADDED_TO_QUEUE,
|
ADDED_TO_QUEUE,
|
||||||
SKIN_UPLOADED,
|
SKIN_UPLOADED,
|
||||||
CREATOR_DISCONNECTED;
|
CREATOR_DISCONNECTED,
|
||||||
|
LOG_MESSAGE;
|
||||||
|
|
||||||
public static final WebsocketEventType[] VALUES = values();
|
public static final WebsocketEventType[] VALUES = values();
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,23 @@ public final class FloodgateSkinUploader {
|
||||||
PluginMessageUtils.sendMessage(session, getSkinChannel(), bytes);
|
PluginMessageUtils.sendMessage(session, getSkinChannel(), bytes);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case LOG_MESSAGE:
|
||||||
|
String logMessage = node.get("message").asText();
|
||||||
|
switch (node.get("priority").asInt()) {
|
||||||
|
case -1:
|
||||||
|
logger.debug("Got debug message from skin uploader: " + logMessage);
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
logger.info("Got info message from skin uploader: " +logMessage);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
logger.error("Got error message from skin uploader: " + logMessage);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logger.info(logMessage);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while receiving a message", e);
|
logger.error("Error while receiving a message", e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue