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

Just saying

You just need to learn flags right now. I couldn’t possibly provide every desired configuration in a series of templates.

Awesome plugin, love it.

Learned how to use it in a few minutes, your quick starting guide is well explained.

Nice work here, thanks !

Is there a way I can protect the whole world from being destroyed by players? And only allow certain blocks to be destroyed with a list of some sort? I had to retire my main server for a while since the temporary laptop I’m on can’t handle it, and I’m setting up a small roleplaying server. XD Also if there’s a way to prevent certain mobs from spawning, that’d be great.

That isn’t possible with FoxGuard (at least, not yet). However, the plugin ProtectionPerms will probably do what you want. There isn’t any fine-grained mob spawning control in FoxGuard either, and I’m scratching to think of a Sponge plugin that can handle that intelligently. I’m not sure what the capabilities are of @TrenTech’s recent MobLimit plugin.

Protecting the whole world is easy however - just make a handler (basic or group) that prevents block place and block break for the default group, and link it to the world global region. Check the FoxGuard Wiki for more info.

Been bashing my head against this one for a bit, wiki isn’t helping, nor is google…
So here’s the setup:
I have a permission handler called permguest with one entry: foxguard.handler.guest.<allow/deny/pass>
I have this handler linked to _sglobal
I’ve given players with the rank of guest the permission foxguard.handler.guest.deny so that they can’t place or break blocks.
I’ve given all ranks above guest the foxguard.handler.guest.allow permission so that they can go along their business.

Everything works fine except for one thing: players don’t take damage from mobs. I know the problem is with my permguest handler because when I unlink it from _sglobal mob attacks do damage again. How do I make it so mob attacks will work? I’ve tried adding entries to the handler, but I either get “not a valid flag” or “Must specify a permission string” when attempting various things.
Please help!

Type /fg detail handler guest and screenshot me the result.

As requested:

I would bet the solution’s simple enough, but I have no clue man…

permission handlers require you to add entries. It looks like you have a blank permission handler.

I suggest using the group handler instead.

Hmm, yeah I couldn’t really figure out how they worked fumbling around, but that makes sense.

So for a group handler I would add all the flags needed to a group, then use group modify <groupname> --p:<new.permission.string> to create a permission node.
Once I add that node to a Luckperms rank, any player with that node would be added to the group it refers to, and therefore be affected by those flags, correct?
Sounds simple enough, I’ll try it in a little while and report back

Yep pretty much. FoxGuard also pre-generates permission nodes for you if you can’t be bothered making your own.

2 Likes

Alrighty, made a group handler and added flags to disable block place, change, modify, etc. Linked that permission to my guest group as true. Next I added another group to the handler with no flags in it, and linked that groups permission to all other server ranks. I set my own rank to guest and was unable to place blocks, hoorah! I then set myself back to admin and was able to place / break blocks, etc. with the added feature of now being able to take damage from mobs again!

@gravityfox, you’re a wizard!

I have a Spawn…
In this Spawn i want a region and handler called “Spawn”
But i can’t.
If i type /fg here it say that here there are this regions:
_sglobal
_wglobal
spawn

How can i remove _wglobal from Spawn region?
I have different flags from _wglobal and Spawn

You can’t, and it doesn’t make sense to do so. The wglobal and sglobal regions are made by default, to cover entire worlds or the entire server, respectively. If you don’t want them to do anything, just don’t link them to any handlers.
What you need to do is first create your own region, which you can call Spawn, then create a handler to do what you want, and finally link the two together. It’s irrelevant how many regions /fg here shows you, as the only ones that matter are the ones that have handlers attached. Alternatively, if you want the flags from your region to override those from another handler, just raise the priority of your handler. HTH

1 Like

I created a region, handler and linked it. After that I did /fg save, but after a restart it unlinks the region from it’s handler.

Okay now i’m worried, because you’re not the first person to report this.

I need logs, both before and after the restart.

What operating system? Version of the sponge? Version FoxGuard? I had a similar behavior. In some cases, this was preceded by an incorrect shutdown of the server (power outage). In others, a slow disk subsystem on the computer (for example, in parallel with the operation of the server, running some intensive task). This is not always the case. It is difficult to reproduce.

Is redstone supported for protected regions? I’ve been having issues and I recall reading earlier in the thread about redstone circuits requiring block place permission to operate or something…

The problem is that simple stuff like a button attached directly to a dispenser / command block works, but more complex things like pistons and actual circuits tend to glitch out or not work at all. I suspect this is because FoxGuard isn’t allowing block changes (e.g. piston extending, redstone dust changing states).
.

Have you tried allowing block modify for the default group (on top of the usual denied block break and block place flags)? It worked for me last time, as well as letting visitors use doors. Admittedly, the redstone testing was a bit limited. It still may not work with pistons.
EDIT: I’m tired, I may be hazy on the flags, Check the wiki.