[INACTIVE][SEC] AntiGrief v1.2.1 - Anti-Build+Anti-Grief Measures with Polygon Zone Protection [818]

Discussion in 'Inactive/Unsupported Plugins' started by crowebird, Feb 9, 2011.

  1. Offline


    AntiGrief v1.2.1 [Download]
    AntiGrief is a Prevention plugin with multiple aims:
    • Prevent potential griefers.
    • Control who can do what.
    • Give the server owner complete customization.
    • Define limitations based on in game created zones.
    What this means is you have complete control over who can do what on your server.
    • You can allow guests to visit your server without being able to do anything.
    • You can prevent certain actions from being used by anyone or certain groups.
      • This can be done by action, or even by item.
    • It is up to you as the server owner, you can customize every element.
    • Prevent/allow any action.
      • Prevent/allow any action with specific item customization.
    • Prevent the use of TNT/Explosions/Fire/Lava/Water.
    • Prevent Mob Targeting (I.e. Prevent griefing via lured creepers).
    • Prevent players from damaging other players.
    • Prevent players from receiving damage in multiple ways.
    • Prevention of the usage of vehicles.
    • Prevent on a per-world basis.
    • Prevent via user defined polygon zones.
    Version 1.2.1:
    • Compiled with 818

    Version 1.3 [coming soon]:
    • Zones now have enter and exit messages
    • New zone commands to add enter and exit message and command to delete zones
    • Ability to prevent explosions in a zone
    • Ability to prevent creature (by type) from spawning in a zone
    • Fixes to zone creation and visualization (unable to break visualizing blocks)
    • Users can only modify the zones they created
    • Ability to modify the area of a zone
    • Can modify points while creating a zone
    • Ability to set default actions allowed inside a zone
    • Slight modification to the main configuration file (prevent_nodes is nodes.prevent again and allow_nodes is nodes.allow again) - this way nodes.prevent/allow follows the same logic as prevent/allow when preventing/allowing an item based on a certain action
    • The ability to disable an item completely outright or by group/user
    • Other fixes/enhancements
    Version 1.0.3:
    • Fixed a logic error dealing with preventing items (<node>.prevent)
    Version 1.0.2:
    • Many bug fixes.
    • Fixed zones - they now work properly and match main configuration format.
    • Changed some nodes around
    • Some changes to config format.
    • Prevent item use added back
    • Fix for door interactions
    If upgrading to 1.0.2+ it is recommended that you let AG re-create your configuration files. I know it is a pain, but the new changes/increase customization required some shuffling/creation of settings that need a new format (mostly re-naming).

    AG requires GroupManager or Permissions although GroupManager is recommended for use with AG!

    Report Issues

    Hrdkr, xcession and brosef like this.
  2. Offline


    It should work with 485... I just have been compiling with the latest version. The only CB that should give you errors is anything less than 454 because I started using commands and am using the new command system. (Post if it works for you on 485 so I can keep track of the minimum CB build required, it would be appreciated!)

    As for groupmanager 0.9d. I highly doubt it. They changed the way that internal commands work that gm 0.9 probably won't recognize.

    I will start using recommended releases though, sorry for any inconvenience.
  3. Offline


    Disregard! Updating GroupManager fixed this! :p

    Bukkit 478 and 493 spam this error with
    14:56:12 [SEVERE] Could not pass event BLOCK_INTERACT to AntiGrief
    java.lang.NoSuchMethodError: org.anjocaido.groupmanager.GroupManager.getWorldsHolder()Lorg/anjocaido/groupmanager/d
            at com.crowebird.bukkit.AntiGrief.AntiGrief.worldPermissions(AntiGrief.java:309)
            at com.crowebird.bukkit.AntiGrief.AntiGrief.getGroup(AntiGrief.java:305)
            at com.crowebird.bukkit.AntiGrief.AntiGrief.access(AntiGrief.java:247)
            at com.crowebird.bukkit.AntiGrief.AntiGrief.access(AntiGrief.java:230)
            at com.crowebird.bukkit.AntiGrief.AntiGriefBlockListener.onBlockInteract(AntiGriefBlockListener.java:37)
            at org.bukkit.plugin.java.JavaPluginLoader$23.execute(JavaPluginLoader.java:237)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
            at net.minecraft.server.BlockPressurePlate.a(BlockPressurePlate.java:81)
            at net.minecraft.server.Entity.c(Entity.java:535)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:231)
            at net.minecraft.server.Packet10Flying.a(SourceFile:126)
            at net.minecraft.server.NetworkManager.a(SourceFile:230)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  4. Offline


    Looking at the source on github, where is AntiGriefCommand implemented?
  5. Offline


    Soooo, no Problems with 8.01 and #493 with gm 1.0, no Errors. work.

    But a Question:
    My guests can open WoodenDoors, but no IronDoors via PPs or Buttons, config:

    block: []
    interact: [64,70,71,72,77,324,330,]
    item: []
    buildfalse: ['block.damage',
    buildtrue: []
  6. Offline


    Nice plugin. One tip thou, a more detailed intruction about the nodes on the wiki would be nice. Took me 20 minues and a dozen of server reboots to make it work.

    antigrief.prevent.player.damage.take.fire_tick is such a big node, I tried so many things before understand i had to put ALL the sub nodes...
  7. Offline


    @madcap - for some reason it does not look like the newest code got pushed correctly, i'll update it sometime tomorrow

    @Jobsti - strange, are both buttons and iron doors allowed as interact options in that config? (I don't know all the item numbers - you might have to do the item number for half iron door, like you have to do half wood door).

    @anon - I have been meaning to add more tutorials but have not had the time. And yea it is a long node, not sure how to narrow it down though. I could add shortened node names so instead you could use ag.p.player.d.t.fire_tick (or something of the like), but that might just make things more confusing. If anyone has suggestions let me know. There are a lot of customization options and I was trying to find the most logical tree of nodes.
  8. Offline


    Jep, Numbers for Half- and Doors included.
    I can open the woodendoor by hand, but not with a button or pp, but they are in the config.
  9. Offline


    Could we maybe get a tool to help us define zone protections? Other modules use a stick or a wooden axe or something.
  10. Offline


    Okay, I agree that the wiki is not very clear about this, or I'm missing something
    I'm using 493 now (recommended) and got confirmations GM1.0 prealpha 3 is stable enough to use :D,
    so if I put a group on build:false it will auto block all actions listed in default.yml buildfalse list for everyone in that group?
    Or do I need to add permission nodes to the group? (what would be the use of the buil:true|false than be...?)

    I have zones:false because I use worldguard for that (easy selection), does that have anything to do with the build:true|false function? (ie does the build: thing uses a worldwide zone?)
  11. Offline


    @madcap - Player command source was added.

    @dirkson - yea as I work on protection I will add a tool

    @Jobsti - I will look for a fix and see what is causing this.

    @OrtwinS - you have it right. Anyone with build: false will have the default.yml nodes.buildfalse permissions acted on them. It is meant to be a global list so you don't have to add permissions for every group, but gives you easier customization of what exactly build: false will do (and can even be done per-world).

    You can add permission nodes to enhance build rights.
  12. Offline


    Using CraftBukkit 493
    with latest Groupmanager and Antigrief

    Does not stop Doors or Beds from being placed

    Please define "If you want to be able to limit beds use at least 473."
  13. Offline


    It seems visitors have to right click doors to go through again... :\
  14. Offline


    i get this error D:
    08:36:14 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'ag'
    in plugin AntiGrief v0.8.0.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:33)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:619)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:582)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:576)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
    at com.crowebird.bukkit.AntiGrief.AntiGriefCommand.onCommand(AntiGriefCo
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:31)
    ... 12 more
  15. Offline


    @Bargraphics - doors and pictures do not fire with any hooks currently available to prevent their placement, as far as I am aware. And therefore I can't yet restrict their placement. Beds might have the same limitation. I will see if I can add crafting hooks and begin limiting crafting as well.

    @Etalyx - yea I was trying to come up with a better method, and accidentially removed the code that supported it in the process. It will be fixed in the next update. Sorry about that!

    @Madmonkey - Did you just use /ag as a command? I forgot to do a step of error checking, but just /ag as a command won't do anything anyway, and that error won't cause any issues at present.
  16. Offline


    i get an internal error when i use /ag
  17. Offline


    If your using Essentials remove EssentialsGroupBridge.jar for your plugin directory.
  18. Offline


    What are your thoughts on Listener priorities for protection plugins? I posted a reply to the priorities thread but haven't had any responses yet. My own plugin uses the LOWEST priority now to create events that are then successfully cancelled by your plugin if I set your plugin's priority to LOW. My plugin then undoes its own action using a Listener with HIGHEST priority.
  19. Offline


    @Jobsti - I am unable to reproduce the issue you describe. If I place a lever or a button and create a redstone path to a door (wooden or iron), and then toggle it with the right allow.interact the triggers work correctly. If I remove the button/level items from interact and reload, then it does not toggle like it should.

    Maybe it has to do with you trying /ag reload? There was an issue that I fixed in the latest version, otherwise I am unsure as to why it won't work correctly for you.

    @sunkid - following recommended levels, I believe AntiGrief (and the like) should be on the lowest, they provide the initial protection and then allow later plugins to work with the restrictions placed by plugins like mine. I gave the user the ability to describe the level AG will run on for cases like yours where, maybe they want AG to have the final say - or at least a later say without its actions being overwritten.

    The problem you bring up - and the current work around you are doing - has to do with not enough communication between plugins (imo), but I see your point about LOW being the recommended level for protection plugins:
    Ideally setCancelled should allow another parameter that says IMPORTANT or FINAL or NORMAL which later plugins can then check if cancelled and if so what did the cancelling plugin have to say about it. If FINAL then the cancelled state is set in stone. If IMPORTANT then only change cancelled state if absolutely necessary and NORMAL could be the do what you want, i'v had my say now you give yours - but this is getting into bukkit internals.

    If they worked like that then protection plugins could remain on the bottom. My plugin's actions could be FINAL (again I would program this to be at the users choosing) and then your stick plugin would simply never be called on all users where AntiGrief cancels their actions ahead of time. Only issue - as it is now - is I don't think too many authors check the cancelled state, and overwrite it regardless. FINAL could be one of the fixes where bukkit simply ignores that action on up because it can't be uncanceled.
  20. Offline


    I like the idea of some additional information to go with the cancellation of an event. I also think I made a conceptual mistake when thinking about the priority of events. Since my plugin's "action" listener actually responds to completely different events than protection plugins, it doesn't really matter what priority the listeners of those plugins run under, as long as they leave room (i.e. run at a lower priority) for my plugin's "undo" listener to fix the situation.

    Thanks for helping me to think this through more... I really need to get over this head cold, my brain is as congested as my nose, it seems.
  21. Offline


    V 0.8.1 released:

    • Added tool for zone creation, added zones.tool to config.yml
    • Changed zones to zones.enable in config.yml
    • Change priorityLevel to priority in config.yml
    • Fixed doors not being able to be opened with left-click when overridden
    • Fixed zones using player position over block position to determine access
    • Fixed /ag reload not properly reloading zones
    • Change antigrief.command.reload to antigrief.reload for /ag reload permission
    • Fixed being able to create zones of an improper size
    • Fixed being able to create a zone with the name of a zone that already existed
    • Changed to auto detection of parent zone when creating a new zone
    If you just downloaded v0.8.1 please re-download! I realized I was missing the item use and pickup hooks which I removed when doing some testing, they are back in and v has the fix. (I removed the v0.8.1 download all together)

    Next update will have some new customize features for AntiGrief, but there is getting to be a lot of things you can do and I am not sure if my current configuration structure is too confusing, or if it could use an overhaul.

    As it stands now, you define which nodes you want to prevent for groups with build: false and groups with build: true and then you define which blocks you want to be able to interact with, use, or destroy/place as overrides. I want to extend it so you can get more nit-picky and so you can ultimately have full control over every user in your server: i.e. maybe there is someone you want to allow the use of tnt to, but deny it for everyone else, or maybe prevent (or allow) a specific group from placing a specific block (these individual overrides can't be set yet).

    However this kind of control can make for a possibly confusing configuration file and I would like some input.

    So config as it is now:
      interact: [64]
      item: []
      block: []
      buildfalse: ['block.damage',
      buildtrue: []
    This config says anyone with "build false" cannot damage, place, or interact with blocks, be followed by creepers, cause damage to other entities, use or pickup items, or use or move vehicles. There is one exception and that is they can open wooden doors.

    How extending the config might work:
            allow: [1]
            allow: [1]
            allow: [64]
              allow: [320]
        nodes: ['block.ignite',
      buildtrue: {}
    This config says anyone with "build false" cannot damage, place, or interact with blocks, be followed by creepers, cause damage to other entities, use or pickup items, or use or move vehicles. However there are a few exceptions I placed this time: They can place and damage smoothstone (1), can interact with wooden doors, and they can eat cooked meat. All nodes that don't need specific exceptions are just listed in the prevent.buildfalse.nodes block.
    There can still be general overrides to, which could just be placed as the block prevent.allow and would act as expected.

    Hope all the makes sense.
    tl;dr I am trying to determine a better way to allow simple and advance customization and I would like some feedback :)
  22. Offline


    Using CB493+ last essential_groupmanager:

    11:00:12 [GRAVE] org/anjocaido/groupmanager/GroupManager loading AntiGrief v0.8.1.1 (Is it up to date?)
    java.lang.NoClassDefFoundError: org/anjocaido/groupmanager/GroupManager
    	at com.crowebird.bukkit.AntiGrief.AntiGrief.setupPermissions(AntiGrief.java:300)
    	at com.crowebird.bukkit.AntiGrief.AntiGrief.onEnable(AntiGrief.java:137)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:414)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:187)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:83)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:61)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.ClassNotFoundException: org.anjocaido.groupmanager.GroupManager
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    	at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:30)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	... 12 more
  23. Offline


    I like the suggested changes to the configuration. May I suggest that you try to make your implementation backwards compatible? I know that can be a PITA, but it's a major bonus for users!

    Also, since you now have zones that seem to be akin to other protection plugins, customizable messages and optional when users enter a zone would be really great. For example, I set up a trading post and protected it with AntiGrief to only allow for the use of doors and chests as well as the placement of chests. When users enter this zone, I would love to "greet them" with a message like 'Welcome to the Trading Post - set up shop or just come for the sales!' (yeah, corny, I know [​IMG]).

    And while I am at it: in-game zone parameter settings, something like '/ag zone config add prevent.nodes blocks.ignite', would be fantastic.
  24. Offline


    @GyD - I have not implemented AG with the newest version of GroupManager yet, that is my only guess for the error.

    @sunkid - Thanks for the input. and ya, i'll see what I can do about leaving backwards compatibility for now.
    Concerning zones, they are all on my todo list :) I also have some unique features that I think will make zone creation easier, but am still in the process of making sure it will work the way I want before I drop any hints.
  25. Offline


    Ok ^^ i keep the oudated version for now :) thx
  26. Offline

    Kevin Forte

    Hmm oddly enough, Anti-Grief will not load for me as it says that it cannot detect GroupManager or Permissions when I have Permissions; any idea as to why?
  27. Offline


    @KevinForte - I had removed permission support when doing some testing and forgot to put it back in. It will be available in the next update. AG will use recommended bukkit 527 GroupManager 1.0 alpha 5 and Permisisons 2.5.4
  28. Offline


    how do i get groupmanager? i can't use any plugins that have that requirement or "permissions" idk what those are im new to minecraft servers a bit.
  29. Offline


  30. Offline


    I want to simply use this to disable Creepers and prevent guests from using items. I want TNT to function. How do I do this?
    Shameless self bump.
  31. Offline


    @but2002 - sorry, I am currently out of town. But if you want to disable creepers on everyone and all your groups inherit from a base group, you can add the antigrief.prevent.entity.creeper permission to what I believe for you would be the guest group. Then to prevent items on guests add antigrief.prevent.item.use on guests, then on the next level use antigrief.allow.item.use (That should accomplish what you want). TNT is based on interacting/breaking the block, so this settings won't touch TNT.

Share This Page