[SEC] WorldGuard - Protect your server from others, Minecraft, and yourself [BukkitDev]

Discussion in 'Plugin Releases' started by sk89q, Jan 16, 2011.

     
  1. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    [IMG]


    WorldGuard is a powerful plugin providing all the little things (and some big ones):
    • 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.
    • And add new features.

    [IMG] [IMG] [IMG] [IMG] [IMG]

    [IMG]

    [IMG] [IMG] [IMG] Before posting here: [IMG] [IMG] [IMG]
    • We do not officially provide help for problems here.
    • You will get help only from fellow users if you post here.
    • If you wish to suggest features or report bugs, you must use our issue tracker.
    • Visit our and hang out in our chatroom to talk to developers and other users.
    [IMG]

    This post has been edited 26 times. It was last edited by sk89q Nov 6, 2012.
  2.  
  3. Offline

    SeeD419

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    What build would you recommend with this sk89? I'm on 50 but it's not loading right on server startup. Also the useless region error, lol.

    I'll check a bit more...maybe I need to rename my blacklist.txt as well.
  4. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Use the latest build.
  5. Offline

    Jobsti

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Oh nooo... "internal Server Error" disconnect. (See my log #81, but I can reconnect)
    I have this Error with #63 to #66 if I destroy anything with the hand.
    No error if I use a tool, a dirtblock, Stick or something, only with the empty hand.

    All other plugins are offline, blacklist too, regions too.
  6. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Disable WorldGuard and tell me if it still happens. (If that's feasible.)
  7. Offline

    Jobsti

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Oh, still happens... it's a Worldguardproblem... and now?!
  8. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No, it's a Bukkit problem, but tracking down that error is not easy. If you disable WorldGuard and it does not continue to happen, then at least I know that WorldGuard is triggering the bug in Bukkit and I can start to track it down.
  9. Offline

    Jobsti

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm waiting ;)

    For testing, I altered all "true" settings to false, and the other way.
    Same error.
  10. Offline

    NobodyOfNaught

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    is there (or will there be) a way to click on a block and get the info on what region or regions that block is part of?
  11. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Remove the plugin entirely and we'll see.

    Use spider string.
  12. Offline

    NobodyOfNaught

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    how do regions interact when they overlap?
  13. Offline

    riuthamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    First off, thank you so much for dealing with all of us. You are by far one of the best plugin support people I have seen. Cudos and i wish I could offer you something in return.

    blacklist.txt
    Code:
    #
    # This is the blacklist for WorldGuard. Comments start with # and they
    # are ignored so you can put your own notes.
    #
    # Format:
    # [item1,item2]
    # option1=options
    # event1=whatToDo1,whatToDo2,whatToDo3
    # event2=whatToDo1,whatToDo2
    #
    # Example to block ore and catch some events:
    # [coalore,goldore,ironore]
    # on-destroy-with=deny,log,kick
    # on-place=deny,tell
    #
    # Options:
    # - ignore-groups (comma-delimited list of groups to not affect)
    # - comment (message for yourself that is printed with 'log' and 'notify')
    # - message (optional message to show the user instead; %s is the item name)
    #
    # Events:
    # - on-destroy (when a block of this type is being destroyed)
    # - on-break (when a block of this type is about to be broken)
    # - on-destroy-with (the item/block held by the user while destroying)
    # - on-place (a block is being placed)
    # - on-use (an item like a lighter is being used)
    # - on-right-click (the block is right clicked -- curently INEFFECTIVE)
    # - on-drop (the item is being dropped from the player's inventory)
    # - on-acquire (the item enters a player's inventory via some method)
    #
    # Actions (for events):
    # - deny (deny completely)
    # - notify (notify admins)
    # - log (log to console/file/database)
    # - tell (tell a player that that's not allowed)
    # - kick (kick player)
    # - ban (ban player)
    #
    # With the on-acquire event, it will completely block item pick ups
    # (the item will still be on the ground) if you use 'deny' but the other
    # actions (notify, log, etc.) won't do anything. However, if the player
    # receives the item via a different method (i.e. from a chest), all actions
    # will work although the item is removed after a short delay rather than
    # blocked from the beginning (as it is part client-side).
    #
    # Users with the /worldguardnotify permission will be receive notifications.
    #
    # -------------
    #
    # You can have the same block or item used in two different sections and
    # they will both apply:
    #
    # [goldblock]
    # ignore-groups=vip
    # on-destroy=deny
    # [goldblock]
    # ignore-groups=admins
    # on-destroy=tell
    #
    # However, some events override others. For example, if you disable both
    # usage of the diamond pickaxe (with the on-destroy-with event) and
    # destruction of gold blocks (with the on-destroy event) and a player tries
    # to destroy a gold block with a diamond pickaxe, because the
    # on-destroy-with event comes first, the rules for the gold block
    # will not be applied (but the player will be denied nevertheless).
    #
    # -------------
    #
    # Some examples follow. Remember to remove # in front if you want them
    # to work for you!
    
    [7,10,11,46,52,327]
    ignore-groups=serverowner,mods
    on-drop=deny,tell,log,notify
    on-break=deny,tell,log,notify
    on-place=deny,tell,log,notify
    on-acquire=deny,tell,log,notify
    WorldGuard config.yml
    Code:
    summary-on-start: true
    protection:
        enforce-single-session: true
        item-durability: true
    simulation:
        classic-water: false
        sponge:
            enable: true
            radius: 3
    physics:
        # Doesn't work in Bukkit yet
        no-physics-gravel: false
        no-physics-sand: false
        allow-portal-anywhere: true
        disable-water-damage-blocks: []
    ignition:
        block-tnt: false
        block-lighter: false
    fire:
        disable-all-fire-spread: true
        disable-fire-spread-blocks: []
        disable-lava-fire-spread: true
        lava-spread-blocks: []
    mobs:
        # Doesn't work in Bukkit yet
        block-creeper-explosions: false
    spawn:
        # Doesn't work in Bukkit yet
        login-protection: 3
        spawn-protection: 0
        kick-on-death: false
        exact-respawn: true
        teleport-to-home-on-death: true
    player-damage:
        # Doesn't work in Bukkit yet
        disable-fall-damage: false
        disable-lava-damage: false
        disable-fire-damage: false
        disable-drowning-damage: false
        disable-suffocation-damage: false
        teleport-on-suffocation: false
    regions:
        enable: true
        wand: 287
    blacklist:
        logging:
            console:
                enable: true
            database:
                enable: false
                dsn: jdbc:mysql://localhost:3306/minecraft
                user: root
                password: pass
                table: blacklist_events
            file:
                enable: true
                path: worldguard/logs/%Y-%m-%d.log
                open-files: 10
    permissions:
        groups:
            default:
                permissions:
                    - /regionlist
                    - /regionclaim
            serverowner:
                permissions:
                    - /region
                    - /regionbypass
            mods:
                permissions:
                    - /region
                    - /regionbypass
        users:
           riuthamus:
               groups:
                    - serverowner
               permissions:
                    - /reload
                    - /worldedit
           ramzy:
               groups:
                    - serverowner
               permissions:
                    - /reload
                    - /worldedit
           AlexJS:
               groups:
                    - mods
               permissions:
                    - /reload
                    - /worldedit
           Jockey_On_Me:
               groups:
                    - mods
               permissions:
                    - /reload
                    - /worldedit
           MadGod_Mugi:
               groups:
                    - mods
               permissions:
                    - /reload
                    - /worldedit
           Gigify:
               groups:
                    - mods
               permissions:
                    - /reload
                    - /worldedit
    WorldEdit config.yml
    Code:
    limits:
        max-blocks-changed:
            default: -1
            maximum: -1
        max-radius: -1
        max-super-pickaxe-size: 5
        max-brush-radius: 5
        disallowed-blocks: [6, 7, 14, 15, 16, 21, 22, 23, 24, 25, 26, 27, 28, 29, 39, 31, 32, 33, 34, 36, 37, 38, 39, 40, 46, 50, 51, 56, 59, 69, 73, 74, 75, 76, 77, 81, 83]
    use-inventory:
        enable: false
        allow-override: true
    logging:
        log-commands: false
        file: worldedit.log
    super-pickaxe:
        drop-items: true
        many-drop-items: false
    snapshots:
        directory:
    shell-save-type:
    no-double-slash: false
    debug: false
    permissions:
        groups:
            default:
                permissions:
                    - /
            serverowner:
                permissions:
                    - /reload
                    - /worldedit
                    - /worldguardnotify
                    - /worldeditselect
            mods:
                permissions:
                    - /reload WorldEdit
                    - /worldedit
                    - /worldguardnotify
                    - /worldeditselect
        users:
           riuthamus:
               groups:
                    - serverowner
               permissions:
                    - /reload
                    - /worldedit
           ramzy:
               groups:
                    - serverowner
               permissions:
                    - /reload
                    - /worldedit
           AlexJS:
               groups:
                    - mods
               permissions:
                    - /reload
                    - /worldedit
           Jockey_On_Me:
               groups:
                    - serverowner
               permissions:
                    - /reload
                    - /worldedit 
    FILE STRUCTURE:
    server folder: E:\MC_HDD\bukkit
    plugins folder: E:\MC_HDD\bukkit\plugins
    worldguard: E:\MC_HDD\bukkit\plugins\WorldGuard
    blacklist.txt: E:\MC_HDD\bukkit\plugins\WorldGuard\blacklist.txt
    config.yml: E:\MC_HDD\bukkit\plugins\WorldGuard\config.yml
  14. Offline

    NobodyOfNaught

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've encountered a problem when editing the regions file manually, the order of the 2 points defining a cuboid seems to matter.

    if I enter a line like this it works fine
    "spawn","cuboid","-100","0","-100","100","127","100","0","u:nobodyofnaught","",

    how ever if I enter it like this the line is simply ignored.
    "spawn","cuboid","100","0","100","-100","127","-100","0","u:nobodyofnaught","",
  15. Offline

    riuthamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Console is being destroyed by the following output:

    Code:
    SEVERE: Could not pass event PLAYER_ITEM to WorldGuard
    java.lang.NullPointerException
            at com.sk89q.worldguard.bukkit.BukkitUtil.toVector(BukkitUtil.java:35)
            at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener.onPlayerItem(Wor
    ldGuardPlayerListener.java:135)
            at org.bukkit.plugin.java.JavaPluginLoader.callEvent(JavaPluginLoader.ja
    va:146)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:199)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:417)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(SourceFile:232)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:64)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    2011-01-16 22:14:35 [INFO] GeneralXTL [/68.96.68.238:33632] logged in with entit
    y id 899
    Player count: 15
    2011-01-16 22:14:35 [INFO] <ºaTophusaurusºf> if you do it again, do you profit t
    wice as much?
    Jan 16, 2011 10:14:37 PM org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event PLAYER_ITEM to WorldGuard
    java.lang.NullPointerException
            at com.sk89q.worldguard.bukkit.BukkitUtil.toVector(BukkitUtil.java:35)
            at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener.onPlayerItem(Wor
    ldGuardPlayerListener.java:135)
            at org.bukkit.plugin.java.JavaPluginLoader.callEvent(JavaPluginLoader.ja
    va:146)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:199)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:417)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.a(SourceFile:232)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:64)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:104)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:261)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:197)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
    Jan 16, 2011 10:14:37 PM org.bukkit.plugin.SimplePluginManager callEvent
    And when i say destroyed I mean its spawning this error once every 1.5 second for every player. I have a 50 man server and you can imagine how many times this error spawns.

    I am using the most recent build. #66
  16. Offline

    sharkh20

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Disable fire spread does not seem to be working for me either. Says it is enabled in console but is not actually working.
  17. Offline

    ScytheX10

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Do you ever plan on making a conversion app to translate CuboidPlugin protection data?
  18. Offline

    Kainzo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm a little confused about permissions as well - can someone post a sample for the .yml (never have used this before but have notepad++)
  19. Offline

    riuthamus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i posted mine, and permissions work for worldedit.. just not worldguard
  20. Offline

    Kainzo

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Could you post the exact files from a upload site? for the life of me, I cant get the same exact settings working.
  21. Offline

    Antac55

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I am here simply to show my gratitude for this plugin and worldedit. When I get enough money I plan on showing my gratitude that way as well :D Also, thanks for working on CraftBukkit with the other developers!
  22. Offline

    ToitagL

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    First, thanks a million fort WE & WorldGuard. Amazing you did this so fast ! My server is running again thanks to you.

    I'm also here to report a bug (?) i just experienced in my server : with WorldGuard On, i was just unable to use any kind of pressure plate. Did i miss a setting or something ?

    Thanks again, and as said above me, thanks for working on Bukkit :)

    Edit : disabled the blacklist, which was empty, and everything started to work again. Kinda weird :)
  23. Offline

    sk89q

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I am going to bed, but here's version 2.1.1:

    This makes initial install easier (it will now create a default config file). It also fixes the NullPointerException and fixes disabling fire spread also disabling flint and steel completely. It will also now fix the coordinates in the regions file so that the minimum and maximum are correctly set (if you edit the regions file manually).
    https://github.com/downloads/sk89q/worldguard/worldguard-2.1.1.zip

    YOU MUST ALSO UPDATE WORLDEDIT.

    I will answer questions later. However, remember:
    • No tabs in the configuration file.
    • Make sure you use the latest version of CraftBukkit from the bamboo site and not from the forums.
  24. Offline

    Erik991

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I was wondering...
    Is there maybe a way to import the cuboid file?
    or some kind of converter?
    We currently have around 200 protected cuboids and it will be a pain in the ass to protect everything again!
  25. Offline

    Iamdone

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Creepers explode.. is set it to on but it won't work..
  26. Offline

    racu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It doesn't work /god in #66
  27. Offline

    Jobsti

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Newest WorldGuard, CB #66.
    Deleted all, create default configs, add my permissions, block tnt, lighter and creeper...

    I connect, all seems to be fine, than I placed tnt, on activation Disconnect, same error.
    BUT NOW, I get the Error too, if I destroy any block with the hand, like the last version.

    Edit:
    No Error if I don't block TNT and/or Creeper!

    /god don't work
  28. Offline

    MindCode

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Code:
    player-damage:
        disable-fall-damage: on
        disable-lava-damage: on
        disable-fire-damage: on
        disable-drowning-damage: on
        disable-suffocation-damage: on
        teleport-on-suffocation: on
    This doesnt work! I still get damage on all these things :-/
  29. Offline

    rbos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've been able to extract my Cuboid data by:

    • downloading the hMod b133 source, the Cuboid source, and unzipping minecraft_server all into the same directory,
    • hacking out whatever functions don't compile with javac until I have something that approximates a build (there's probably a better way!),
    • copying my cuboids/ directory into the directory,
    • and adding the following to CuboidAreas.java:
    Code:
            public static void main(String[] args) {
                    loadCuboidAreas();
                    for (int i = 0 ; i < listOfCuboids.size(); i++){
                            CuboidC cuboid = listOfCuboids.get(i);
                            // name, x,y,z x,y,z protection restricted trespassing pvp heal creeper sanctuary welcomemessage farewellmessage warningmessage allowedplayers
                            System.out.print(cuboid.name+":"+cuboid.coords[0]+","+cuboid.coords[1]+","+cuboid.coords[2]+","+cuboid.coords[3]+","+cuboid.coords[4]+","+cuboid.coords[5]+":"+cuboid.protection+":"+cuboid.restricted+":"+cuboid.trespassing+":"+cuboid.PvP+":"+cuboid.heal+":"+cuboid.creeper+":"+cuboid.sanctuary+":"+cuboid.welcomeMessage+":"+cuboid.farewellMessage+":"+cuboid.warning+":");
                            String playerstr="";
                            for(int f=0; f<cuboid.allowedPlayers.size(); f++) {
                                    playerstr=playerstr+cuboid.allowedPlayers.get(f)+",";
                            }
                            playerstr = playerstr.substring(0,playerstr.length()-1);
                            System.out.println(playerstr);
                    }
            }
    
    Then, I compiled and ran it with "javac CuboidAreas.java", "java CuboidAreas". I had to ctrl-C out once it was done processing.

    Pulled out all 500-odd defined cuboids this way.

    I present this without support, as it was a dirty-ass hack. If you can make it work, more power to you.
  30. Offline

    ledhead900

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  31. Offline

    ToitagL

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    If you read the configuration file, you'll see a line with "#Doesn't work yet". This plugin is still on dev.
  32. Offline

    tekac

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    So does this block TNT successfully yet or no? I'm still using Guardian due to the inability to block TNT on WorldGuard. ;/

Share This Page