[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

    Strahan

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Odd. Try /rg flag __global__ vehicle-destroy
  4. Offline

    saettadluffy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    works! I love you Strahan :p
  5. Offline

    MrGKanev

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Im sorry for the idiot question but i have multyverse on my server and worldguard and worldedit are my antygreaf systems but in some world they can greif iven if the region is claimd...
  6. Offline

    DardoTheMaster

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    give me error:"could not pass PlayerMoveEvent"there's a plugin with name Playermoveevent?
  7. Offline

    JensDeMey

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Please, it's very urgent ...
  8. Offline

    Strahan

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Glad to be of assistance :)
  9. Offline

    funky man

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm having a problem that suffocation is off, even though in the config is is on, is there a global based flag similiar to the ones used above from minecart destroy that anyone knows of?

    This post has been edited 1 time. It was last edited by funky man Mar 19, 2012.
  10. Offline

    der_robert

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hello people,

    I still have no great experience with world-looking guard, and why not if it is possible to automatically add flags to be when a region is created. Since I'm too lazy to do that after each region, also because I want to have a uniform, so I created a trigger.

    This created immediately after creating a region, the corresponding entries in the table "region_flag", the trigger can be easily adapted and extended.

    In order for the trigger, however, have a few columns are added to some tables.

    Here once the trigger itself:
    Code:
    BEGIN
    SET @last_user_id := (select user_id from `region_players` order by id desc limit 1);
    SET @last_region_id := (select region_id from `region_players` order by id desc limit 1);
    SET @user_name := (select name from `user` where `id` = @last_user_id);
     
    UPDATE `region` SET `owner`=@user_name WHERE `id`=@last_region_id LIMIT 1;
     
    SET @last_region_owner := (select `owner` from `region` order by `id` desc limit 1);
    SET [USER=35164]name[/USER] := (select `id` from `region` order by `id` desc limit 1);
     
    SET @WText := CONCAT('Hallo %name%. Willkommen bei ',@last_region_owner,'`s Region.'); 
     
    # here you can set the Flags
     
    INSERT INTO `region_flag` (`region_id`, `flag`, `value`) VALUES (@Name, 'greeting', @WText); 
    INSERT INTO `region_flag` (`region_id`, `flag`, `value`) VALUES (@Name, 'farewell', 'Bis bald!');
    INSERT INTO `region_flag` (`region_id`, `flag`, `value`) VALUES (@Name, 'pvp', 'deny');
    END
    The trigger must be set on the table "region_players" (remember not to set the user builds the database connection (the same as in the world guard config). Furthermore, the event must be set to "AFTER" + "INSERT".

    Here my tables that i change:
    Code:
    CREATE TABLE `region` (
        `a_id` INT(10) NOT NULL AUTO_INCREMENT,
        `id` VARCHAR(128) NOT NULL,
        `owner` VARCHAR(128) NULL DEFAULT NULL COMMENT 'wichtig',
        `world_id` INT(10) UNSIGNED NOT NULL,
        `type` ENUM('cuboid','poly2d','global') NOT NULL,
        `priority` SMALLINT(6) NOT NULL DEFAULT '0',
        `parent` VARCHAR(128) NULL DEFAULT NULL,
        `datetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
        PRIMARY KEY (`id`, `world_id`),
        UNIQUE INDEX `a_id` (`a_id`),
        INDEX `parent` (`parent`),
        INDEX `fk_region_world` (`world_id`),
        CONSTRAINT `fk_region_world1` FOREIGN KEY (`world_id`) REFERENCES `world` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
        CONSTRAINT `parent` FOREIGN KEY (`parent`) REFERENCES `region` (`id`) ON UPDATE CASCADE ON DELETE SET NULL
    )
    COLLATE='latin1_swedish_ci'
    ENGINE=InnoDB
    ROW_FORMAT=DEFAULT
    AUTO_INCREMENT=1
    Code:
    CREATE TABLE `region_players` (
        `id` INT(10) NOT NULL AUTO_INCREMENT,
        `region_id` VARCHAR(128) NOT NULL,
        `user_id` INT(10) UNSIGNED NOT NULL,
        `owner` TINYINT(1) NOT NULL,
        PRIMARY KEY (`region_id`, `user_id`),
        UNIQUE INDEX `id` (`id`),
        INDEX `fk_region_players_region` (`region_id`),
        INDEX `fk_region_players_user` (`user_id`),
        CONSTRAINT `fk_region_players_region` FOREIGN KEY (`region_id`) REFERENCES `region` (`id`) ON UPDATE CASCADE ON DELETE CASCADE,
        CONSTRAINT `fk_region_players_user` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON UPDATE CASCADE ON DELETE CASCADE
    )
    COLLATE='latin1_swedish_ci'
    ENGINE=InnoDB
    ROW_FORMAT=DEFAULT
    AUTO_INCREMENT=1
    I hope it is ok that I post this here, if not, then simply delete this post.

    BTW:. The trigger is certainly not optimal, but it works.
    BTW2. You have the database for each region are open in order for the entries which the trigger is also made to take effect.

    sorry for my bad english :)
  11. Offline

    Halloween96

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Could not pass event PlayerMoveEvent
    Plizz HELP!
  12. Offline

    Halloween96

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Could not pass event PlayerMoveEvent
    Plizz HELP!
  13. Offline

    Ras20906

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can someone help, I always get this error:
    Code:
    2012-03-16 16:51:13 [SEVERE] Could not pass event PlayerMoveEvent to WorldGuard
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:212)
        at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.getVehicle()Lorg/bukkit/entity/Vehicle;
        at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener$PlayerMoveHandler.onPlayerMove(WorldGuardPlayerListener.java:113)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        ... 10 more
  14. Offline

    thelanoyo

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

    Dload? and I'm running on the latest bukkit relesed today and I have the newest WE and WG from the bukkitDEV
  15. Offline

    PyPKjE

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Please help solve the problem because to be a lot of errors:
    [SEVERE] Could not pass event PlayerMoveEvent to WorldGuard
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:214)
    at net.minecraft.server.Packet10Flying.handle(SourceFile:126)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:118)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NoSuchMethodError: org.bukkit.entity.Player.getVehicle()Lorg/bukkit/entity/Vehicle;
    at com.sk89q.worldguard.bukkit.WorldGuardPlayerListener$PlayerMoveHandler.onPlayerMove(WorldGuardPlayerListener.java:113)
    at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 10 more
  16. Offline

    neil9444

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Whenever people are on my server i get a flood of errors on my console and my server tends to get laggy when people play on it. Any way to fix this?
  17. Offline

    der_robert

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes, there is a solution -.-

    This post has been edited 1 time. It was last edited by der_robert Mar 22, 2012.
  18. Offline

    PwnThaMan

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    please fix the could not pass event PlayerMoveEvent error other players have posted!!
  19. Offline

    Bubbyclapp

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    well he made dev builds SO NO MORE ERROR :DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
  20. Offline

    TheVisas

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    WG+WE= 2 greate plugins :)
  21. Offline

    EmanuxJade

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ty for upgrade!
  22. Offline

    Scoter

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Everytime when someone destroy a block in protected area the destroyed block will drop and regenerate... So players can copy blocks from spawn :/
    aD_Reaper, Tendonsie and efstajas like this.
  23. Offline

    Tendonsie

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

    Regions = 1 block and you can make 500000 of that one black :p
  24. Offline

    aD_Reaper

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes, PLEASE fix this. I had to downgrade to 1.2.3
    This also happens in faction territory.
  25. Offline

    XeroBytez

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Also confirmed.

    Will have to downgrade to 1.2.3 until this gets resolved. Thanks!
  26. Offline

    oldirtyb

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

    Hey i just updated to 1.2.4 minecraft bukkit.

    My world is still protected, but players are able to hit a block (it will break for half a second and restore) but it will then give them the item.

    This is causing problems with the pvp balance and economy on our server so we are shut down until we can figure this out
  27. Offline

    PunJedi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Confirmed same issue.

    Running latest Craftbukkit Dev 1.2.4, Latest Worldguard dev direct from sk8's link.

    People in WorldGuard regions can break redstone lamps, grass, wool etc.. and get the "you do not have permissions" message but it gives the drop after replacing the block, no error in console.

    Kind of a bad "infinite dupe" bug for survival servers. Any suggestions/fixes? Thank You.

    This post has been edited 1 time. It was last edited by PunJedi Mar 23, 2012.
  28. Offline

    dataviruset

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Same here. Major issue :(

    EDIT: Until the fix, is there a way to enable verbose logging when a person tries to access a protected block?

    This post has been edited 1 time. It was last edited by dataviruset Mar 23, 2012.
  29. Offline

    XeroBytez

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

    PunJedi

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That would be fine except the version past that fixed this issue...

    "Fixed fatal crash at world generation" on build 2114.

    So, now the problem stands that we could rollback to a prior build and possibly reintroduce an even worse problem.

    Unless this is only for New Worlds? However, I feel that it means any new chunk generation and we run borderless worlds.

    This post has been edited 1 time. It was last edited by PunJedi Mar 23, 2012.
  31. Offline

    monir

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

    This post has been edited 1 time. It was last edited by monir Mar 23, 2012.
  32. Offline

    dataviruset

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I tried 2111 and the bug doesn't exist. Thanks for the tip!
    However, sk89q will have to fix this in later CB versions, I guess.

Share This Page