Git Product home page Git Product logo

worldguard's Introduction

WorldGuard

WorldGuard lets you and players guard areas of land against griefers and undesirables, as well as tweak and disable various gameplay features of Minecraft.

  • Block creeper and wither block damage, falling damage, etc.
  • Disable fire spread, lava fire spread, ice formation, Endermen picking up blocks, etc.
  • Blacklist certain items and blocks so they can't be used
  • Warn moderators when certain items and blocks are used
  • Protect areas of your world so only certain people can build in them
  • Set areas where PVP, TNT, mob damage, and other features are disabled
  • Protect your server from various 'exploits' like magical obsidian creation machines
  • Disable, or enable, various Minecraft features, like sponges from classic
  • Add useful commands like an immediate "STOP ALL FIRE SPREAD" command
  • Enable only features you want! Everything is off by default

WorldGuard is open source and is available under the GNU Lesser General Public License v3.

A Bukkit server implementation (such as Paper) and the WorldEdit plugin are required to use WorldGuard. You can get a release copy of WorldGuard from the BukkitDev site.

Compiling

The project is written for Java 17 and our build process makes use of Gradle.

Dependencies are automatically handled by Gradle.

Contributing

We happily accept contributions, especially through pull requests on GitHub.

Please read CONTRIBUTING.md for important guidelines to follow.

Submissions must be licensed under the GNU Lesser General Public License v3.

Links

worldguard's People

Contributors

anon1efergwerfwer avatar aromaa avatar baharclerode avatar darius590 avatar darkarc avatar darklikally avatar derflash avatar epuidokas avatar joo200 avatar kisaragieffective avatar md-5 avatar me4502 avatar moo0 avatar narthollis avatar octylfractal avatar pieter12345 avatar pisich avatar pseudoknight avatar sk89q avatar stonar96 avatar stuntguy3000 avatar sturmeh avatar themolkapl avatar thvortex avatar tomylobo avatar tonybruess avatar vchuravy avatar wizjany avatar zml2008 avatar zreed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

worldguard's Issues

Warnings in protected area (potential flag)

two major issues I'm having.
first on-break warnings don't notify when someone breaks an item in spawn (i want to know when new players try / fail to grief so we can give them soft warnings and teach them the rules w/o having to fix griefing and potentially ban them)

I was thinking you could add a flag that turns on / off warnings in a protected area, so if its on it will warn if they try to break it in a protected area even if they don't actually manage to break it

I cannot give warnings to mods without oping them, which essentially makes the blacklist notification feature useless for them

settings i am using are

lightstone

[89] on-break=log,notify,tell
message=I Sure hope thats yours
and i gave moderators the /worldgaurdnotify permission, tho it only works once they are oped. i am using the permissions plugin if that means anything

Blacklist Notify issues

two major issues I'm having.
first on-break warnings don't notify when someone breaks an item in spawn (i want to know when new players try / fail to grief so we can warn them)

I cannot give warnings to mods without oping them, which essentially makes the blacklist notification feature useless for them

settings i am using are

lightstone

[89]
on-break=log,notify,tell
message=I Sure hope thats yours
and i gave moderators the /worldgaurdnotify permission, tho it only works once they are oped. i am using the permissions plugin if that means anything

[SEVERE] exceptionjava.lang.ArrayIndexOutOfBoundsException: 18

EDIT - this is not just happening with worldguard on, i have it fully disabled and its now happening. i've been running the server for days with no major issues besides when the update happened, but got the latest version of hey0 after the update and all was fine, this has randomly started happening - not sure if this is the right place to have this now....

hi, when running your plugin "WorldGuard" (definately only happens when worldguard is on) which seems to work perfectly other than seeming to ignore the ranks i set in blacklist, im sure that was my own fault with config setup however everything else was giong great, but only stays that way for about 10 minutes...., then i get this, and server freezes. i am still able to type stop, save the map and reload server.

