Solved Skript 1.9 loop all players

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ByteHD

Member
Jun 27, 2017
2
1
0
Hey guys,
I'm running Skript on Spigot 1.9 and looping all players doesn't work, is there another way to do the same thing?

My Code:
code_language.skript:
command cspy_cmd:
    if sender is a player:
        loop all players:
            if {cs::%uuid of loop-player%} is set:
                if "%player%" is not "%loop-player%":
                    send "&c&l(!) %player% executed the command  &n/%complete command%&c&l." to loop-player

Error:
code_language.skript:
org.bukkit.command.CommandException: Unhandled exception executing command 'cspy_cmd' in plugin Skript v2.1.2
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.dispatchCommand(CraftServer.java:645) ~[spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.PlayerConnection.handleCommand(PlayerConnection.java:1349) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.PlayerConnection.a(PlayerConnection.java:1184) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_131]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_131]
        at net.minecraft.server.v1_9_R2.SystemUtils.a(SourceFile:45) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:726) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:665) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:564) [spigot.jar:git-Spigot-4af49dc-c5e9a16]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: java.lang.NoSuchMethodError: org.bukkit.Bukkit.getOnlinePlayers()[Lorg/bukkit/entity/Player;
        at ch.njol.skript.effects.EffBroadcast.execute(EffBroadcast.java:72) ~[?:?]
        at ch.njol.skript.lang.Effect.run(Effect.java:50) ~[?:?]
        at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:63) ~[?:?]
        at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:91) ~[?:?]
        at ch.njol.skript.lang.Trigger.execute(Trigger.java:53) ~[?:?]
        at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:220) ~[?:?]
        at ch.njol.skript.command.ScriptCommand$1.call(ScriptCommand.java:1) ~[?:?]
        at ch.njol.skript.util.Task.callSync(Task.java:139) ~[?:?]
        at ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:193) ~[?:?]
        at ch.njol.skript.command.ScriptCommand.onCommand(ScriptCommand.java:170) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigot.jar:git-Spigot-4af49dc-c5e9a16]
 
Njol's original Skript isn't compatible with 1.9 or higher, consider using up-to-date fork of spigot, for example bensku's fork.
 
Status
Not open for further replies.