Error at Skript while execute a command

Discussion in 'Skript' started by TheGamingChris, Dec 2, 2016.

  1. Hey,

    if I perform a specific comman (in this case: /start) the Plugin generade an error:

    Code (Text):
    [16:10:05 ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'start' in plugin Skript v2.2-dev20
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-de459a2-51263e9]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-de459a2-51263e9]
    at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:647) ~[spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.PlayerConnection.handleCommand(PlayerConnection.java:1358) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1193) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-de459a2-51263e9]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_111]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_111]
    at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:732) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:400) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:668) [spigot.jar:git-Spigot-de459a2-51263e9]
    at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:567) [spigot.jar:git-Spigot-de459a2-51263e9]
    at java.lang.Thread.run(Thread.java:745) [?:1.7.0_111]
    Caused by: java.lang.NoSuchMethodError: org.bukkit.Bukkit.getOnlinePlayers()[Lorg/bukkit/entity/Player;
    at ch.njol.skript.entity.EntityData.getAll(EntityData.java:455) ~[?:?]
    at ch.njol.skript.expressions.ExprEntities.get(ExprEntities.java:146) ~[?:?]
    at ch.njol.skript.expressions.ExprEntities.get(ExprEntities.java:1) ~[?:?]
    at ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:103) ~[?:?]
    at ch.njol.skript.lang.util.SimpleExpression.iterator(SimpleExpression.java:306) ~[?:?]
    at ch.njol.skript.expressions.ExprEntities.iterator(ExprEntities.java:211) ~[?:?]
    at ch.njol.skript.lang.Loop.walk(Loop.java:81) ~[?:?]
    at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:93) ~[?:?]
    at ch.njol.skript.lang.Trigger.execute(Trigger.java:53) ~[?:?]
    at ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:222) ~[?:?]
    at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:184) ~[?:?]
    at ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:161) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-de459a2-51263e9]
    ... 15 more

    What can I do? It has workt all days, but now it wont work.

    Best wishes

    TheGamingChris
     
    • Like Like x 1
  2. Get an updated version of skript
     
  3. Hm, you could try using on command "/start": instead of command /start:
    Or, your Skript version is outdated.
     
  4. mathhulk

    mathhulk Retired Moderator
    Retired

    You should never use the on command method to make commands.
     
  5. @mathhulk how should I make the command? Here is my command for the start:

    Code (Text):
    command /start:
        trigger:
            if player has permission "projekt.admin":
                if {game.run} is "false":
                    set {starttimer.run.%player%} to "true"
                    make player execute command "/booting"
                else:
                    message "&cThe game is running!"
            else:
                message "&cNo Permission!"
     
  6. What version is your server?
     
    • Agree Agree x 2
  7. @SharerXYZ My server is on MC Version 1.10.2 and I use the skript version dev22 because the higher dev versions wont work on my server
     
  8. What does /booting do? What is the plugin which runs this command or is there a skript that has this command in it?
     
  9. @Bailey_skilling

    Here is the "/booting" command. (It is in german because I'm german)

    Code (Text):
    command /booting:
        trigger:
            if {starttimer.run.%player%} is "true":
                set the player's level to 30
                send player title "&630 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 29
                wait 1 second
                set the player's level to 28
                wait 1 second
                set the player's level to 27
                wait 1 second
                set the player's level to 26
                wait 1 second
                set the player's level to 25
                send player title "&625 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 24
                wait 1 second
                set the player's level to 23
                wait 1 second
                set the player's level to 22
                wait 1 second
                set the player's level to 21
                wait 1 second
                set the player's level to 20
                send player title "&620 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 19
                wait 1 second
                set the player's level to 18
                wait 1 second
                set the player's level to 17
                wait 1 second
                set the player's level to 16
                wait 1 second
                set the player's level to 15
                send player title "&615 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 14
                wait 1 second
                set the player's level to 13
                wait 1 second
                set the player's level to 12
                wait 1 second
                set the player's level to 11
                wait 1 second
                set the player's level to 10
                send player title "&610 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 9
                wait 1 second
                set the player's level to 8
                wait 1 second
                set the player's level to 7
                wait 1 second
                set the player's level to 6
                wait 1 second
                set the player's level to 5
                play "BLOCK_NOTE_PLING" to player
                make console execute command "effect %player% clear"
                send player title "&c5 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 4
                play "BLOCK_NOTE_PLING" to player
                send player title "&c4 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 3
                play "BLOCK_NOTE_PLING" to player
                send player title "&c3 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 2
                play "BLOCK_NOTE_PLING" to player
                send player title "&c2 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 1
                play "BLOCK_NOTE_PLING" to player
                send player title "&c1 Sekunden" with subtitle "&7Bis zum Start!" for 1 second
                wait 1 second
                set the player's level to 0
                play "ENTITY_PLAYER_LEVELUP" to player
                send player title "&2LOS!" with subtitle "&7VIEL GL√úCK!" for 1 second
                set {starttimer.run.%player%} to "false"
                set {game.run} to "true"
            else:
                message "&cSpiel ist bereits gestartet!"
     
  10. Use the dev20b or the dev22f, both should work just fine on 1.10.2
     
  11. I have updated to 1.11. Now it works all perfect. Thank you all for your help :)