2010-12-02 14:45:01 [SEVERE] Unexpected exception
java.lang.ArrayIndexOutOfBoundsException: 18
at eh.a(SourceFile:39)
at eh.c(SourceFile:101)
at fh.a(SourceFile:158)
at fh.b(SourceFile:91)
at fh.a(SourceFile:64)
at fh.a(SourceFile:37)
at fh.a(SourceFile:22)
at ep.a(SourceFile:1644)
at he.c(SourceFile:47)
at fn.c(SourceFile:64)
at jz.E(jz.java:579)
at gc.E(SourceFile:24)
at jz.b_(jz.java:195)
at gc.b_(SourceFile:28)
at fn.b_(SourceFile:48)
at dy.z(dy.java:752)
at jz.z(jz.java:186)
at ep.a(SourceFile:1067)
at ew.a(SourceFile:37)
at ep.f(SourceFile:1044)
at ep.a(SourceFile:1098)
at ew.a(SourceFile:37)
at ep.f(SourceFile:1044)
at ep.c(SourceFile:1023)
at net.minecraft.server.MinecraftServer.h(SourceFile:268)
at net.minecraft.server.MinecraftServer.run(SourceFile:210)
at bx.run(SourceFile:484)
2010-12-02 14:46:23 [INFO] CuboidPlugin : Saving data to hard drive...

2010-12-02 14:46:23 [INFO] CuboidPlugin : Done.

2010-12-02 14:46:23 [INFO] CONSOLE: Stopping the server.

2010-12-02 14:46:23 [INFO] Stopping server

2010-12-02 14:46:23 [INFO] Saving chunks

Mike, and thanks.

Add command restrictions in Areas?

Would it be possible in the future to add the ability to restrict commands in an area? Of course still allowing admins those commands.

(Told to post here from bukkit forums).

Suffocation damage

Would like a flag, if possible, to disable/enable suffocation damage (porting into a block, gravel falling on head, etc)

Limit the Volume of a region a player can claim.

As I mentioned in the World guard thread this would be more complicated then I thought at first, because there can be multiple owners in a region perhaps adding a creator or primary owner section.

Global PvP flag needed

In order to allow PvP only in one region, I need a global PvP flag that is allowing to handle that. Otherwise all newly created regions would be on PvP by default, only because the server flag is on.

Area enter notification

A flag for Areas, when someone enters a region, that it gets loged and/or notified to admins, or something like that
would be nice

Disable chest placement in an area

This feature would be nice to stop players from placing chests inside one of their protected areas and covering them with blocks to have infinite storage. On my server i want to force them to stash their stuff somewhere else. Thank you!

Make Commands only available in areas

Is it possible to add a feature like that when you are in a specific area that you can use /home and not in any other place? I think that's a great feature.

on-use, on-aquire

On my server I've made a pretty intricate class system with your blacklist that limits block usage to certain groups. I tried to make tools (pick, hoe, axe, etc) restricted by class as well, but on-use only applies to right clicking. Any chance to get it to work with left clicking of tools also, or at least get another flag that applies to that?

Also, do you have an estimate when on-aquire will work? It's the only way i know of to restrict armor usage, unless you know of another way?

Inventory Flag - Block Entry if Inv is empty/occupied

This is a more specific flag, but it has a huge use for specific servers.

Whenever a user tries to cross a regions border INTO or OUT of the region, Worldgaurd checks their inventory
If its empty, and the flag is on, the user is allowed in.
If it isnt empty, and the flag is on, the user cannot cross or teleport in.

If you could even add specific support for blocking if a certain item is in inventory, then that would be heavenly.
But the basic need is if empty or not empty. (Including Sidebar)

The use for my specific server is to prevent people from leaving an area that has no stealing rules, going to a rules free area, raiding a house, then putting the items back into the no stealing area, where it can never be caught or removed.

Default Group region permissions

Permissions on regions seems to work for every group except the Default group in Permissions. I guess it's because Permissions doesn't create an entry fo users in default group.

Thx a lot for all those recent fixes.

members only specific flags?

I'm looking at adding a flag that is PVP_UNFAIR which would allow a player who is a member of a region be immune to pvp attacks. Non-member players would still be attack-able. I realize that this is a fluke request and would not expect it to be added as a standard feature.

In member isFlagAllowed it seems that setting a flag to ALLOW or DENY will assume that the flag is meant to be applied to all players. (PVP, TNT, etc..) This makes perfect sense for the existing flags. The players' membership is only taken into account in a region when it's flag is set to NONE.

First question: Is this correct or did I miss something? Am I even making sense? lol

