[API 6.x/7.x] FoxGuard - The flexible world protection solution

That sounds about right, I just can’t wait for the flagset Docs so I can get going with the plugin.

They are starting to become a thing. Check the Github wiki:

1 Like

Those are looking amazing plus since Essentialcmds has been updating his /blockinfo and /entityinfo to actually give th entity ID’s for mods such as Pixelmon which I currently use. Because I’ll need to make sure the ShopKeeper Entities can be intractable inside a region. Would those Entity ID’s be the same code I use in the Flagsets?

Right now the interaction code doesn’t work. I am literally writing it as we speak. I doubt that I will add ID specific interaction filters any time soon. If I do, it will be a specialized Handler.

It would probably be a good thing for the ID specific interactions for mods that use NPC’s so you can specify which ones they can use where or which group can use a specific NPC in a certain Region. But keep it coming and your doing a great job so far :slight_smile: Can’t wait to see how far you get this plugin

Bit of a feature reveal. I will be adding a new category of object called a “Controller” which allows more fine tuned control of things like that. I’m probably going to end up just adding an specialized Controller that can analyze entity IDs.

A special type of Flagset handler for it? That does sound like it would simplify what you need to do a bit more. Have a separate Flagset handler for things like that >.< I’m a very very beginner Dev that’s attempting to learn but not getting very far. So I stick to the server side part of it and tear into configs and study to find out what’s causing an error and where it’s causing the error at xD

For a start I’ve ditched the term “FlagSet” because it’s restrictive and misleading. I’ve since replaced it with “Handler” for it to be less confusing with some of the upcoming features.

A Controller will be a special kind of Handler that can be linked with other Controllers and Handlers.

1 Like

Alright that makes sense, I’m used to flags from those old Bukkit plugins but handlers are an easy term to get used to. A Controller would be the Specific Handler you can create like Simple and Permission correct?

Kinda. Controllers don’t work out of the box for the most part, unlike handlers. They need to be linked to other handlers in specific ways to make them work properly. There will be many kinds of Controllers, each with their unique properties. But in general, they are designed to sort and filter events and then relay them to other Handlers or Controllers.

Also, regarding your original question, i’m sure you can simply make a separate region for JUST your ShopKeeper NPCs and use a different Handler for it.

Alright that’s starting to make sense, thanks for explaining it to me. Now, why would I need to create a separate region just for ShopKeepers if the Handler can just be linked to the spawn region? Because I would still need to use spawns Handlers for blocking the event’s like BlockPlace and BlockInteract?

Here is where priorities come into play. You can multiple handlers with differing priorities.

This is how your setup might look:

Region “spawn” -> Handler “spawn” (Priority 0)

Region “shop” -> Handler “shop” (Priority 5)

Where “->” represents a link.

The handler (presumably simple) for the shop would have all the same flags set as the spawn one, except the “entityinteract” flag is set to “allow”. Because the “shop” handler has higher priority, when they are in the “shop” region, it will allow them to interact with entities despite also being in the spawn region (and thus under the restrictions of the “spawn” handler), which doesn’t allow the action. It’s perfectly acceptable to have region-handler pairs that aren’t linked to anything else. They will then behave just like WorldGuard regions do.

1 Like

Ahhh ok that makes perfect sense I overlooked the Priorities, makes perfect sense why you would create two regions now >.<

to set priorities on handlers, you can:

Add them to your state buffer first and then run /foxguard handlers priority <number>

OR

Just run /foxguard handlers priority <number> [handler names]...

1 Like

Yeah I’m still working on getting used to the state Buffer, Amazing idea but just a little overwhelming at first using it and not messing up

/foxguard flush is your best friend.

1 Like

^ I can definitely agree with that one! I’m still for adding a wand for position’s :wink:

if you have an idea, go make an issue for it on the github page.

1 Like

Question’s here and idea’s over there? You told me on the issue’s area to message on here instead…

Yeah, the issues page is for feature requests, bugs, suggestions, and other things that would be resolved via a code change. Questions are resolved with words, not code, which is why they are better on forums. xD

1 Like