impl WSC2
Some checks failed
/ Build BaseBand (push) Has been cancelled

This commit is contained in:
Daniella / Tove 2024-10-14 12:37:07 +02:00
parent 853b2baaf6
commit a094b9fbb6
Signed by: TudbuT
GPG key ID: B3CF345217F202D3
2 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,7 @@
package de.com.baseband.client.util.interact; package de.com.baseband.client.util.interact;
import com.mojang.realmsclient.gui.ChatFormatting; import com.mojang.realmsclient.gui.ChatFormatting;
import de.com.baseband.client.BaseBand;
import de.com.baseband.client.Setup; import de.com.baseband.client.Setup;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.GuiChat;
@ -18,7 +19,7 @@ public class Chat {
Minecraft.getMinecraft().player.sendMessage(new TextComponentString(ChatFormatting.LIGHT_PURPLE + Setup.get().Name.toLowerCase() + "~ " + ChatFormatting.RESET + s)); Minecraft.getMinecraft().player.sendMessage(new TextComponentString(ChatFormatting.LIGHT_PURPLE + Setup.get().Name.toLowerCase() + "~ " + ChatFormatting.RESET + s));
} }
else { else {
BaseBand.LOGGER.info(s);
} }
} }

View file

@ -15,19 +15,20 @@ import java.net.URL;
public class WebServiceClient2 extends Thread { public class WebServiceClient2 extends Thread {
// TODO make // TODO make
// -> https://downloads.baseband.com.de // -> https://download.baseband.com.de
BufferedReader connection; BufferedReader connection;
public Lock lock = new Lock(); public Lock lock = new Lock();
boolean outdated = false; boolean outdated = false;
public WebServiceClient2() { public WebServiceClient2() {
lock.lock();
try { try {
connection = new BufferedReader(new InputStreamReader(new URL("https://downloads.baseband.com.de/listen").openStream())); connection = new BufferedReader(new InputStreamReader(new URL("https://download.baseband.com.de/listen").openStream()));
lock.lock();
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace();
BaseBand.LOGGER.fatal("Cannot connect to WSC2."); BaseBand.LOGGER.fatal("Cannot connect to WSC2.");
BaseBand.shutdown(); BaseBand.shutdown();
} }