Skript Version: Skript 2.6-alpha1
Skript Author: blab2bruh
Minecraft Version: 1.17.1
Hi, I was making a skript that should block player's inventory except some slots. It works well, but when i try to pick an item from inventory, that item disappears.
Full Code:
Console Errors: no
Addons using (including versions):
Skirt 2.0.0, SkQuery 4.1.5, SkBee 1.15.0, SkJade 1.4.2, Skream 2.1
Troubleshooting: This skript works as intended, but when I pick item from inventory, it vanishes completely
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? None
Skript Author: blab2bruh
Minecraft Version: 1.17.1
Hi, I was making a skript that should block player's inventory except some slots. It works well, but when i try to pick an item from inventory, that item disappears.
Full Code:
Code:
every 0.1 second in "world":
loop all players:
if loop-player does not have permission "op.op":
baninv(loop-player, 4, 9)
function baninv(player: player, slots: number, upslots: number):
#hotbar slots
loop 9 times:
if {_slots} < loop-value:
if slot loop-value -1 of {_player} != air or barrier:
drop slot loop-value -1 of {_player} at {_player}
set slot loop-value -1 of {_player} to 1 of barrier named "&cClosed"
#inentory slots
loop 27 times:
if {_upslots} < loop-value:
if slot loop-value +8 of {_player} != air or barrier:
drop slot loop-value +8 of {_player} at {_player}
set slot loop-value +8 of {_player} to 1 of barrier named "&cClosed"
Addons using (including versions):
Skirt 2.0.0, SkQuery 4.1.5, SkBee 1.15.0, SkJade 1.4.2, Skream 2.1
Troubleshooting: This skript works as intended, but when I pick item from inventory, it vanishes completely
Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
What other methods have you tried to fix it? None