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


#1

FoxGuard - Flexible World Protection

Build Status Github All Releases


What is it?

FoxGuard is a plugin to act as general world protection. While it takes inspiration from sk89q’s WorldGuard (I practically worship him and his projects), It is written completely from scratch without any reference. Feel free to confirm that for yourself. The large defining difference is that FoxGuard separates regions, which define areas, from handlers which provide the actual control for a protected zone. To make them work, one must create a region to enclose an area, create a handler for that region, and then link the regions and handlers together.

Why so complicated?

This plugin is meant to be flexible, allowing varying complexities for both regions and handlers. When developing this plugin I was dissatisfied with how restrictive many world protection plugins were with the shapes of their protection areas (i.e. only cuboids allowed). I was also dissatisfied with how when specifying rules for regions, sometimes they would be much too complicated for the task, and other times much too simple. By allowing users to choose the appropriate Region and Handler types, this plugin can solve both extremely complex and really simple tasks, depending on what is needed.

Features

Current:

The current feature set is limited as most of the code I have written thus far has been backend code. (SQL, commands, etc.)

  • Protect Rectangular and cuboid areas.
  • Set build height limits.
  • Control movement in and out of areas.
  • Stop PVP
  • Prevent specific players from building according to a clean flag and handler structure.
  • Can make use of permissions plugins like PEX for easy build permission management.
  • Extensive and robust command interface. It’s very tolerant of bad formatting, such as extra spaces. It also has a powerful tab completion engine.
  • Point and click interface through clickable text output.
  • All commands can be run from the console.
  • Saves all objects in their own folders for easy navigation, with many configs in human editable format.
  • Blocks indirect events as well. (Such as mob spawns.)

Upcoming

This list is only partial and contains only the major features that WILL be a part of a release. Feel free to toss suggestions at me. Information on that below.

  • Importing object files.
  • More commands. (Including presets to jump-start use.)
  • More Region shapes
  • More Handler types.
  • Finer handling for passive events like fire tick, mob griefing, snow, etc.
  • Moderator reporting for specific configurable events. (Such as someone lighting tnt.)
  • Lot’s of bugfixes.

Links (Downloads)


PLUGIN MAY BREAK IN BETWEEN VERSIONS AS IT IS BEING DEVELOPED!!!
I APOLOGIZE IN ADVANCE IF FOXGUARD OBJECTS DISAPPEAR BETWEEN PLUGIN UPDATES.

Wiki can be found at https://github.com/FoxDenStudio/FoxGuard-Sponge/wiki

Code can be found at https://github.com/FoxDenStudio/FoxGuard-Sponge

Releases can be found at https://github.com/FoxDenStudio/FoxGuard-Sponge/releases
These are plugin builds that are reasonably stable. At least more so than the others. The jar files just go directly into the mods folder. Releases marked with “api5” are built against SpongeAPI 5.x. These releases also work with SpongeAPI 6.x.

FoxGuard requires FoxCore. Downloads can be found at https://github.com/FoxDenStudio/FoxCore-Sponge/releases

If you are installing on a server, please grab the -server.jar. If you are installing the CUI on a client, please grab the -client.jar. If you also want the plugin on the client, please install SpongeForge.

PLEASE LEAVE THE UNLABLED JAR AND -SOURCES.JAR ALONE, THEY ARE FOR DEVELOPERS.

Thank you.

Video

I made a video demonstrating how to use this plugin. See me flail about:

Interact With Me

You can find me on Discord and occasionally IRC.

Discord link: https://discord.gg/yZPEeS6

Note: I am no longer actively on IRC, due to Discord far surpassing it in capabilities, but mostly because I don’t have a bouncer to stay connected. Meanwhile on Discord I get push notifications and can use my phone and stuff.

IP: irc.esper.net
Channel: #foxden

Esper WebChat Here

Quickstart

Here is a quick way to make a rectangular protected region. You need to be a player with correct permissions to do this. (It isn’t the only method btw.)

  1. Move to the first corner of the region and type /foxguard position.
  2. Repeat for the second.
  3. Type /foxguard create worldregion myregionname rectangular. This defines the area you are protecting. You can replace “myregionname” with your own name.
  4. Type /foxguard create handler myhandlername basic easy. This makes a new set of protection rules that can be used for any region. Naming is the same.
  5. Type /foxguard modify handler myhandlername flags default add block change =false. This prevents outside players from performing block actions such as breaking and placing blocks.
  6. Finally, type /foxguard link myregionname myhandlername. This links the two together so that the area defined by the region is now under the rules of the handler.

