Skip to content

Commit

Permalink
Add Enchanted Dragons to featured servers
Browse files Browse the repository at this point in the history
+ remove nimbus-jose-jwt library
  • Loading branch information
Pugmatt committed Jun 4, 2024
1 parent 6619fdb commit 90e0a40
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 18 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ In the case where you want to use your own DNS server instead of the one I suppl
| Mineville | play.inpvp.net | 104.238.130.180 |
| Lifeboat | mco.lbsg.net | 104.238.130.180 |
| Galaxite | play.galaxite.net | 104.238.130.180 |
| Enchanted Dragons | play.enchanted.gg | 104.238.130.180 |

<sub>["Why is CubeCraft not included in the above list?"](https://github.com/Pugmatt/BedrockConnect/pull/456)</sub>

Expand Down
1 change: 1 addition & 0 deletions scripts/docker-install-bind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ add_domain hivebedrock.network @ geo
add_domain inpvp.net play
add_domain lbsg.net mco
add_domain galaxite.net play
add_domain enchanted.gg play

# Reload config
/etc/init.d/named start
1 change: 1 addition & 0 deletions scripts/install-bind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ add_domain hivebedrock.network @ geo
add_domain inpvp.net play
add_domain lbsg.net mco
add_domain galaxite.net play
add_domain enchanted.gg play

# Reload config

Expand Down
7 changes: 0 additions & 7 deletions serverlist-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@
<version>2.8.9</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.nimbusds/nimbus-jose-jwt -->
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>9.13</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class BedrockConnect {

public static int globalPacketLimit = RakConstants.DEFAULT_GLOBAL_PACKET_LIMIT;

public static String release = "1.43";
public static String release = "1.44";

public static HashMap<String, String> featuredServerIps;

Expand Down Expand Up @@ -203,6 +203,7 @@ public static void main(String[] args) {
featuredServerIps.put("mco.lbsg.net", "142.44.240.96");
featuredServerIps.put("play.inpvp.net", "52.234.130.241");
featuredServerIps.put("play.galaxite.net", "51.222.8.223");
featuredServerIps.put("play.enchanted.gg", "216.39.241.141");

JSONObject jo = new JSONObject();
for (Map.Entry server : featuredServerIps.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class UIForms {
featuredServerButtons.add(UIComponents.createButton("Lifeboat Network", "https://i.imgur.com/LoI7bYx.png", "url"));
featuredServerButtons.add(UIComponents.createButton("Mineville", "https://i.imgur.com/0K4TDut.png", "url"));
featuredServerButtons.add(UIComponents.createButton("Galaxite", "https://i.imgur.com/VxXO8Of.png", "url"));
featuredServerButtons.add(UIComponents.createButton("Enchanted Dragons", "https://i.imgur.com/1Fh9CBf.png", "url"));
}

public static ModalFormRequestPacket createMain(List<String> servers, BedrockServerSession session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.JsonNodeType;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jose.JWSObject;
import com.nimbusds.jose.Payload;
import com.nimbusds.jose.crypto.factories.DefaultJWSVerifierFactory;
import com.nimbusds.jose.shaded.json.JSONObject;
import com.nimbusds.jose.shaded.json.JSONValue;
import com.nimbusds.jwt.SignedJWT;
import main.com.pyratron.pugmatt.bedrockconnect.*;
import main.com.pyratron.pugmatt.bedrockconnect.gui.MainFormButton;
import main.com.pyratron.pugmatt.bedrockconnect.gui.ManageFormButton;
Expand All @@ -26,6 +19,7 @@
import org.cloudburstmc.protocol.bedrock.util.JsonUtils;
import org.cloudburstmc.protocol.common.PacketSignal;
import org.cloudburstmc.protocol.common.util.Preconditions;
import org.jose4j.json.internal.json_simple.JSONObject;
import org.jose4j.jws.JsonWebSignature;
import org.jose4j.lang.JoseException;

Expand Down Expand Up @@ -172,6 +166,9 @@ public PacketSignal handle(ModalFormResponsePacket packet) {
case 4: // Galaxite
transfer(getIP("play.galaxite.net"), 19132);
break;
case 5: // Enchanted Dragons
transfer(getIP("play.enchanted.gg"), 19132);
break;
}
break;
}
Expand Down Expand Up @@ -514,11 +511,11 @@ public PacketSignal handle(LoginPacket packet) {
String clientJwt = packet.getExtra();
verifyJwt(clientJwt, identityPublicKey);

System.out.println("Made it through login - " + "User: " + extraData.getAsString("displayName") + " (" + extraData.getAsString("identity") + ")");
System.out.println("Made it through login - " + "User: " + extraData.get("displayName") + " (" + extraData.get("identity") + ")");


name = extraData.getAsString("displayName");
uuid = extraData.getAsString("identity");
name = (String) extraData.get("displayName");
uuid = (String) extraData.get("identity");


// Whitelist check
Expand Down

0 comments on commit 90e0a40

Please sign in to comment.