mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 09:09:08 +00:00
kam wtf man
This commit is contained in:
1 parent
7e70f57941
commit
b9968a2dfb
3 files changed
+8
-3
No files matched your search
@@ -21,7 +21,7 @@ public class TranslateUtil {
|
||||
public static String Translate(String text) {
|
||||
|
||||
try {
|
||||
String urlStr = String.format(TranslateUrl, URLEncoder.encode(text, StandardCharsets.UTF_8), "auto", "nl");
|
||||
String urlStr = String.format(TranslateUrl, URLEncoder.encode(text, StandardCharsets.UTF_8.name()), "auto", "nl");
|
||||
URL url = new URL(urlStr);
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import noppes.npcs.client.gui.util.SubGuiInterface;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
@@ -144,7 +145,11 @@ public class GuiTextureSelection extends SubGuiInterface implements ICustomScrol
|
||||
if (i > 0) {
|
||||
url = url.substring(0, i);
|
||||
}
|
||||
url = URLDecoder.decode(url, StandardCharsets.UTF_8);
|
||||
try {
|
||||
url = URLDecoder.decode(url, StandardCharsets.UTF_8.name());
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new File(url);
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +153,7 @@ public class ScriptNbt implements INbt {
|
||||
} else if (nbt instanceof Integer) {
|
||||
list.appendTag(new NBTTagInt(((Integer) nbt).intValue()));
|
||||
} else if (nbt instanceof int[]) {
|
||||
list.appendTag(new NBTTagIntArray(nbt));
|
||||
list.appendTag(new NBTTagIntArray((int[]) nbt));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user