elBukkit / PreciousStones

Self-service protection for Minecraft servers
http://dev.bukkit.org/server-mods/preciousstones/
10 stars 10 forks source link

not needed #77

Closed Pvprod34 closed 3 years ago

Pvprod34 commented 3 years ago

Could you add an option which upon placing the protection stone performs the action within in a given duration? So sort of like a spell cast time for the stones. Also if possible, a cooldown between when you can re-place it would be great.

This would stop people on my server from abusing it through placing it during a period of PVP involving tnt etc so block protection effects this. For example the stone may have a cast time or activation time of lets say one minute, and then a cooldown from when you can place it again or any other stone of 10 minutes.

EDIT: I'd need it to work for 1.12.2 though.

It would be amazing if you could add this, i don't believe it's currently in the plugin. Thanks

xtomyserrax commented 3 years ago

Hey, anyone is welcome to help adding new features!

But if this is ever added, it will be only for 1.16+ versions as we are not making updates compatible with older MC versions (if anyone wants to make this plugin multi version compatible I guess its free)

Pvprod34 commented 3 years ago

I would if i had coding/java knowledge.

My only hope i think is hooking some of the protection field placing event/s through a plugin like magicspells. Allowing me to making a 'spell' that can have a spellcast time/cooldown between uses for enacting the block protection field event. Is there an event API line specifically for this? I'd maybe need to disable ones ability to enable the protection block through placing it manually (not sure.) Basically only allowing the protection block place event to occur upon using actions set out in magicspells. That hook could add a lot of options. I'd need either one of your team or MS to do so, no idea how to do it myself. I'm guessing you perhaps aren't actively working on it, if you could help stear them with the event names needed to hook i guess that would be great. I did check this page: https://github.com/marcelo-mason/PreciousStones/wiki/Developers-API Do you know which event lines this would include, the lines on the page confuse me a bit.

xtomyserrax commented 3 years ago

Hey, the only event we actually have is FieldPreCreationEvent which is called before a Field is created (when a player tries to create one). This event can be cancelled

https://github.com/marcelo-mason/PreciousStones/wiki/Developers-API#api-events

If you want an example, CombatLogX uses this event in one of their expansions: https://github.com/SirBlobman/CombatLogX/blob/master/expansion/compatibility/PreciousStones/src/main/java/com/SirBlobman/combatlogx/expansion/compatibility/preciousstones/listener/ListenerFieldCreation.java