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

So I’ve worked with Bukkit plugins before, so the beginning part confuses me a little bit as it is not familiar, but the basic things from the first two lines of code is that it will return a result (ProcessResult, to be exact) which is the text displayed to the player upon execution of the command; it gets the source of the command, most likely of type Player or type Console, and the arguments of the command, everything beyond fg md <h,r> or foxguard modify <handler,region> ; it can throw exceptions when something is off with the command sent to this function; and it creates a basic array with the contents of the arguments in parse.args for easy use. After that, if no additional argument is given, it will return “Must specify a command!” to the user. Next, if the type is of group (so groups, group) it will go into the first if statement, which will immediately return “Must specify an operation!” if no more arguments are sent. It then goes into a switch statement, looking through each potential case of the second argument, the first of which is add. It will then try to return any bad values before it gets too far. So first, is there a third argument? If no, “Must specify a group name!” is returned. Is the third argument “default”? If yes, that is bad, so return “Default group already exists and its name is reserved!” It will then check a different function to check if the group name is valid (don’t know what would be an invalid group name) and if not, return “Not a valid group name!” Then it checks all existing groups, and if it already exists it will return “Group already exists with this name!” If it doesn’t, then it creates the group and looks through additional flags that can be set for the group: the “color” flag will set what color the group is in the handler, default is white; “displayname”, which I’m not quite sure what it does; and “index”, which specifies into which place in the hierarchy of roles the group gets placed.

…and etc. and so forth. It is past midnight where I am, and I have already spent 20 minutes deciphering and writing in plain English about 40 of over 400 lines of code. I would love to help work on this plugin as I would love to be able to specify game rules in certain regions so that keepInventory, fire spread, etc. could be enabled/disabled by region. If you want me to go through some more of the function I would be glad to sometime when I have more energy. I will tell you that I have no idea how the command parser works exactly, but I am a quick learner and can put in 20-40 hours a week depending on actual work and weekend commitments.

I was more looking for someone to be able to look at the code and gather a syntax skeleton of all the commands, their parameters and flags, and what they do.

Not so much interpret everything line by line…

/foxguard modify handler myhandlername flags default block change =false
/foxguard modify handler myhandlername flags default block place =deny
/foxguard modify handler myhandlername flags default block break =deny

Not a valid flag operation. Can’t protect regions with this

you forgot the “add”

/foxguard modify handler myhandlername flags default ADD block change =false (caps for emphasis)

My bad. You should also add the ADD in the getting started section :stuck_out_tongue:
All I did was copy paste the commands

Huh, I typoed.

Thanks for pointing that out.

No problem. Would help others like me

Would adding someone to a group allow them to build in the region? Members group by the way

If you configure the members group to do so, then yes.

Groups are completely arbitrary, you can create and delete them at will.

This means that no group is special. They all have to be configured to do things.

Where would one configure these groups?

If I understand you correctly.
/fg detail h handler name
click on the group members (this will add a command)
and add the flags at their discretion

My world name is PokeBattle Craft. It’s having spaces so I don’t know how I should input it

/fg detail h handler name

handlers don’t have a world, so you don’t need to enter it.

The world flag is used almost entirely for worldregions in a different world than you are.

Although, as future reference, if you MUST enter the world (FoxGuard will yell at you if it requires it) use:
–w:worldname.

If your world name has spaces, use --w:“world name”.

Although i highly suggest that YOU DO NOT HAVE SPACES IN WORLD NAMES.

FoxGuard might be able to handle it, but a lot of other plugins might not. Just a hint.

Can this be used to change biomes? Can I select a set area and change it into a biome of my choice? Unfortunately for me, the world that was created ended up not having a mesa biome. This can be a issue due to certain pixelmon only spawning in the mesa. (Also the mod that you use to change spawn locations doesn’t work…)

FoxGuard is a world protection plugin, not a world editing plugin.

I’m working on a world editing plugin, but it’s gonna take awhile.

Alright thanks. Sorry about the mixup.

Plugins edit world already exist. Wish: Spend more time with FG! It would be a shame if the project will further reduce the pace of development. :pizza:

I will write a world editing plugin if i want to write a world editing plugin.

It’s my time and I get to spend it however I want. :3

Now if you want to throw money at my face, that’s a different matter.

This is the key word :wink: The rest is up to you and only you.