deathcap / wsmc

WebSocket proxy to Minecraft
33 stars 10 forks source link

Sponge plugin for wsmc/Java #34

Closed deathcap closed 8 years ago

deathcap commented 8 years ago

https://github.com/deathcap/wsmc/issues/7 SpongeAPI plugin in wsmc/Java

References: https://docs.spongepowered.org/en/plugin/index.html

deathcap commented 8 years ago

Testing with mods/spongeforge-1.8.9-1732-3.1.0-BETA-1147.jar on forge-1.8.9-11.15.0.1715, and mods/wsmc-0.0.1.jar built from this branch. Using mcwebchat example client:

[00:31:55] [Server thread/INFO] [STDOUT]: [deathcap.wsmc.WsmcSpongePlugin:onServerStart:20]: WS(:24444) <--> MC(localhost:25565) [00:31:55] [Server thread/INFO] [Sponge]: Timings Reset

Feb 10, 2016 12:31:59 AM deathcap.wsmc.web.WebSocketHandler setupInitialConnection INFO: Received WS connection: /0:0:0:0:0:0:0:1:57794 --> /0:0:0:0:0:0:0:1:24444 Feb 10, 2016 12:31:59 AM deathcap.wsmc.web.WebSocketHandler setupInitialConnection INFO: readableBytes = 17 Feb 10, 2016 12:31:59 AM deathcap.wsmc.web.WebSocketHandler setupInitialConnection INFO: clientCredential = testuser:HvsnQVnG Feb 10, 2016 12:31:59 AM deathcap.wsmc.web.WebSocketHandler setupInitialConnection INFO: command-line mode, allowing everyone [00:31:59] [Thread-9/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftThread:run:31]: Connecting to localhost:25565 as testuser:HvsnQVnG [00:31:59] [nioEventLoopGroup-4-1/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftClientHandler:channelActive:105]: Connected to localhost/127.0.0.1:25565 [00:31:59] [nioEventLoopGroup-4-1/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftClientHandler$1:operationComplete:121]: wrote handshake packet [00:31:59] [Netty Server IO #1/INFO] [FML]: Disconnecting Player: This server requires FML/Forge to be installed. Contact your server admin for more details. [00:31:59] [nioEventLoopGroup-4-1/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftClientHandler:channelRead:52]: opcode = 0 [00:31:59] [nioEventLoopGroup-4-1/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftClientHandler:channelRead:53]: 00 5D 22 54 68 69 73 20 73 65 72 76 65 72 20 72 65 71 75 69 72 65 73 20 46 4D 4C 2F 46 6F 72 67 65 20 74 6F 20 62 65 20 69 6E 73 74 61 6C 6C 65 64 2E 20 43 6F 6E 74 61 63 74 20 79 6F 75 72 20 73 65 72 76 65 72 20 61 64 6D 69 6E 20 66 6F 72 20 6D 6F 72 65 20 64 65 74 61 69 6C 73 2E [00:31:59] [nioEventLoopGroup-4-1/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftClientHandler:channelRead:57]: Server disconnect reason = "This server requires FML/Forge to be installed. Contact your server admin for more details." [00:31:59] [nioEventLoopGroup-4-1/INFO] [STDOUT]: [deathcap.wsmc.mc.MinecraftClientHandler:channelInactive:135]: Disconnected from localhost/127.0.0.1:25565

The client kick for Forge/FML should be solved when using the client from https://github.com/voxel/voxel-clientmc. No configuration yet, which is a more pressing issue. Need to adapt the WsmcBukkitPlugin configuration, get ip, external address, /web command, and player join handling into WsmcSpongePlugin.

deathcap commented 8 years ago

Configuration is in, using the SpongeAPI, about half done. Next step is sending player messages and receiving player commands, for UserIdentityLinker.