elBukkit / PreciousStones

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

Movecraft block breaking inside fields issue. #99

Open jamesol1 opened 3 years ago

jamesol1 commented 3 years ago

https://www.youtube.com/watch?v=Vs_5Xhea2YA&ab_channel=John87

So one very niche issue i have is using movecraft (block based moving vehicles)... i have moving crafts that can deploy the ''dismantle platform'' as seen in the video which destroys a list of blocks using defined 'blade blocks' (which are stone slabs). Issue is players could quite easily drive their crafts into protected fields and then use the dismantle platform to destroy protected blocks.

I believe there is a Worldguard flag which can prevent movecraft vehicles moving inside a region. Is there a way i could add this into my preciousstones config? I could prevent signs being used with that region... that said players could still pilot the dismantle platforms from outside of that region field and the stoneslabs could break the protected blocks. Is there a flag that could disable block movement maybe? or blocks breaking from ANY means? Right now 'prevent-destroy: true' doesn't stop it.

prevent entry annoyingly doesn't fix it either because people can command that dismantleplatform standing outside the region and the thing can be moved inside while the player remains outside the region. can't imagine 'prevent-vehicle-enter' this works for movecraft block vehicles.

https://www.spigotmc.org/resources/worldguard-custom-flags.28357/ This plugin upon having movecraft installed comes with 'movecraft-move/pilot/rotate/sink' flags. If i could add a prevent movecraft move flag that would fix it!

Thanks.

jamesol1 commented 3 years ago

I’d be willing to pay someone to do this. Let me know if your interested

jamesol1 commented 3 years ago

@xtomyserrax Hi sorry for the ping. I'm planning on requesting paid work in a discord/maybe on a forum too for someone to perhaps make a sub plugin to make movecraft compatible with precious stones fields. It's really quite an essential addition for me in order for this plugin to work for my specific use.

I know customflags (link above) has movecraft flags load up if you have the plugin installed. Considering you did once dev for the plugin, do you know how someone would go about adding these custom WG flags to the fields?

xtomyserrax commented 3 years ago

Hey we actually have API methods so anyone can do what they want: https://github.com/marcelo-mason/PreciousStones/wiki/Developers-API

They can check which precious stones flags the field has and thats it. It all depends on your idea an the dev's proposal. If its a custom plugin for you I guess its easier because if he wants to make a PR here we would need to test if it works fine and also to check it doesnt break any other functionality.

PreciousStones only hooks with WorldGuard to prevent region overlaping (for example with a server spawn), it doesnt use WG flags at all.

jamesol1 commented 3 years ago

Ah damn i thought it used WG flags for the flags. Damn ok i'm not sure how easy it will be to do then. For my personal use all i'd need is for them to add an option which upon every field placed movecraft movement would be disabled. Is adding a custom WG flag like that possible? If it was to be integrated like you said i guess it would need to be a true or false option (as others might not want it). Is adding that possible do you think? I'll likely share this page with the dev looking to do it so any details to help them are welcome! Thanks again

xtomyserrax commented 3 years ago

Its up to how you guys want to do it. For example you can consider prevent-vehicle-enter a flag that could be related to what Movecraft does (if he creates a custom plugin for you). I mean, if he is going to make something custom he will be able to use whichever event he wants and also the flag. In my opinion and if I understood movecraft correctly, the most related one would be prevent-vehicle-enter

Flags are defined by PreciousStones, this are the ones the plugin actually has: https://github.com/marcelo-mason/PreciousStones/wiki/Flag-Reference

Of course this is just what Im thinking, there could be a lot more possibilities (ones better than others haha)

jamesol1 commented 3 years ago

One of the movecraft devs has fixed customWGflags. Aka movecraft-move (which would stop other vehicles from moving inside of the placed protection fields. (row 48): https://github.com/eirikh1996/Movecraft/blob/99bebe1ca129ced5782e99855271118443ccb9a8/modules/Movecraft/src/main/java/net/countercraft/movecraft/worldguard/WorldGuardCompatManager.java

If anyone knows how one could go about adding it to perhaps a prexisting field (vehicle enter) or making a new one, please let me know as i can see if any active dev is up for adding it (or making a custom plugin addition) for a fee.