i have been modifying this Infuse SMP plugin made by Spork3r to make it compatible with 1.21.4, but im currently very stumped on this one problem, everytime i drink a potion its supposed to remove the glass bottle immediately, but for some odd reason it always leaves one single bottle in my inventory. So for example: when i drink the first potion, the empty bottle doesnt get removed, but when i drink the 2nd one, it removes the empty bottle, although it always leaves one bottle.
on drink:
if lore of event-item contains "&9Primary Effect":
if player's gamemode is not creative:
remove 2 glass bottle from player's inventory
else:
remove 2 of event-item from player's inventory
else if lore of event-item contains "&9Support Effect":
if player's gamemode is not creative:
remove 2 glass bottle from player's inventory
else:
remove 2 of event-item from player's inventory
I've tried increasing the amount of glass bottles removed but for some reason it always leaves one in my inventory, this problem is really irritating, please help!
P.S, there is no error code or whatsoever in my servers console
on drink:
if lore of event-item contains "&9Primary Effect":
if player's gamemode is not creative:
remove 2 glass bottle from player's inventory
else:
remove 2 of event-item from player's inventory
else if lore of event-item contains "&9Support Effect":
if player's gamemode is not creative:
remove 2 glass bottle from player's inventory
else:
remove 2 of event-item from player's inventory
I've tried increasing the amount of glass bottles removed but for some reason it always leaves one in my inventory, this problem is really irritating, please help!
P.S, there is no error code or whatsoever in my servers console