Game Menu
-
Il faut un copier/coller du rapport de crash.
-
La variable est déjà utilisée plus haut, change juste le nom de la variable.
-
D’accord pour le bouton du site ça fonctionne et si je veux faire un bouton ts3 comment faire ? J’ai mis ce code la mais ça fonctionne pas ça ne m’ouvre pas teamspeak : ```java
case 12:
Desktop teamspeak = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
if (teamspeak != null && teamspeak.isSupported(Desktop.Action.BROWSE))
{
try {
teamspeak.browse(new URL(“ts3server://151.80.115.24?port=”).toURI());
} catch (Exception e) {
e.printStackTrace();
}
}
break; -
ts3server://151.80.115.24?port=9987
-
ça ne fonctionne toujours pas voilà ce que j’ai dans la console : ```
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: java.net.MalformedURLException: unknown protocol: ts3server
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.net.URL.<init>(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.net.URL.<init>(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.net.URL.<init>(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at fr.minecraftforgefrance.client.custommenu.GuiCustomIngameMenu.actionPerformed(GuiCustomIngameMenu.java:96)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.gui.GuiScreen.mouseClicked(GuiScreen.java:252)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.gui.GuiScreen.handleMouseInput(GuiScreen.java:344)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.gui.GuiScreen.handleInput(GuiScreen.java:313)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.runTick(Minecraft.java:1720)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1028)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.Minecraft.run(Minecraft.java:951)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.client.main.Main.main(Main.java:164)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at java.lang.reflect.Method.invoke(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
[20:58:07] [Client thread/INFO] [STDERR]: [java.lang.Throwable$WrappedPrintStream:println:-1]: at GradleStart.main(Unknown Source) -
Tu es sous quel système d’exploitation ?
-
Windows 8
-
Il ne faut pas faire URL.toURI(), fait directement new URI(“ts3server:…”).
-
Comment ça ? Je comprends pas ?
-
@‘Zedokf_DrM’:
Comment ça ? Je comprends pas ?
Une URL ne peut avoir comme protocole http, https, ftp, sftp ou ftps et non ts3server, il faut donc utiliser une URI, mets çà :
teamspeak.browse(new URI("ts3server://151.80.115.24?port=9987"));à la place de :
teamspeak.browse(new URL("ts3server://151.80.115.24?port=").toURI());