Pugmatt / BedrockConnect

Join any Minecraft Bedrock Edition server IP on Xbox One, Nintendo Switch, and PS4/PS5
GNU General Public License v3.0
1.41k stars 165 forks source link

Java error in self-hosted JSON config file #356

Open WombleWoo7547 opened 1 year ago

WombleWoo7547 commented 1 year ago

What happened?

I started the self-hosted server and saw the starter things, player limit, port all that but then I got the error: java.lang.NullPointerException: Cannot invoke "java.lang.Long.intValue()" because the return value of "org.json.simple.JSONObject.get(Object)" is null at main.com.pyratron.pugmatt.bedrockconnect.CustomServerHandler.createServer(CustomServerHandler.java:62) at main.com.pyratron.pugmatt.bedrockconnect.CustomServerHandler.initialize(CustomServerHandler.java:42) at main.com.pyratron.pugmatt.bedrockconnect.BedrockConnect.main(BedrockConnect.java:158) and saw my zsh prompt again.

Expected Behaviour?

I saw the "Bedrock connect started" message and the BedrockConnect server appeared in my LAN games in my Minecraft.

Steps to reproduce.

N/A

Screenshots/Videos

N/A

Minecraft Bedrock Version

1.19.50

Console

Xbox One S

Additional Context

Fresh install, straight from download .zip file, checksums matched.

WombleWoo7547 commented 1 year ago

(Here is my config file) - https://pastebin.com/raw/7KuB2JKx

WombleWoo7547 commented 1 year ago

@Pugmatt

CrafterPika commented 1 year ago

(Here is my config file) - https://pastebin.com/raw/7KuB2JKx

      {
        "name": "Zeqa",
        "iconUrl": "https://dunb17ur4ymx4.cloudfront.net/webstore/logos/f136bb5045f9a75671767007ad12441d728c8556.png",
        "address": "zeqa.net"
      }

here is the issue no port is specified. Looking at the actual code, the error occurs when trying to parse for the "port" value.

i corrected it for you