Skript autocompact not working

  • 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!

  • 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.

Yoxie

New Member
May 8, 2022
5
0
1
22
Hey, first post here, I use a 1.18.2 revivenode server with 4gb ram and every time I run this command nothing happens?

Code:
options:
 {autocompact::%player%} = 0
 
command /autocompact:
 trigger:
  if {ACaccess::%player%} = true:
   if {autocompact::%player%} = 0:
    set {autocompact::%player%} to 1
    send "&bAutocompact enabled" to player
    send "Rip server" to player
    set {loop} to 1
    while {loop} = 1:
     if player has 9 lapis:
      remove 9 lapis from the player
      give the player 1 lapis block
     if player has 9 raw iron:
      remove 9 raw iron from the player
      give the player 1 raw iron block
     if player has 9 redstone:
      remove 9 redstone from the player
      give the player 1 redstone block
     else:
      if {autocompact::%player%} = 1:
       set {autocompact::%player%} to 0
       send "&bAutocompact disabled" to player
     wait 1 second

  else:
   send "&4You don't have access to that command" to player
  
command /repairall:
 trigger:
  send "&bRepairing your items..." to player
  loop all items in player's inventory:
   if loop-item's durability < loop-item's max durability:
    repair loop-item

I've checked my plugins and none of them are interfering, all my other skripts are working fine. Could I get any help?
 
Last edited:
Code:
options:
 {autocompact::%player%} = 0
This is the error. You are setting it in the options where no players are defined. If you want it to be disabled when a player joins, you need to set that variable to 0 using the "on join" event.
Also, there is indentation issues on your skript starting from line 22 to 29. You need to make that section at the same place as the "if {autocompact::%player%} = 0" statement.
 
I've applied all these, hopefully it works now, thank you!
[doublepost=1652003042,1652002395][/doublepost]
Code:
options:
 {autocompact::%player%} = 0
This is the error. You are setting it in the options where no players are defined. If you want it to be disabled when a player joins, you need to set that variable to 0 using the "on join" event.
Also, there is indentation issues on your skript starting from line 22 to 29. You need to make that section at the same place as the "if {autocompact::%player%} = 0" statement.


Hey, after changing all of these it still doesn't work, do you know what could be going on?
Code:
on first join:
 set {autocompact::%player%} to 0
command /autocompact:
 trigger:
  if {ACaccess::%player%} = true:
   if {autocompact::%player%} = 0:
    set {autocompact::%player%} to 1
    send "&bAutocompact enabled" to player
    send "Rip server" to player
    set {loop} to 1
    while {loop} = 1:
     if player has 9 lapis:
      remove 9 lapis from the player
      give the player 1 lapis block
     if player has 9 raw iron:
      remove 9 raw iron from the player
      give the player 1 raw iron block
     if player has 9 redstone:
      remove 9 redstone from the player
      give the player 1 redstone block
   else:
    if {autocompact::%player%} = 1:
     set {autocompact::%player%} to 0
     send "&bAutocompact disabled" to player
     wait 1 second
  else:
   send "&4You don't have access to that command" to player
[doublepost=1652003339][/doublepost]I got it now thank you, you really helped actually and I'm surprised at how quickly you responded! However, it does now crash after a few seconds, do you know why?
 