I wish to add this code to the entity listener (or something to this effect) and it would work similar to the build flag:

                //create bukkitplayer for compatability with takesPvpDamage (accepts LocalPlayer, as does isFlagAllowed)
                BukkitPlayer bukkitDefender = new BukkitPlayer(plugin, player);
                if (!plugin.regionManager.getApplicableRegions(pt).takesPvpDamage(bukkitDefender)) {
                    ((Player)attacker).sendMessage(ChatColor.DARK_RED + "That player cannot be attacked here!");
                    event.setCancelled(true);
                    return;
                }

Obviously a member would be added to ApplicableRegionSet to handle the call. The problem here is that it only works correctly with NONE set. Obviously I wouldn't want every region I set up to have default unfair pvp. Setting the flag to ALLOW or DENY effects both the attacker and defender because the ApplicableRegionSet.isFlagAllowed method is set up to check flags with respect to region as opposed to region membership. (by design, I realize)

And so here is question 2: In your opinion what is the best way to check a membership based flag without breaking the code for checking the other flags?

Thanks for this great plugin and thanks for taking the time to look at this.
Aaron

Blacklist to whitelist conversion string.

There used to be a string you could add in the first line of the WorldGuard blacklist to make it function as a whitelist instead. Is that still around? I can't find any documentation on it.

Read permissions build flag

As stated above, readout the build flag set in permissions config.yml so e.g. users in the default group with build: false are unable to build anywhere (especially non-defined-regions), except in regions where they are owner/member and regions with the flag build:allow.

Region Build Permissions system

Is there anyway you can change/toggle the way build protection works on region? Especially when multiple regions overlap. For me, it would be a lot more useful if only the most recently created region's flag were active. So if region A is inside region B, only the flags for region A apply when a user is in region A.
Something like toggle_only_most_recent_apply = true

Using parents region gets really messy when you have 20+ region that all overlap and which all have different permissions.

Thx a lot for your work sk89q

Welcome and Farewell messages

Please add welcome and farewell messages. Right now, people never know if they have entered a protected region until they try to build something and it doesn't work. Messages would be quite helpful.

Possible bug: FLAG_CHEST_ACCESS = "c"

Line 47 in AreaFlags uses the same flag letter (undercase c) as FLAG_CREEPER_EXPLOSION

This may cause unintended results in the ApplicableRegionSet Class?

allowing chest acces in a build none/deny zone

Could you allow chest interaction in a region that has build none/deny and chest-access allow ?
We're having some issues with that since our lwc protected chests are inside a reagion that we don't want ppl to build in, but still be able to access their chests.

Currently we need to set the build flag to allow for them to be able to access their chests.

Allow minecarts placement flag

It would be great if there could be a flag that allows placing & removing minecarts on tracks. We want to have a "public transport" system on the map that allows people to move around. If they cannot place minecarts themselves, this is very difficult. However i want to protect the minecart tracks from vandalism.

TNT and creeper explosions right outside a region

If a region has TNT and creeper explosions disabled, it would be nice if such explosions set off just outside the region were prevented from damaging blocks inside the region. As it is, people can successfully destroy the edges of a protected region in that manner.
I suppose an additional larger region with just those two things blocked (TNT and creeper explosions) could be placed around the target region to keep it fully protected, but that's a bit of nuisance to have to do. That, or just globally disabling TNT and creeper explosion block damage, but I'd prefer not to do that either.

Creeper explosions always blocked since v3.1

Creeper explosions appear to always be globally blocked since version 3.1 despite the following configuration settings:

block-creeper-explosions: off
block-creeper-block-damage: off

If I use WorldGuard 3.1.2 or WorldGuard 3.1 creeper explosion will not destroy the terrain, however reverting to WorldGuard 3.0b2 resolves the issue.

How to log the use of lighter?

I want to allow the use of lighter, but control it with logging. So my test config is like this:

[fire]
on-create=tell,log
on-use=tell,log

[lighter]
on-use=tell,log
on-create=tell,log

But it never tells and logs anything when I use a lot of lighters.

Minecraft Server 0.2.8
Hey0 Server Mod Build 131
WorldGuard version 1.7.1

Override Blacklist within a region, or region specific blacklists

I would love to turn on / off the blacklist by region. For example, only apply the blacklist to regions that define towns. Or, alternatively, apply the blacklist everywhere except "free for all" regions.

It might be nice to have custom blacklists for different regions, but that would probably be overkill. I'd be more than happy to be able to turn the global blacklist on and off.

