Hello, I'm using the plugin below: https://github.com/solo5star/HotAirBalloon How is it possible to the entity to remove it if not rided for 2 minutes ? Could you give me advice to do the modification of the Source Code ? (I'm thinking to add a task, but don't know how to handle it (attach it) to the entity.) Thanks, Benda.
Jusy make a clear lagg plugin that will clear all entities that are not being ridden. Much more simple solution. If you want to do it the way you want though, you might want to take a look at some other plugins assigning time checks for specifics. Example: GoldenAppleCooldown, base off of that code. Apply a cooldown of 2 minutes to the entity every time someone stops riding it, and remove the cooldown when a player gets on it. Afterwards add code that will kill the entity upon cooldown running out.
I've take a look, it seems to use an array to store information about the player. How can i store my entity ? It seems to be created here, i don't see any way to have information about it, is there an unique ID when created ? https://github.com/solo5star/HotAir.../src/solo/hotairballoon/HotAirBalloon.php#L60
I've been able to found how have the ID, how to manage to remove it no matter what's happen ? (Server Crash, reboot, ...) Because ID are not always the same ? (I've seen it with slapper) If server reboot while an entity is not removed, it will stay forever on reboot ?