Here's the console logs if that helps:
[10:54:35 INFO]: Yoxie issued server command: /autocompact
[10:54:46 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-308 (MC: 1.18.2) ---
[10:54:46 ERROR]: The server has not responded for 10 seconds! Creating thread dump
[10:54:46 ERROR]: ------------------------------
[10:54:46 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[10:54:46 ERROR]: Ticking entity: minecraft:emoji_stuck_out_tongue:layer, entity class: net.minecraft.server.level.EntityPlayer
[10:54:46 ERROR]: Entity status: removed: false, valid: true, alive: true, is passenger: false
[10:54:46 ERROR]: Entity UUID: 7d20fd38-4a3a-43d7-9091-4228370a765a
[10:54:46 ERROR]: Position: world: 'cleanroom' at location (80.6961968045764, 3.0, 36.43908716621225)
[10:54:46 ERROR]: Velocity: (0.0, -0.0784000015258789, 0.0) (in blocks per tick)
[10:54:46 ERROR]: Entity AABB: AABB[80.39619679265547, 3.0, 36.139087154291325] -> [80.99619681649733, 4.799999952316284, 36.73908717813318]
[10:54:46 ERROR]: Total packets processed on the main thread for all players: 629
[10:54:46 ERROR]: ------------------------------
[10:54:46 ERROR]: Current Thread: Server thread
[10:54:46 ERROR]: PID: 23 | Suspended: false | Native: false | State: RUNNABLE
[10:54:46 ERROR]: Stack:
[10:54:46 ERROR]: org.bukkit.craftbukkit.v1_18_R2.block.data.CraftBlockData.newData(CraftBlockData.java:520)
[10:54:46 ERROR]: org.bukkit.craftbukkit.v1_18_R2.CraftServer.createBlockData(CraftServer.java:2524)
[10:54:46 ERROR]: org.bukkit.craftbukkit.v1_18_R2.CraftServer.createBlockData(CraftServer.java:2499)
[10:54:46 ERROR]: org.bukkit.Bukkit.createBlockData(Bukkit.java:2062)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.bukkitutil.block.NewBlockCompat.getBlockValues(NewBlockCompat.java:311)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.aliases.ItemData.<init>(ItemData.java:220)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.aliases.ItemType.<init>(ItemType.java:183)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.aliases.ItemType.isContainedIn(ItemType.java:658)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.lambda$check$0(CondContains.java:124)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains$$Lambda$9332/0x00000008029931a8.check(Unknown Source)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:170)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleLiteral.check(SimpleLiteral.java:177)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.lambda$check$1(CondContains.java:122)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains$$Lambda$9331/0x0000000802992f80.check(Unknown Source)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:170)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.check(CondContains.java:119)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.sections.SecConditional.walk(SecConditional.java:165)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:285)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:250)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand$$Lambda$9244/0x0000000802991888.run(Unknown Source)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:255)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.command.Commands.handleCommand(Commands.java:258)
[10:54:46 ERROR]: Skript.jar//ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:175)
[10:54:46 ERROR]: [email protected]/java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(DirectMethodHandle$Holder)
[10:54:46 ERROR]: [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000801e0c800.invoke(LambdaForm$MH)
[10:54:46 ERROR]: [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000801e0c000.invoke_MT(LambdaForm$MH)
[10:54:46 ERROR]: com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37)
[10:54:46 ERROR]: co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[10:54:46 ERROR]: org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[10:54:46 ERROR]: org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:669)
[10:54:46 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2298)
[10:54:46 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2117)
[10:54:46 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098)
[10:54:46 ERROR]: net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46)
[10:54:46 ERROR]: net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6)
[10:54:46 ERROR]: net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51)
[10:54:46 ERROR]: net.minecraft.network.protocol.PlayerConnectionUtils$$Lambda$8873/0x0000000802a212f8.run(Unknown Source)
[10:54:46 ERROR]: net.minecraft.server.TickTask.run(TickTask.java:18)
[10:54:46 ERROR]: net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153)
[10:54:46 ERROR]: net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188)
[10:54:46 ERROR]: net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369)
[10:54:46 ERROR]: net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[10:54:46 ERROR]: net.minecraft.server.MinecraftServer$$Lambda$4104/0x00000008014711b8.run(Unknown Source)
[10:54:46 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:833)
[10:54:46 ERROR]: ------------------------------
[10:54:46 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[10:54:46 ERROR]: ------------------------------
[10:54:51 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-308 (MC: 1.18.2) ---
[10:54:51 ERROR]: The server has not responded for 15 seconds! Creating thread dump
[10:54:51 ERROR]: ------------------------------
[10:54:51 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[10:54:51 ERROR]: Ticking entity: minecraft:emoji_stuck_out_tongue:layer, entity class: net.minecraft.server.level.EntityPlayer
[10:54:51 ERROR]: Entity status: removed: false, valid: true, alive: true, is passenger: false
[10:54:51 ERROR]: Entity UUID: 7d20fd38-4a3a-43d7-9091-4228370a765a
[10:54:51 ERROR]: Position: world: 'cleanroom' at location (80.6961968045764, 3.0, 36.43908716621225)
[10:54:51 ERROR]: Velocity: (0.0, -0.0784000015258789, 0.0) (in blocks per tick)
[10:54:51 ERROR]: Entity AABB: AABB[80.39619679265547, 3.0, 36.139087154291325] -> [80.99619681649733, 4.799999952316284, 36.73908717813318]
[10:54:51 ERROR]: Total packets processed on the main thread for all players: 629
[10:54:51 ERROR]: ------------------------------
[10:54:51 ERROR]: Current Thread: Server thread
[10:54:51 ERROR]: PID: 23 | Suspended: false | Native: false | State: RUNNABLE
[10:54:51 ERROR]: Stack:
[10:54:51 ERROR]: [email protected]/java.util.Collections$UnmodifiableCollection$1.<init>(Collections.java:1051)
[10:54:51 ERROR]: [email protected]/java.util.Collections$UnmodifiableCollection.iterator(Collections.java:1050)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.aliases.ItemType.isSimilar(ItemType.java:932)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.aliases.ItemType.isContainedIn(ItemType.java:658)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.lambda$check$0(CondContains.java:124)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains$$Lambda$9332/0x00000008029931a8.check(Unknown Source)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:170)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleLiteral.check(SimpleLiteral.java:177)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.lambda$check$1(CondContains.java:122)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains$$Lambda$9331/0x0000000802992f80.check(Unknown Source)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:170)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.check(CondContains.java:119)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.sections.SecConditional.walk(SecConditional.java:165)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:285)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:250)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand$$Lambda$9244/0x0000000802991888.run(Unknown Source)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:255)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.command.Commands.handleCommand(Commands.java:258)
[10:54:51 ERROR]: Skript.jar//ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:175)
[10:54:51 ERROR]: [email protected]/java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(DirectMethodHandle$Holder)
[10:54:51 ERROR]: [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000801e0c800.invoke(LambdaForm$MH)
[10:54:51 ERROR]: [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000801e0c000.invoke_MT(LambdaForm$MH)
[10:54:51 ERROR]: com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37)
[10:54:51 ERROR]: co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[10:54:51 ERROR]: org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[10:54:51 ERROR]: org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:669)
[10:54:51 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2298)
[10:54:51 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2117)
[10:54:51 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098)
[10:54:51 ERROR]: net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46)
[10:54:51 ERROR]: net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6)
[10:54:51 ERROR]: net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51)
[10:54:51 ERROR]: net.minecraft.network.protocol.PlayerConnectionUtils$$Lambda$8873/0x0000000802a212f8.run(Unknown Source)
[10:54:51 ERROR]: net.minecraft.server.TickTask.run(TickTask.java:18)
[10:54:51 ERROR]: net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153)
[10:54:51 ERROR]: net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188)
[10:54:51 ERROR]: net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369)
[10:54:51 ERROR]: net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[10:54:51 ERROR]: net.minecraft.server.MinecraftServer$$Lambda$4104/0x00000008014711b8.run(Unknown Source)
[10:54:51 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:833)
[10:54:51 ERROR]: ------------------------------
[10:54:51 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[10:54:51 ERROR]: ------------------------------
[10:54:56 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH - git-Paper-308 (MC: 1.18.2) ---
[10:54:56 ERROR]: The server has not responded for 20 seconds! Creating thread dump
[10:54:56 ERROR]: ------------------------------
[10:54:56 ERROR]: Server thread dump (Look for plugins here before reporting to Paper!):
[10:54:56 ERROR]: Ticking entity: minecraft:emoji_stuck_out_tongue:layer, entity class: net.minecraft.server.level.EntityPlayer
[10:54:56 ERROR]: Entity status: removed: false, valid: true, alive: true, is passenger: false
[10:54:56 ERROR]: Entity UUID: 7d20fd38-4a3a-43d7-9091-4228370a765a
[10:54:56 ERROR]: Position: world: 'cleanroom' at location (80.6961968045764, 3.0, 36.43908716621225)
[10:54:56 ERROR]: Velocity: (0.0, -0.0784000015258789, 0.0) (in blocks per tick)
[10:54:56 ERROR]: Entity AABB: AABB[80.39619679265547, 3.0, 36.139087154291325] -> [80.99619681649733, 4.799999952316284, 36.73908717813318]
[10:54:56 ERROR]: Total packets processed on the main thread for all players: 629
[10:54:56 ERROR]: ------------------------------
[10:54:56 ERROR]: Current Thread: Server thread
[10:54:56 ERROR]: PID: 23 | Suspended: false | Native: false | State: RUNNABLE
[10:54:56 ERROR]: Stack:
[10:54:56 ERROR]: org.bukkit.craftbukkit.v1_18_R2.inventory.CraftInventory.getSize(CraftInventory.java:44)
[10:54:56 ERROR]: org.bukkit.craftbukkit.v1_18_R2.inventory.InventoryIterator.hasNext(InventoryIterator.java:24)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.aliases.ItemType.isContainedIn(ItemType.java:657)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.lambda$check$0(CondContains.java:124)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains$$Lambda$9332/0x00000008029931a8.check(Unknown Source)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:170)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleLiteral.check(SimpleLiteral.java:177)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.lambda$check$1(CondContains.java:122)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains$$Lambda$9331/0x0000000802992f80.check(Unknown Source)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.lang.util.SimpleExpression.check(SimpleExpression.java:170)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.conditions.CondContains.check(CondContains.java:119)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.sections.SecConditional.walk(SecConditional.java:165)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.lang.Trigger.execute(Trigger.java:56)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.execute2(ScriptCommand.java:285)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.lambda$execute$0(ScriptCommand.java:250)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand$$Lambda$9244/0x0000000802991888.run(Unknown Source)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.command.ScriptCommand.execute(ScriptCommand.java:255)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.command.Commands.handleCommand(Commands.java:258)
[10:54:56 ERROR]: Skript.jar//ch.njol.skript.command.Commands$1.onPlayerCommand(Commands.java:175)
[10:54:56 ERROR]: [email protected]/java.lang.invoke.DirectMethodHandle$Holder.invokeVirtual(DirectMethodHandle$Holder)
[10:54:56 ERROR]: [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000801e0c800.invoke(LambdaForm$MH)
[10:54:56 ERROR]: [email protected]/java.lang.invoke.LambdaForm$MH/0x0000000801e0c000.invoke_MT(LambdaForm$MH)
[10:54:56 ERROR]: com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37)
[10:54:56 ERROR]: co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[10:54:56 ERROR]: org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[10:54:56 ERROR]: org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:669)
[10:54:56 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2298)
[10:54:56 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2117)
[10:54:56 ERROR]: net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2098)
[10:54:56 ERROR]: net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46)
[10:54:56 ERROR]: net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6)
[10:54:56 ERROR]: net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51)
[10:54:56 ERROR]: net.minecraft.network.protocol.PlayerConnectionUtils$$Lambda$8873/0x0000000802a212f8.run(Unknown Source)
[10:54:56 ERROR]: net.minecraft.server.TickTask.run(TickTask.java:18)
[10:54:56 ERROR]: net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153)
[10:54:56 ERROR]: net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1399)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188)
[10:54:56 ERROR]: net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1376)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1369)
[10:54:56 ERROR]: net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1347)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1229)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:315)
[10:54:56 ERROR]: net.minecraft.server.MinecraftServer$$Lambda$4104/0x00000008014711b8.run(Unknown Source)
[10:54:56 ERROR]: [email protected]/java.lang.Thread.run(Thread.java:833)
[10:54:56 ERROR]: ------------------------------
[10:54:56 ERROR]: --- DO NOT REPORT THIS TO PAPER - THIS IS NOT A BUG OR A CRASH ---
[10:54:56 ERROR]: ------------------------------
 
It's because you have a while statement that is always true, so it is making an infinite loop, which crashes your server. You have set the variable {loop} to 1 just before the while loop, and inside the loop you never change the value. You need to include a line somewhere inside of the loop so that it isn't always true.
 
It's because you have a while statement that is always true, so it is making an infinite loop, which crashes your server. You have set the variable {loop} to 1 just before the while loop, and inside the loop you never change the value. You need to include a line somewhere inside of the loop so that it isn't always true.
Would it work if i set it to false, waited 1 second then set it to true again?
 
yes that would work as well, but I suggest putting that line at the very end of the while loop so that all of the lines inside of the loop run first, and then you disable it
 
Honestly speaking, you could remove the loop completely since you are only looking to run that once. It would make the code simpler and have less lag
 
Status
Not open for further replies.