3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 14:30:17 +01:00

lambdas/more console output/random stuff I don't even remember

Dieser Commit ist enthalten in:
EOT3000 2019-07-12 16:59:36 -04:00
Ursprung c44fdb2951
Commit 7c74df2aa2
4 geänderte Dateien mit 826 neuen und 40 gelöschten Zeilen

Datei anzeigen

@ -53,47 +53,44 @@ public class ConsoleCommandReader {
}
public void startConsole() {
thread = new Thread() {
@Override
public void run() {
if (terminal != null) {
LineReader lineReader = LineReaderBuilder.builder()
.appName("Geyser")
.terminal(terminal)
.build();
TerminalConsoleAppender.setReader(lineReader);
thread = new Thread(() -> {
if (terminal != null) {
LineReader lineReader = LineReaderBuilder.builder()
.appName("Geyser")
.terminal(terminal)
.build();
TerminalConsoleAppender.setReader(lineReader);
try {
String line;
try {
String line;
while (true) {
try {
line = lineReader.readLine("> ");
} catch (EndOfFileException ignored) {
continue;
}
if (line == null)
break;
while (true) {
try {
line = lineReader.readLine("> ");
} catch (EndOfFileException ignored) {
continue;
}
} catch (UserInterruptException e /* do nothing */) {
} finally {
TerminalConsoleAppender.setReader(null);
if (line == null)
break;
}
} else {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
String line;
while ((line = reader.readLine()) != null) {
ConsoleCommandSender sender = new GeyserConsoleCommandSender();
connector.getCommandMap().runCommand(sender, line);
}
} catch (IOException ex) {
Logger.getLogger("Geyser").log(Level.SEVERE, null, ex);
} catch (UserInterruptException e /* do nothing */) {
//
} finally {
TerminalConsoleAppender.setReader(null);
}
} else {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(System.in))) {
String line;
while ((line = reader.readLine()) != null) {
ConsoleCommandSender sender = new GeyserConsoleCommandSender();
connector.getCommandMap().runCommand(sender, line);
}
} catch (IOException ex) {
Logger.getLogger("Geyser").log(Level.SEVERE, null, ex);
}
}
};
});
thread.setName("ConsoleCommandThread");
connector.getGeneralThreadPool().execute(thread);

Datei anzeigen

@ -28,6 +28,7 @@ package org.geysermc.connector.network;
import com.nukkitx.protocol.bedrock.BedrockPong;
import com.nukkitx.protocol.bedrock.BedrockServerEventHandler;
import com.nukkitx.protocol.bedrock.BedrockServerSession;
import com.nukkitx.protocol.bedrock.v361.Bedrock_v361;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.network.session.GeyserSession;
@ -44,6 +45,7 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
@Override
public boolean onConnectionRequest(InetSocketAddress inetSocketAddress) {
System.out.println(inetSocketAddress + " tried to connect!");
return true;
}
@ -54,7 +56,7 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
pong.setEdition("MCPE");
pong.setMotd(config.getBedrock().getMotd1());
pong.setSubMotd(config.getBedrock().getMotd2());
pong.setPlayerCount(0);
pong.setPlayerCount(1);
pong.setMaximumPlayerCount(config.getMaxPlayers());
pong.setGameType("Default");
pong.setNintendoLimited(false);
@ -67,5 +69,7 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
public void onSessionCreation(BedrockServerSession bedrockServerSession) {
bedrockServerSession.setLogging(true);
bedrockServerSession.setPacketHandler(new UpstreamPacketHandler(connector, new GeyserSession(connector, bedrockServerSession)));
bedrockServerSession.setPacketCodec(Bedrock_v361.V361_CODEC);
}
}

Datei anzeigen

@ -26,12 +26,9 @@
package org.geysermc.connector.network;
import com.nimbusds.jose.JWSObject;
import com.nukkitx.protocol.bedrock.handler.BatchHandler;
import com.nukkitx.protocol.bedrock.handler.BedrockPacketHandler;
import com.nukkitx.protocol.bedrock.packet.LoginPacket;
import com.nukkitx.protocol.bedrock.packet.PlayStatusPacket;
import com.nukkitx.protocol.bedrock.packet.ResourcePackClientResponsePacket;
import com.nukkitx.protocol.bedrock.packet.ResourcePackStackPacket;
import com.nukkitx.protocol.bedrock.packet.ResourcePacksInfoPacket;
import com.nukkitx.protocol.bedrock.packet.*;
import net.minidev.json.JSONArray;
import net.minidev.json.JSONObject;
import net.minidev.json.JSONValue;
@ -52,6 +49,7 @@ public class UpstreamPacketHandler implements BedrockPacketHandler {
@Override
public boolean handle(LoginPacket loginPacket) {
System.err.println("Handled " + loginPacket.getClass().getSimpleName());
// TODO: Implement support for multiple protocols
if (loginPacket.getProtocolVersion() != GeyserConnector.BEDROCK_PACKET_CODEC.getProtocolVersion()) {
session.getUpstream().disconnect("Unsupported Bedrock version. Are you running an outdated version?");
@ -87,6 +85,7 @@ public class UpstreamPacketHandler implements BedrockPacketHandler {
@Override
public boolean handle(ResourcePackClientResponsePacket textPacket) {
System.err.println("Handled " + textPacket.getClass().getSimpleName());
switch (textPacket.getStatus()) {
case COMPLETED:
session.connect(connector.getRemoteServer());
@ -104,4 +103,790 @@ public class UpstreamPacketHandler implements BedrockPacketHandler {
}
return true;
}
@Override
public boolean handle(AdventureSettingsPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AnimatePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(BlockEntityDataPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(BlockPickRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(BookEditPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ClientCacheBlobStatusPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ClientCacheMissResponsePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ClientCacheStatusPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ClientToServerHandshakePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(CommandBlockUpdatePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(CommandRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ContainerClosePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(CraftingEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(EntityEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(EntityFallPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(EntityPickRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(EventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(InteractPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(InventoryContentPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(InventorySlotPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(InventoryTransactionPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ItemFrameDropItemPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LabTablePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LecternUpdatePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LevelEventGenericPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LevelSoundEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LevelSoundEvent3Packet packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MapInfoRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MobArmorEquipmentPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MobEquipmentPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ModalFormResponsePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MoveEntityAbsolutePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MovePlayerPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(NetworkStackLatencyPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PhotoTransferPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlayerActionPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlayerHotbarPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlayerInputPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlayerSkinPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PurchaseReceiptPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(RequestChunkRadiusPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ResourcePackChunkRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(RiderJumpPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ServerSettingsRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetDefaultGameTypePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetLocalPlayerAsInitializedPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetPlayerGameTypePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SubClientLoginPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(TextPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AddBehaviorTreePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AddEntityPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AddHangingEntityPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AddItemEntityPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AddPaintingPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AddPlayerPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AvailableCommandsPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(BlockEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(BossEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(CameraPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ChangeDimensionPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ChunkRadiusUpdatedPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ClientboundMapItemDataPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(CommandOutputPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ContainerOpenPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ContainerSetDataPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(CraftingDataPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(DisconnectPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ExplodePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LevelChunkPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(GameRulesChangedPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(GuiDataPickItemPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(HurtArmorPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AutomationClientConnectPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LevelEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MapCreateLockedCopyPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MobEffectPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ModalFormRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(MoveEntityDeltaPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(NpcRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(OnScreenTextureAnimationPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlayerListPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlaySoundPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(PlayStatusPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(RemoveEntityPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(RemoveObjectivePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ResourcePackChunkDataPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ResourcePackDataInfoPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ResourcePacksInfoPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ResourcePackStackPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(RespawnPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ScriptCustomEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ServerSettingsResponsePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ServerToClientHandshakePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetCommandsEnabledPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetDifficultyPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetDisplayObjectivePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetEntityDataPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetEntityLinkPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetEntityMotionPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetHealthPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetLastHurtByPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetScoreboardIdentityPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetScorePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetSpawnPositionPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetTimePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SetTitlePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ShowCreditsPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ShowProfilePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(ShowStoreOfferPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SimpleEventPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SpawnExperienceOrbPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(StartGamePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(StopSoundPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(StructureBlockUpdatePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(StructureTemplateDataExportRequestPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(StructureTemplateDataExportResponsePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(TakeItemEntityPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(TransferPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateAttributesPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateBlockPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateBlockPropertiesPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateBlockSyncedPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateEquipPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateSoftEnumPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(UpdateTradePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(AvailableEntityIdentifiersPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(BiomeDefinitionListPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(LevelSoundEvent2Packet packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(NetworkChunkPublisherUpdatePacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(SpawnParticleEffectPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
@Override
public boolean handle(VideoStreamConnectPacket packet) {
System.out.println("Handled packet: " + packet.getClass().getSimpleName());
return false;
}
}

Datei anzeigen

@ -19,7 +19,7 @@ remote:
address: 127.0.0.1
# The port of the remote (Java Edition) server
port: 25565
online-mode: true
online-mode: false
# Relay the MOTD, player count and max players from the remote server
ping-passthrough: false