MCBan Compatibility

A req to add it so that the autoban use MCBan with some configuration like:

use-mcban=true
ban-type=global/local
ban-reason=WorldGuard autoban for using blacklisted item.

Reduce blacklist 'notify' event frequency

Hi first of all i like your plugins.

But i have one "problem", i use the blacklist to log the useage of some items and if people are using a item that is on the list the console is spamming alot.

So my qeustion is can you make it like griefalert from hmod worked.

Below is from griefalert

Non-Owners gaining owner privs of regions

At line 992 of https://github.com/sk89q/worldguard/blob/master/src/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java the following check occurs:
if (!canUseRegionCommand(player, "/regiondefine")
&& !existing.isOwner(wrapPlayer(player))) {
player.sendMessage(ChatColor.RED + "You don't own this region.");
return true;
}
Based on the way this is written, a user who has access to /regiondefine automatically breaks the conditional because it uses an AND operator, and therefore will get added as an owner of the existing region.

Configuration settings regions.default.fire & regions.default.tnt

This issue is about adding two settings to the configuration file:
regions:
....
default:
...
tnt: false
fire: false
It should work like the pvp: false setting, so that
ignition:
block-tnt: on
block-lighter: on
work like a global setting (like pvp=off in server.properties) and tnt and fire (through lighter) would be denied everywhere, regardless of other settings.
When these two are set to off, and the requested settings above are set to false, tnt and fire are globally enabled but denied everywhere, except in regions where explicitly set to allow with the related flag (+tnt and +fire or +lighter for example).

See posts #880 till #884: http://forums.bukkit.org/threads/sec-worldguard-v3-2-2-protect-cuboids-blacklist-fire-spread-blocking-works.790/page-30#post-40080

Healing flag, farewell/enter messages

Alright, so I have two suggestions for flags on regions:

The first is a message saying XXXX when you enter/leave. Obviously that would need two messages per region, one for entering, one for leaving. For instance, in my server I have a radius around the spawn that is anti-pvp. It would be nice to have it say something like 'You are leaving/entering the spawn, and pvp is now enabled/disabled'.

The second is a being able to make regions healing. Say 1 or 2 hearts every ten seconds, or at least letting users set the amount of hearts and how often.

Hope you take a look at these and implement them, thanks :)

BLOCK_IGNITE/SLOW_SPREAD event problem in recent Bukkit (238)

Hello,

I have lots of logs about BLOCK_IGNITE event management problem since recent Bukkit such as #238:

SEVERE: Could not pass event BLOCK_IGNITE to WorldGuard
java.lang.NoSuchFieldError: SLOW_SPREAD
    at com.sk89q.worldguard.bukkit.WorldGuardBlockListener.onBlockIgnite(WorldGuardBlockListener.java:178)
    at org.bukkit.plugin.java.JavaPluginLoader$22.execute(JavaPluginLoader.java:230)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:60)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:213)
    at net.minecraft.server.BlockStationary.a(BlockStationary.java:65)
    at net.minecraft.server.World.g(SourceFile:1556)
    at net.minecraft.server.World.f(SourceFile:1482)
    at net.minecraft.server.WorldServer.f(WorldServer.java:48)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:276)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:209)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)

03.02.2011 23:21:40 org.bukkit.plugin.SimplePluginManager callEvent

I saw somewhere :
Removed SLOW_SPREAD from IgniteCause enum. (version 898654ea23be181a5c152a724de9ebd363100ed2)

TP Flag (Block incoming or outgoing teleports)

Hey,

If you could add a TP flag to the regions, that would work incredibly well.

TP Flag (Teleports = Warps, Homes, Spawn, Jumpto, etc...)
none - Teleports work as normal for everyone
Allowed - Only members of that area can teleport in or out (if the place they tele to isnt blocked)
Denied - Nobody can teleport in or out of the region

The use of this is pretty obvious. For my specific server, its to prevent somebody from teleporting to spawn or home in the middle of a fight.

Also, add a GLOBAL teleport flag for the entire server (no region needed)
the region TP flags would overried the global flag

-Minty

Blacklist.txt

[7]
ignore-groups=owner,admin
on-use=deny,tell,log,kick

For some reason it only denies the person placement of the block. Doesn't tell, log, or kick.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.