The full Quickstart can be found at https://github.com/FoxDenStudio/FoxGuard-Sponge/wiki/Quickstart
It’s much more detailed and should help familiarize you with more of the commands.

Developers

FoxCore and FoxGuard both offer functionality that may be useful to other plugins, such as command parsing and selecting things, and wands, and a bunch of other stuff.

I have a maven repo now, so you can access it if you want to use my plugins as dependencies:

VERSION can be one of two formats:

  • A release build - A fully qualified version for a specific release. They usually are in the format version-suffix-build. Eg. 0.20.0-api5-347
  • A snapshot build - The branch name of the build followed by -SNAPSHOT. For example api5-SNAPSHOT

Maven

Repository:

<repository>
    <id>FoxDenStudio</id>
    <url>http://repo.foxdenstudio.net/repository/maven-public</url>
</repository>

FoxCore:

<dependency>
    <groupId>net.foxdenstudio.sponge</groupId>
    <artifactId>foxcore</artifactId>
    <version>VERSION</version>
    <scope>compile</scope>
</dependency>

FoxGuard:

<dependency>
    <groupId>net.foxdenstudio.sponge</groupId>
    <artifactId>foxguard</artifactId>
    <version>VERSION</version>
    <scope>compile</scope>
</dependency>

Gradle

Repository:

maven {
    name 'FoxDenStudio'
    url 'http://repo.foxdenstudio.net/repository/maven-public/'
}

FoxCore:

compile group: 'net.foxdenstudio.sponge', name: 'foxcore', version: 'VERSION'

FoxGuard:

compile group: 'net.foxdenstudio.sponge', name: 'foxguard', version: 'VERSION'

If you want to add interoperability with any of my plugins, I will happily make a special API just for you that I will never rename or break. Just contact me and tell me what you need, and I’ll add it for you.

These are the plugins that currently use FoxGuard for added functionality:

Bug Reports and Suggestions

If you want to report a bug or make a suggestion, go to https://github.com/FoxDenStudio/FoxGuard-Sponge/issues and make a new issue there. Try to be descriptive, as I DO have to read and understand it for it to be considered. Use common sense, and be detailed. The only exeption to this rule is if you have somehow talked to me directly and I’ve told you to make a new issue. In that case I already know the details and the issue serves as a reminder.

PLEASE DO NOT ASK QUESTIONS THROUGH GITHUB ISSUES!!! I WILL NOT ANSWER QUESTIONS THERE!!! IT IS ANNOYING FOR ME AND WASTES BOTH YOUR TIME AND MY TIME. Instead ask any questions in this thread or on IRC (info above).

Donations

Working on the plugin takes a lot of time, and unfortunately, I’m a poor college student.
If you feel like you have some money to spare, throwing it my way gives me a lot of motivation to get things done. Even small amounts help. You’d be surprised how much code a cup of coffee produces.

Paypal-me: https://paypal.me/gravityfoxy

I’ll have an actual donation button at some point.

MCStats Tracker


Worldguard for Sponge or Forge?
Best anti grief plugin?
Is forge bad? Is spigot here to stay and will Sponge and Spigot co-exist?
Spawn protection?
Disable Dynamics (Ice melting, Leaf decay)
Trying to find equivalent plugins in Sponge
**Discontinued** Pore - A Bukkit-Sponge Bridge
[Help] Protect Plugin
Land Management Plugin
Best protection plugin?
[Outdated Use Ore Topic] PlayerShopsRPG - Region-based Player Shops!
These 1.10.2 Plugins for Sponge
[Request] Antigrief plugin for sponge 1.8.9
Fox for hire - For plugins - For fun
World Protection for Sponge?
Is there a plugin that play music in specified area?
Poly-regions?
Essentials Replacement? and other plugins
WorldGuard
FoxCore Window/CUI System Discussion
[Released]ExplosionGuard
Plugin Requests (Or Links if there is one)
Question about doing something with Anti Grief or Polis
About WG Port
Need Plugins
Need Plugins! (Remake)
Unofficial Sponge Categorized Plugin List
Foxguard Sub Area and Sub Handler
[FoxGuard] Potential Flag Revamp - Thoughts?
Help a fox write plugins
I want to protect the world and make summon Pokémon simultaneously
Enhancements for Modded Servers
Protect creeper block dameage
Plugins to Sponge
Essential knowledge for setting up a sponge server?
Nucleus: The Ultimate Essentials Plugin (MC 1.10.2, 1.11.2, 1.12.2)
PermissionManager
A way to stop hunger/life loss?
Busco los siguientes plugins/ I look for the following plugins
#2

