File tree Expand file tree Collapse file tree
src/main/java/net/azisaba/interchatmod/fabric Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ plugins {
44
55java.toolchain.languageVersion.set(JavaLanguageVersion .of(21 ))
66
7- val minecraftVersion = " 1.21.1 "
8- val yarnMappings = " 1.21.1 +build.3 "
7+ val minecraftVersion = " 1.21.3 "
8+ val yarnMappings = " 1.21.3 +build.2 "
99val loaderVersion = " 0.16.7"
10- val fabricVersion = " 0.105.0 +1.21.1 "
10+ val fabricVersion = " 0.106.1 +1.21.3 "
1111val archivesBaseName = " InterChatMod-${project.name} "
1212val adventureVersion by project.properties
1313
Original file line number Diff line number Diff line change 2323import java .io .IOException ;
2424import java .net .HttpURLConnection ;
2525import java .net .URI ;
26- import java .net .URL ;
26+ import java .net .URISyntaxException ;
2727import java .nio .charset .StandardCharsets ;
2828import java .util .*;
2929import java .util .concurrent .ConcurrentHashMap ;
@@ -75,7 +75,7 @@ public void run() {
7575 Mod .client .sendMessageToGuild (null , message );
7676 } catch (WebsocketNotConnectedException e ) {
7777 assert MinecraftClient .getInstance ().player != null ;
78- MinecraftClient .getInstance ().player .sendMessage (Text .literal ("ギルドチャットに接続されていません。" ));
78+ MinecraftClient .getInstance ().player .sendMessage (Text .literal ("ギルドチャットに接続されていません。" ), false );
7979 Mod .reconnect ();
8080 }
8181 return false ;
@@ -105,9 +105,9 @@ public void run() {
105105 reconnect ();
106106 }
107107
108- private static String makeRequest (String path ) throws IOException {
108+ private static String makeRequest (String path ) throws IOException , URISyntaxException {
109109 String url = "https://api-ktor.azisaba.net/" + path ;
110- HttpURLConnection connection = (HttpURLConnection ) new URL (url ).openConnection ();
110+ HttpURLConnection connection = (HttpURLConnection ) new URI (url ). toURL ( ).openConnection ();
111111 connection .addRequestProperty ("Authorization" , "Bearer " + CONFIG .apiKey ());
112112 return new String (connection .getInputStream ().readAllBytes (), StandardCharsets .UTF_8 );
113113 }
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ private void sendMessage(Text text) {
6868 if (Mod .CONFIG .hideEverything ()) return ;
6969 ClientPlayerEntity player = MinecraftClient .getInstance ().player ;
7070 if (player == null ) return ;
71- player .sendMessage (text );
71+ player .sendMessage (text , false );
7272 }
7373
7474 @ Override
You can’t perform that action at this time.
0 commit comments