Delete Splash Potions on floor

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

ZxrPanda

Member
Aug 6, 2023
2
0
1
I have a potions kit which consists of 3 speed 2 potions, 2 strength potions, and, 31 Splash potions of healing which equates to a full inventory. My problem is that whenever I use the kit with other things in my inventory, some potions drop on the floor which could cause lag. I'm using essentials kits with a kit sign. Yes, I have tried turning the essentials option 'drop-items-if-full' off but then It doesn't let me claim the kit at all. I need a script that will delete all dropped splash potions if possible. the problem with this script is that it only clears the ones dropped by the player:

Code:
on drop of any splash potion:
 while event-dropped item is not on the ground:
 wait a tick
  clear event-dropped item


TLDR: Script that deletes all splash potions that are on the floor.
 
You could code like a custom kill all drops Skript which could look something like:

Code:
every 100 minutes:
   broadcast "Removing all drops in 10 seconds!"
   wait 10 seconds
   kill all drops
 
You could code like a custom kill all drops Skript which could look something like:

Code:
every 100 minutes:
   broadcast "Removing all drops in 10 seconds!"
   wait 10 seconds
   kill all drops
I appreciate the response although I already have a clear lag plugin, preferably I want it to target only splash potions and I want it to happen as soon as they are dropped
 
I appreciate the response although I already have a clear lag plugin, preferably I want it to target only splash potions and I want it to happen as soon as they are dropped
No problem. I did a little bit of research to see if I could find anything. Maybe you could try cancelling the event when a player drops/attempts to drop a splash potion then just remove it from their inventory? I'm not sure if EssentialsKits force drops an item when your inventory is full and such so it may not work but it's worth a shot to test.