Sueta

Trident Despawn Control

1.0

Lets you extend the life of tridents longer than arrows

·Plugin

If you set the arrow-despawn-rate in spigot.yml, it affects tridents as well. Someone wanted tridents to last longer than arrows before they despawn, thus I made this as it sounded interesting to do.

Commands

All commands require tdc.admin

TDC STATUS
Shows the current number of loops, loop length and default despawn rate

TDC LOOPS #
Sets how many loops the system should delay despawning

TDC PERM
Toggles whether or not players need the tdc.enabled permission for their tridents to last longer

TDC RELOAD
Reloads config from disk

The way it works is when you start the plugin, it checks the arrow despawn rate and sets a loop length 20 ticks less than that. When you launch a trident, it loops the number of times specified. During each loop, it sets the trident's ticks lived to 1 (as though it was freshly thrown). When it hits the max number of loops, it just lets the trident expire naturally.

Spigot default is 1200 ticks arrow life (1 minute) so by default this plugin will loop three times, each loop waiting 59 seconds. You can use the /tdc loops command to adjust the number of loops. Setting it to one effectively disables the plugin, as it will match with the default spawn rate then. There isn't really an upper limit, well, other than Java's int limit heh.

Similar projects

Plugin →