Skip to content

Commit

Permalink
check find event loops in Waterfall
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbraemer committed Feb 10, 2024
1 parent b51bd18 commit 7d61f97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void initializeLocalChannel() {

if (this.localChannel != null) {
logger.warn(
"Geyser attempted to inject into the server connection handler twice! Please ensure you aren't using /reload or any plugin that (re)loads Geyser after the server has started.");
"Connect attempted to inject into the server connection handler twice! Please ensure you aren't using /reload or any plugin that (re)loads Connect after the server has started.");
return;
}

Expand Down Expand Up @@ -126,8 +126,8 @@ private void initializeLocalChannel0() throws Exception {
// TODO - allow Geyser to specify its own listener info properties
if (proxy.getConfig().getListeners().size() != 1) {
throw new UnsupportedOperationException(
"Geyser does not currently support multiple listeners with injection! " +
"Please reach out to us on our Discord at https://discord.gg/GeyserMC so we can hear feedback on your setup.");
"Connect does not currently support multiple listeners with injection! " +
"Please reach out to us on our Discord at https://minekube.com/discord so we can hear feedback on your setup.");
}
ListenerInfo listenerInfo = proxy.getConfig().getListeners().stream().findFirst().orElseThrow(
IllegalStateException::new);
Expand All @@ -149,6 +149,9 @@ private void initializeLocalChannel0() throws Exception {
bossGroup = (EventLoopGroup) proxyClass.getField("bossEventLoopGroup").get(proxy);
workerGroup = (EventLoopGroup) proxyClass.getField("workerEventLoopGroup").get(proxy);
logger.debug("Waterfall event loop style detected.");
if (bossGroup == null || workerGroup == null) {
throw new IllegalStateException("Failed to find event loops in Waterfall");
}
}

// Is currently just AttributeKey.valueOf("ListerInfo") but we might as well copy the value itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void init(
config = configLoader.load();
if (config.isDebug()) {
logger.enableDebug();
logger.debug("Debug mode enabled");
}

configHolder.set(config);
Expand Down

0 comments on commit 7d61f97

Please sign in to comment.