Awesome. I love the Flagsets, I remember using WorldGuard and going through every single flag to make sure my server spawn was protected. Will you add presets or something? Like Spawn ones, PvP zones, etc.

Will try this soon.


#3

Presets are planned yes, but they will be added when there is sufficient functionality for them to be needed. Unfortunately right now the plugin is kinda barebones. That will change soon though.

(just gotta get the last of the critical backend code in, like... i dunno... pvp control?)


#4

Please, Please, Please allow custom flags. If FoxGuard get's anywhere near majority use on Sponge servers, custom flags would be killer.

That said, most of what makes custom flags needed can be done with region specific permissions, which on sponge can be done with a context calculator that creates and manages contexts for regions.

Where this fails or breaks down is when the action isn't specific to a player, Can region x be hit by a meteorite? Should creeper explosions explode, be cancelled, or mend in region x.


#5

I am really excited to see this project!

I'm wondering if users/groups can be added to a region as authorized builders currently, or if thats a planned feature?


#6

All Regions and FlagSets have their own configurable parameters (short of a few, which don't actually need them)
Some FlagSets only fulfill a certain role. The point is to not have a "god" flagset that covers everything. It is intetended that you make multiple FlagSets and Regions to fulfill your end goal. This is a plugin that works kinda like building blocks; it gets more complex and powerful as you start using multiple features together.

Basically while one FlagSet may be responsible for Player specific events, another would be responsible for passive events, and you would use the two side-by-side with the same Region to get both effects.

Hope that answers your question!


#7

Regions don't understand "authorization." They are meant simply to define areas. They don't handle the logic that controls whether a player has permission. Similarly, FlagSets do not understand location. They simply manage whether an action should be allowed or not.

It is ultimately the combination of these two parts that forms a protected area.

Hope this helps :3


#10

Yes, thanks! I'm really excited to see how this project matures!


#11

In love with this plugin and Hope you win the competition with it :wink: Been looking for a way to use Worldguard styled flags without going through Core which only has around 5-8 flags you can choose really. Can't wait to see you continue to grow this mod and I'll always use it on my server


#12

Great to see that you are enjoying my plugin! :smiley:
If you find any bugs or have any suggestions or feature requests. Do go over to the Github Issues page and let me know!


#13

Can and will do! thanks for the quick reply lol. I have to make sure I'm choosing mods that actually update with Sponge so I can keep my Pixelmon server live and not waiting for a plugin update


#14

@gravityfox, I have an idea.
Give an opportunity other developers to create custom flags.


#15

Been there. Done that.

Documentation on the API will be written soon.


#16

How is possible do something like //expand vert ? (expand selection from bedrock to sky)


#17

FoxGuard doesn't have selections.

When you use /foxguard position, it adds that position to the position list of the state buffer.

It is up to the Region type to interpret what those points mean.

Remember, this plugin is inspired by WorldGuard, but does not behave like it AT ALL.

If you need help, the full Quickstart tutorial can be found at:

https://github.com/gravityfox/FoxGuard/wiki/Quickstart


#18

Many players want protected region from bedrock to sky (0-255). Is there any way to achieve this using some single command?


#19

The minimum number of commands needed at the moment to make a active protection zone from scratch is 3.

Usually it takes about 5-7, not including detail and list commands to check that everything is setup right.

The problem is that trying to make single commands limits the flexibility of the plugin. While I will eventually add single command presets, I am trying to add flexible content first that will allow server owners to do a lot of really cool things.

As for your original question. Use A Rectangular Region. They don't have vertical dimensions, so they just extend the full height, unlike Cuboid Regions, which do have vertical dimensions, and as such, don't extend vertically by default.

You can read a bit more on Rectangular Regions at

https://github.com/gravityfox/FoxGuard/wiki/Rectangular-Region


#20

Ok, thanks a lot!


#21

All that works just perfectly fine. Plugin does as it needs to for Region and Handler creation and linking and knowing where you can change the config up for what region, and what flag set. When will the Documentation be done for the flag set's so I can start getting my spawn protected with the flag sets you have coded already?


#22

After I finish writing my college applications. xD