tp jouer

4 Décembre 2021
14
0
1
24
bonjour,
jai l'erreur suivante lord de la téléportation du jouer si vous vouler le code dite moi le nom de la file
merci cordialement
erreur
Code:
org.bukkit.command.CommandException: Unhandled exception executing command 'duel' in plugin duel v2.0
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at org.bukkit.craftbukkit.v1_17_R1.CraftServer.dispatchCommand(CraftServer.java:790) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.network.PlayerConnection.handleCommand(PlayerConnection.java:1931) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1770) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1751) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(SourceFile:151) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(SourceFile:125) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.MinecraftServer.bf(MinecraftServer.java:1148) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1141) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.util.thread.IAsyncTaskHandler.awaitTasks(SourceFile:134) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1125) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1054) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:305) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: location.world
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at org.bukkit.craftbukkit.v1_17_R1.entity.CraftPlayer.teleport(CraftPlayer.java:679) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at org.bukkit.craftbukkit.v1_17_R1.entity.CraftEntity.teleport(CraftEntity.java:493) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        at fr.lemineurfou.duel.arenas.ArenaManager.joinArena(ArenaManager.java:25) ~[?:?]
        at fr.lemineurfou.duel.duel.onCommand(duel.java:104) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot.jar:3284-Spigot-3892929-0ebef35]
        ... 19 more
 

Fichiers joints

Salut,

Je pense que le code que tu as envoyé n'est pas le même que celui qui produit cette erreur (typiquement l'erreur dit qu'il y a un appel ligne 104 du fichier duel.java mais dans le fichier que tu me donne c'est une ligne vide).

Bref, la comma ça, je ne vois pas d'erreur.
Mais essaye de rajouter des messages de débug:
Java:
plugin.getLogger().info("Location " + nextArena.getFirstLoc());
Ajoute cette ligne juste au dessus de:
Java:
firstPlayer.teleport(nextArena.getFirstLoc());


Cordialement,
Detobel36