aboutsummaryrefslogtreecommitdiff
path: root/fabric/src/main/java/de
diff options
context:
space:
mode:
authorHacktheTime <l4bg0jb7@duck.com>2023-10-17 20:57:10 +0200
committerHacktheTime <l4bg0jb7@duck.com>2023-10-17 20:57:10 +0200
commit8aa2e47c4a63fb2669e1635a5a508672ee800159 (patch)
treecf29916521d8f2d0bad6ecfff031bf4f7005219c /fabric/src/main/java/de
parent12b944de4e1b69eaf5ffc0627191f984d94a2f40 (diff)
downloadBBsentials-8aa2e47c4a63fb2669e1635a5a508672ee800159.tar.gz
BBsentials-8aa2e47c4a63fb2669e1635a5a508672ee800159.tar.bz2
BBsentials-8aa2e47c4a63fb2669e1635a5a508672ee800159.zip
more changes (fixes)
Diffstat (limited to 'fabric/src/main/java/de')
-rw-r--r--fabric/src/main/java/de/hype/bbsentials/fabric/BBsentialsConfigScreemFactory.java5
-rw-r--r--fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java12
-rw-r--r--fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java5
3 files changed, 20 insertions, 2 deletions
diff --git a/fabric/src/main/java/de/hype/bbsentials/fabric/BBsentialsConfigScreemFactory.java b/fabric/src/main/java/de/hype/bbsentials/fabric/BBsentialsConfigScreemFactory.java
index 0b970b4..d06cfb4 100644
--- a/fabric/src/main/java/de/hype/bbsentials/fabric/BBsentialsConfigScreemFactory.java
+++ b/fabric/src/main/java/de/hype/bbsentials/fabric/BBsentialsConfigScreemFactory.java
@@ -315,6 +315,11 @@ public class BBsentialsConfigScreemFactory {
.setTooltip(Text.of("Detailed Dev Mode"))
.setSaveConsumer(newValue -> BBsentials.config.detailedDevMode = newValue)
.build());
+ dev.addEntry(entryBuilder.startBooleanToggle(Text.of("Dev Security"), BBsentials.config.devSecurity)
+ .setDefaultValue(true)
+ .setTooltip(Text.of("Shows dev debug even when its sensetive information"))
+ .setSaveConsumer(newValue -> BBsentials.config.devSecurity = newValue)
+ .build());
}
if (BBsentials.config.hasBBRoles("splasher")) {
ConfigCategory dev = builder.getOrCreateCategory(Text.of("§dSplashes"));
diff --git a/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java b/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java
index ce2c0bb..a0f04d2 100644
--- a/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java
+++ b/fabric/src/main/java/de/hype/bbsentials/fabric/MCUtils.java
@@ -1,6 +1,7 @@
package de.hype.bbsentials.fabric;
import com.mojang.authlib.exceptions.AuthenticationException;
+import de.hype.bbsentials.common.chat.Chat;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.sound.PositionedSoundInstance;
@@ -53,8 +54,15 @@ public class MCUtils implements de.hype.bbsentials.common.mclibraries.MCUtils {
try {
MinecraftClient.getInstance().getSessionService().joinServer(MinecraftClient.getInstance().getGameProfile().getId(), MinecraftClient.getInstance().getSession().getAccessToken(), serverId);
success = true;
- } catch (AuthenticationException ignored) {
-
+ } catch (AuthenticationException e) {
+ try {
+ Thread.sleep(1000);
+ }catch (Exception ignored){
+ }
+ if (tries==0){
+ Chat.sendPrivateMessageToSelfError("Could not authenticate at mojang: "+e.getMessage());
+ e.printStackTrace();
+ }
}
}
return serverId;
diff --git a/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java b/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java
index 2e7b4fe..92868d7 100644
--- a/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java
+++ b/fabric/src/main/java/de/hype/bbsentials/fabric/ModInitialiser.java
@@ -84,6 +84,11 @@ public class ModInitialiser implements ClientModInitializer {
connectToBBserver();
return 1;
}))
+ .then(ClientCommandManager.literal("disconnect")
+ .executes((context) -> {
+ connection.close();
+ return 1;
+ }))
.then(ClientCommandManager.literal("reconnect-stable-server")
.executes((context) -> {
connectToBBserver(false);