1. 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 comminuty!

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

  2. LOOKING FOR A VERSION OF SKRIPT??:

    You can always check our our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TuSKe bug

Discussion in 'Skript' started by lolplomer, Nov 2, 2019.

Tags:
  1. lolplomer

    lolplomer Member

    Joined:
    Oct 18, 2019
    Messages:
    5
    Likes Received:
    0
    ERROR LOG:
    Code (Text):
    1. > [09:37:56 ERROR]: Could not pass event InventoryClickEvent to Skript v2.4-beta9
    2. java.lang.NullPointerException
    3. at ch.njol.skript.lang.function.Function.execute(Function.java:118) ~[?:?]
    4. at com.github.tukenuke.tuske.util.EvalFunction.run(EvalFunction.java:101) ~[?:?]
    5. at com.github.tukenuke.tuske.manager.gui.GUI.run(GUI.java:29) ~[?:?]
    6. at com.github.tukenuke.tuske.manager.gui.GUIManager$1.onClick(GUIManager.java:149) ~[?:?]
    7. at com.github.tukenuke.tuske.listeners.GUIListener.onEvent(GUIListener.java:57) ~[?:?]
    8. at com.github.tukenuke.tuske.manager.gui.v2.SkriptGUIEvent.check(SkriptGUIEvent.java:39) ~[?:?]
    9. at ch.njol.skript.SkriptEventHandler.check(SkriptEventHandler.java:150) ~[?:?]
    10. at ch.njol.skript.SkriptEventHandler$1.execute(SkriptEventHandler.java:114) ~[?:?]
    11. at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78) ~[patched_1.11.2.jar:git-Paper-1104]
    12. at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[patched_1.11.2.jar:git-Paper-1104]
    13. at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:517) ~[patched_1.11.2.jar:git-Paper-1104]
    14. at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:502) ~[patched_1.11.2.jar:git-Paper-1104]
    15. at net.minecraft.server.v1_11_R1.PlayerConnection.a(PlayerConnection.java:1898) ~[patched_1.11.2.jar:git-Paper-1104]
    16. at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:33) ~[patched_1.11.2.jar:git-Paper-1104]
    17. at net.minecraft.server.v1_11_R1.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.11.2.jar:git-Paper-1104]
    18. at net.minecraft.server.v1_11_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[patched_1.11.2.jar:git-Paper-1104]
    19. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_212]
    20. at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212]
    21. at net.minecraft.server.v1_11_R1.SystemUtils.a(SourceFile:46) [patched_1.11.2.jar:git-Paper-1104]
    22. at net.minecraft.server.v1_11_R1.MinecraftServer.D(MinecraftServer.java:839) [patched_1.11.2.jar:git-Paper-1104]
    23. at net.minecraft.server.v1_11_R1.DedicatedServer.D(DedicatedServer.java:403) [patched_1.11.2.jar:git-Paper-1104]
    24. at net.minecraft.server.v1_11_R1.MinecraftServer.C(MinecraftServer.java:763) [patched_1.11.2.jar:git-Paper-1104]
    25. at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:661) [patched_1.11.2.jar:git-Paper-1104]
    26. at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
    MY CODE:
    Code (Text):
    1. options:
    2.     cooldown_message: "&4&l>>> &cWait a few seconds!"
    3.  
    4. command /shop-armor-18 [<text>] [<player>]:
    5.     trigger:
    6.         if arg 1 is not set:
    7.             if {armorShop.cooldown::%player%} is set:
    8.                 send {@cooldown_message} to player
    9.                 stop
    10.             else:
    11.                 open chest with 1 row named "&aArmor shop" for player
    12.                 format gui slot 0 of player with iron chestplate named "&cKnight armor" to run function knightGui(player)
    13.                 set {armorShop.cooldown::%player%} to true
    14.                 wait 3 seconds
    15.                 delete {armorShop.cooldown::%player%}
    16.            
    17.  
    18. function knightGui(p: player):
    19.     open chest with 1 row named "&aArmor shop &2> Knight armor" for {_p}
    20.     format gui slot 0 of {_p} with iron helmet named "&aKnight helmet" with lore "&bPrice: &7$100,000" to run function knight(player, helmet)
    21.     format gui slot 1 of {_p} with iron chestplate named "&aKnight chestplate" with lore "&bPrice: &7$140,000" to run function knight(player, chestplate)
    22.     format gui slot 2 of {_p} with iron leggings named "&aKnight leggings" with lore "&bPrice: &7$120,000" to run function knight(player, leggings)
    23.     format gui slot 3 of {_p} with iron boots named "&aKnight boots" with lore "&bPrice: &7$80,000" to run function knight(player, boots)
    24.     format gui slot 8 of {_p} with bed named "&cGo back" to run console command "/sudo %{_p}% shop-armor-18"
    25.                
    26. function tee(ps: player):
    27.     send "tee" to {_ps}
    28.                
    29. function knight(p: Player, tems: String):
    30.     if {_tems} is "helmet":
    31.         if {_p}'s balance is greater than or equal to 100000:
    32.             subtract 100000 from {_p}'s balance
    33.             add a iron helmet named "&fKnight helmet" with lore "&8ID: knight_helmet" to {_p}'s inventory
    34.             send "&2&l>>> &aYou just purchased &2(1x Knight helmet)&a!" to {_p}
    35.         else:
    36.             send "&4&l>>> &cYou don't have enough money!" to {_p}
    37.             stop
    38.     else if {_tems} is "chestplate":  
    39.         if {_p}'s balance is greater than or equal to 140000:
    40.             subtract 140000 from {_p}'s balance
    41.             add a iron chestplate named "&fKnight chestplate" with lore "&8ID: knight_chestplate" to {_p}'s inventory
    42.             send "&2&l>>> &aYou just purchased &2(1x Knight chestplate)&a!" to {_p}
    43.         else:
    44.             send "&4&l>>> &cYou don't have enough money!" to {_p}
    45.             stop
    46.     else if {_tems} is "leggings":
    47.         if {_p}'s balance is greater than or equal to 120000:
    48.             subtract 120000 from {_p}'s balance
    49.             add a iron leggings named "&fKnight leggings" with lore "&8ID: knight_leggings" to {_p}'s inventory
    50.             send "&2&l>>> &aYou just purchased &2(1x Knight leggings)&a!" to {_p}
    51.         else:
    52.             send "&4&l>>> &cYou don't have enough money!" to {_p}
    53.             stop
    54.     else if {_tems} is "boots":
    55.         if {_p}'s balance is greater than or equal to 80000:
    56.             subtract 80000 from {_p}'s balance
    57.             add a iron boots named "&fKnight boots" with lore "&8ID: knight_boots" to {_p}'s inventory
    58.             send "&2&l>>> &aYou just purchased &2(1x Knight boots)&a!" to {_p}
    59.         else:
    60.             send "&4&l>>> &cYou don't have enough money!" to {_p}
    61.             stop
    62.            

    Anyone have the fixed one?
     
Loading...