mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 22:15:08 +00:00
fix: Add CarbonChatInternal#isProxy and removed unnecessary log in Velocity
This commit is contained in:
4 files changed
+14
-1
No files matched your search
@@ -189,6 +189,10 @@ public abstract class CarbonChatInternal<C extends CarbonPlayer> implements Carb
|
||||
return this.messagingManager.get().packetService();
|
||||
}
|
||||
|
||||
public boolean isProxy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Injector injector() {
|
||||
return this.injector;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import java.util.function.Consumer;
|
||||
import net.draycia.carbon.api.CarbonChat;
|
||||
import net.draycia.carbon.api.CarbonChatProvider;
|
||||
import net.draycia.carbon.api.events.CarbonShutdownEvent;
|
||||
import net.draycia.carbon.common.CarbonChatInternal;
|
||||
import net.draycia.carbon.common.config.ConfigFactory;
|
||||
import net.draycia.carbon.common.config.MessagingSettings;
|
||||
import net.draycia.carbon.common.listeners.PingHandler;
|
||||
@@ -83,7 +84,9 @@ public class MessagingManager {
|
||||
final PingHandler pingHandler
|
||||
) {
|
||||
if (!configFactory.primaryConfig().messagingSettings().enabled()) {
|
||||
logger.info("Messaging services disabled in config. Cross-server will not work without this!");
|
||||
if (!((CarbonChatInternal<?>) carbonChat).isProxy()) {
|
||||
logger.info("Messaging services disabled in config. Cross-server will not work without this!");
|
||||
}
|
||||
this.messagingService = EMPTY_MESSAGING_SERVICE;
|
||||
this.packetService = null;
|
||||
this.carbonChat = carbonChat;
|
||||
|
||||
@@ -111,4 +111,9 @@ public class CarbonChatVelocity extends CarbonChatInternal<CarbonPlayerVelocity>
|
||||
this.shutdown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isProxy() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,6 +34,7 @@ import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.TextReplacementConfig;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
|
||||
import static java.util.Objects.requireNonNullElse;
|
||||
import static net.draycia.carbon.api.util.KeyedRenderer.keyedRenderer;
|
||||
import static net.draycia.carbon.common.util.Strings.URL_REPLACEMENT_CONFIG;
|
||||
|
||||
Reference in new issue
Block a user