WEprotect

This is a plugin I have currently incorporated into my creative server. It is used to protect players from world edits. If you would like to come check out my creative server connect at play.efcraft.net.

The way it works is, first it computes the corners of a world edit. If those two corners are within the same region, then it checks if the player using the command is the owner (or member depending on config options) of all regions in those two points. If these conditions are true, then the world edit is allowed to happen. Otherwise the world edit is stopped.

These are the commands that are protected. If a player has the override permission, then they are allowed to use the command.

WorldEdit Command and Override permission

//copy: weprotect.override.copy
//cut: weprotect.override.cut
//cyl: weprotect.override.cylinder
//deform: weprotect.override.deform
//drain: weprotect.override.drain
//ex: weprotect.override.extinguish
//ext: weprotect.override.extinguish
//extinguish: weprotect.override.extinguish
//faces: weprotect.override.faces
//fill: weprotect.override.fill
//fillr: weprotect.override.fill.recursive
//fixlava: weprotect.override.fixlava
//fixwater: weprotect.override.fixwater
//g: weprotect.override.shape
//gen: weprotect.override.shape
//generate: weprotect.override.shape
//green: weprotect.override.green
//hcyl: weprotect.override.cylinder
//hollow: weprotect.override.hollow
//hpyramid: weprotect.override.pyramid
//hsphere: weprotect.override.sphere
//naturalize: weprotect.override.naturalize
//outline: weprotect.override.faces
//overlay: weprotect.override.overlay
//paste: weprotect.override.paste
//pyramid: weprotect.override.pyramid
//re: weprotect.override.replace
//regen: weprotect.override.regen
//removeabove: weprotect.override.removeabove
//removebelow: weprotect.override.removebelow
//removenear: weprotect.override.removenear
//rep: weprotect.override.replace
//replace: weprotect.override.replace
//replacenear: weprotect.override.replacenear
//set: weprotect.override.set
//setbiome: weprotect.override.biome.set
//smooth: weprotect.override.smooth
//snow: weprotect.override.snow
//sphere: weprotect.override.sphere
//thaw: weprotect.override.thaw
//walls: weprotect.override.walls
/ex: weprotect.override.extinguish
/ext: weprotect.override.extinguish
/extinguish: weprotect.override.extinguish
/fixlava: weprotect.override.fixlava
/fixwater: weprotect.override.fixwater
/green: weprotect.override.green
/removeabove: weprotect.override.removeabove
/removebelow: weprotect.override.removebelow
/removenear: weprotect.override.removenear
/replacenear: weprotect.override.replacenear
/snow: weprotect.override.snow
/thaw: weprotect.override.thaw

Override Group permissions

weprotect.override.all  -- Allow all commands anywhere
weprotect.override.region -- Allow region commands anywhere
weprotect.override.clipboard -- Allow clipboard comands anywhere
weprotect.override.generation -- Allow generation commands anywhere
weprotect.override.utility -- Allow utility commands anywhere

These groupings are based on the groupings described in WorldEdit's wiki page: http://wiki.sk89q.com/wiki/WorldEdit/Reference

WEprotect Commands And Permissions

  • /weprotect help -- displays help for the plugin
  • * weprotect.help
  • /weprotect reload -- Loads config file from disk
  • * weprotect.reload

WEprotect config file

weProtectWorlds:
- world
- world1
- world2
weProtectCheckWorlds: false
weProtectOpsExempt: false
weProtectCheckOwnerOfAll: true
weProtectCheckMemberOfAll: false
weProtectCheckOwnerOfAny: false
weProtectCheckMemberOfAny: false
weProtectCheckBuild: false
weProtectDebug: false
  • weProtectWorlds -- Worlds that are checked
  • weProtectCheckWorlds -- Set to true if you want to only check worlds listed in weProtectWorlds
  • weProtectOpsExempt -- Set this to true if you want ops to be exempt from checks
  • For each check, only one of the checks has to pass in order for the world edit to succeed.
  • Setting all checks to false will result in all checks failing
  • Doing the "All" checks has priority over the "Any" checks, so disable "All" checks if you prefer "Any"
  • weProtectCheckOwnerOfAll -- Set this to true to check if the player is the owner of all regions in the worldedit area
  • weProtectCheckMemberOfAll -- Set this to true to check if the player is the member of all regions in the worldedit area
  • weProtectCheckOwnerOfAny -- Set this to true to check if the player is the owner of only one of the regions in the worldedit area
  • weProtectCheckMemberOfAny -- Set this to true to check if the player is the owner of only one of the regions in the worldedit area
  • weProtectCheckBuild -- Set this to true to check if the player has build perms for the region
  • weProtectDebug -- Set to true to enable debug mode in game. With this enabled a diamond block is placed where points are checked

There are a couple commands that I was not able to protect against due to the nature of the commands: /pumpkins and /forestgen

At this time I do not have support for worldedit brushes, but it is something I am planning on adding in the future.

Dependencies: WorldGuard http://dev.bukkit.org/bukkit-plugins/worldguard/ WorldEdit http://dev.bukkit.org/bukkit-plugins/worldedit/

TODO:

  • Add support for pumpkins and genforest command
  • Add support for world edit brushes
  • Add support for long reach mode in WorldEdit

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    73537
  • Created
    Jan 30, 2014
  • Last Released File
    Feb 1, 2014
  • Total Downloads
    1,940
  • License

Categories

Members

../../Controllers/Backend/AuthController.cs

Recent Files