IMPORTANT: Due to the massive amount of changes between 1.1.0 and 1.2.0, you will need to backup then delete the following :
- ./plugins/GriefDefender/global.conf
- ./plugins/GriefDefender/lang
This will allow the new version of GD to regenerate these files with the latest changes.
Custom Flag System
This update brings forth a brand new feature that I'm sure will make many administrators excited : The Custom Flag System.
This system allows you to create custom flag groups along with definitions that GD will use to generate a GUI for your users and staff.
GD 1.2.0 ships with 2 delivered flag groups to help administrators get started. Below is an example of the config that will be generated.
Code (Text):
# Used to define a group of custom flags for players/admins.
# Each group defined will be displayed in the flag GUI for users.
# Groups can have the following settings :
# enabled=<true|false>: Whether the group is enabled.
# admin-group=<true|false>: Whether this group is considered for admin use only.
# hover=<text>: The hover text to be displayed when hovering over group name in GUI.
# title=<text>: The title text to be used for TAB display.
# value=<true|false>: This is used to set a default value for the flag definition. It is only used in conjunction with 'override=<type>, default=<type> settings.
# contexts=["key=value"]: A list of optional definition contexts that will be applied to all permissions.
# Note: This is primary used with 'default' and 'override' contexts. Ex. contexts=["default=global"]
# Each group will have an associated permission in order to be viewable.
# The 'user' group will use the permission : 'griefdefender.custom.flag.group.user'
# The 'admin' group will use the permission : 'griefdefender.custom.flag.group.admin'
# Within each group, you can define flag definitions.
# Each flag definition must be defined in the following format:
# enabled: Controls whether the definition is enabled. Accepts a value of 'true' or 'false'
# description: The flag description to display on hover. Uses the legacy text format.
# permissions: The list of permissions to link to definition. Each permission accepts the following contexts :
# flag=<linked-flag>: This context is used to link the permission to a GD specific flag. Ex. 'flag=block-break' would link permission to GD's block-break flag
# source=<id>: This context is used to specify a source id such as 'minecraft:creeper'.
# target=<id>: This context is used to specify a target id such as 'minecraft:chest'.
# state=<properties>: This context is used to specify a blockstate property such as 'state=lit:true'.
# Note: Required if no source or target context is specified, the permission will default to ALL.
# Note: Available contexts are : flag, source, target, state, used_item, item_name
# These contexts may change, See https://github.com/bloodmc/GriefDefender/wiki for latest information.
custom-flags {
groups {
admin {
# Set to true if this flag group is for admin use only.
# Note: If admin group, the permission is 'griefdefender.admin.custom.flag.<groupname>
# Note: If user group (admin set false), the permission is 'griefdefender.user.custom.flag.<groupname>
admin-group=true
definitions {
block-break {
contexts=[
"gd_claim_default=global"
]
description="Controls whether blocks can be broken."
enabled=true
permissions=[
"flag=block-break"
]
}
block-grow {
contexts=[
"gd_claim_default=global"
]
description="Controls whether blocks can grow."
enabled=true
permissions=[
"flag=block-grow"
]
}
block-place {
contexts=[
"gd_claim_default=global"
]
description="Controls whether blocks can be placed."
enabled=true
permissions=[
"flag=block-place"
]
}
block-spread {
contexts=[
"gd_claim_default=global"
]
description="Controls whether blocks can spread."
enabled=true
permissions=[
"flag=block-spread"
]
}
enderpearl {
contexts=[
"gd_claim_default=global"
]
description="Controls whether enderpearl can be used."
enabled=true
permissions=[
"flag=interact-item-secondary, source=minecraft:enderman"
]
}
exp-drop {
contexts=[
"gd_claim_default=global"
]
description="Controls whether experience orbs can drop."
enabled=true
permissions=[
"flag=entity-spawn, target=minecraft:xp_orb"
]
}
explosion-block {
contexts=[
"gd_claim_default=global"
]
description="Controls whether explosions affect blocks."
enabled=true
permissions=[
"flag=explosion-block"
]
}
explosion-entity {
contexts=[
"gd_claim_default=global"
]
description="Controls whether explosions affect entities."
enabled=true
permissions=[
"flag=explosion-entity"
]
}
fall-damage {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can take fall damage."
enabled=true
permissions=[
"flag=entity-damage, target=minecraft:player, source=minecraft:fall"
]
}
interact-block {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can interact with blocks.\n&bNote&f: This does not include inventory blocks such as chests."
enabled=true
permissions=[
"flag=interact-block-secondary, source=minecraft:player"
]
}
interact-entity {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can interact with entities.\n&bNote&f: This does not include chest access with entities such as horses."
enabled=true
permissions=[
"flag=interact-entity-secondary, source=minecraft:player"
]
}
interact-inventory {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can interact with inventory."
enabled=true
permissions=[
"flag=interact-inventory, source=minecraft:player"
]
}
invincible {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players are invincible against damage."
enabled=true
permissions=[
"flag=entity-damage, target=minecraft:player"
]
}
item-drop {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can drop items."
enabled=true
permissions=[
"flag=item-drop, source=minecraft:player"
]
}
item-pickup {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can pickup items."
enabled=true
permissions=[
"flag=item-pickup, source=minecraft:player"
]
}
monster-damage {
contexts=[
"gd_claim_default=global"
]
description="Controls whether monsters can deal damage."
enabled=true
permissions=[
"flag=entity-damage, source=#monster"
]
}
pistons {
contexts=[
"gd_claim_default=global"
]
description="Controls whether pistons can be used."
enabled=true
permissions=[
"flag=interact-block-secondary, target=minecraft:piston"
]
}
portal-use {
contexts=[
"gd_claim_default=global"
]
description="Controls whether portals can be used."
enabled=true
permissions=[
"flag=interact-block-secondary, target=#portal, source=minecraft:player"
]
}
spawn-ambient {
contexts=[
"gd_claim_default=global"
]
description="Controls whether ambients, such as bats, can spawn."
enabled=true
permissions=[
"flag=entity-spawn, target=#ambient"
]
}
spawn-animal {
contexts=[
"gd_claim_default=global"
]
description="Controls whether animals, such as cows and pigs, can spawn."
enabled=true
permissions=[
"flag=entity-spawn, target=#animal"
]
}
spawn-aquatic {
contexts=[
"gd_claim_default=global"
]
description="Controls whether aquatics, such as squids and guardians, can spawn."
enabled=true
permissions=[
"flag=entity-spawn, target=#aquatic"
]
}
spawn-monster {
contexts=[
"gd_claim_default=global"
]
description="Controls whether monsters, such as creepers and skeletons, can spawn."
enabled=true
permissions=[
"flag=entity-spawn, target=#monster"
]
}
teleport-from {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can teleport from this claim."
enabled=true
permissions=[
"flag=entity-teleport-from, target=minecraft:player"
]
}
teleport-to {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can teleport to this claim."
enabled=true
permissions=[
"flag=entity-teleport-to, target=minecraft:player"
]
}
use {
contexts=[
"gd_claim_default=global"
]
description="Controls whether players can use non-inventory blocks in this claim."
enabled=true
permissions=[
"flag=interact-block-secondary, source=minecraft:player",
"flag=interact-entity-secondary, source=minecraft:player"
]
}
vehicle-destroy {
contexts=[
"gd_claim_default=global"
]
description="Controls whether vehicles can be destroyed."
enabled=true
permissions=[
"flag=entity-damage, target=#vehicle"
]
}
wither-damage {
contexts=[
"gd_claim_default=global"
]
description="Controls whether withers can do damage."
enabled=true
permissions=[
"flag=entity-damage, source=minecraft:wither"
]
}
}
enabled=true
# The hover text to be displayed when hovering over group name in GUI.
hover=""
# The title text to be used for TAB display.
title=""
}
user {
# Set to true if this flag group is for admin use only.
# Note: If admin group, the permission is 'griefdefender.admin.custom.flag.<groupname>
# Note: If user group (admin set false), the permission is 'griefdefender.user.custom.flag.<groupname>
admin-group=false
definitions {
chest-access {
description="Controls whether a player can access chest inventories."
enabled=true
permissions=[
"flag=interact-block-secondary, target=minecraft:chest, source=minecraft:player",
"flag=interact-inventory, target=minecraft:chest, source=minecraft:player"
]
}
chorus-fruit-teleport {
description="Controls whether a player can use chorus fruit to teleport."
enabled=true
permissions=[
"flag=interact-item-secondary, target=minecraft:chorus_fruit"
]
}
crop-growth {
description="Controls whether crops can grow."
enabled=true
permissions=[
"flag=block-grow, target=#crop"
]
}
damage-animals {
description="Controls whether animals can be damaged."
enabled=true
permissions=[
"flag=entity-damage, target=#animal"
]
}
enderman-grief {
description="Controls whether enderman can grief."
enabled=true
permissions=[
"flag=entity-damage, source=minecraft:enderman"
]
}
enter-player {
description="Controls whether a player can enter this claim."
enabled=true
permissions=[
"flag=enter-claim, source=minecraft:player"
]
}
explosion-creeper {
description="Controls whether a creeper can explode."
enabled=true
permissions=[
"flag=explosion-block, source=minecraft:creeper",
"flag=explosion-entity, source=minecraft:creeper"
]
}
explosion-tnt {
description="Controls whether tnt can explode."
enabled=true
permissions=[
"flag=explosion-block, source=minecraft:tnt",
"flag=explosion-entity, source=minecraft:tnt"
]
}
fire-damage {
description="Controls whether fire can cause damage."
enabled=true
permissions=[
"flag=block-modify, source=minecraft:fire"
]
}
fire-spread {
description="Controls whether fire can spread."
enabled=true
permissions=[
"flag=block-spread, source=minecraft:fire"
]
}
grass-growth {
description="Controls whether grass can grow."
enabled=true
permissions=[
"flag=block-grow, target=minecraft:grass"
]
}
ice-form {
description="Controls whether ice can form."
enabled=true
permissions=[
"flag=block-modify, target=minecraft:ice"
]
}
ice-melt {
description="Controls whether ice can melt."
enabled=true
permissions=[
"flag=block-modify, target=minecraft:water"
]
}
lava-flow {
description="Controls whether lava can flow."
enabled=true
permissions=[
"flag=liquid-flow, source=minecraft:flowing_lava"
]
}
leaf-decay {
description="Controls whether leaves can decay."
enabled=true
permissions=[
"flag=leaf-decay"
]
}
lighter {
description="Controls whether a player can use flint and steel."
enabled=true
permissions=[
"flag=interact-item-secondary, target=minecraft:flint_and_steel"
]
}
lightning {
description="Controls whether lightning can cause harm."
enabled=true
permissions=[
"flag=entity-damage, source=minecraft:lightning_bolt"
]
}
mycelium-spread {
description="Controls whether mycelium can spread."
enabled=true
permissions=[
"flag=block-spread, target=minecraft:mycelium"
]
}
pvp {
description="Controls whether PvP combat is allowed."
enabled=true
permissions=[
"flag=entity-damage, target=minecraft:player, source=minecraft:player"
]
}
ride {
description="Controls whether vehicles(including animals) can be mounted."
enabled=true
permissions=[
"flag=entity-riding, target=#vehicle, source=minecraft:player"
]
}
sleep {
description="Controls whether players can sleep in beds."
enabled=true
permissions=[
"flag=interact-block-secondary, target=minecraft:bed, source=minecraft:player"
]
}
snow-fall {
description="Controls whether snow can fall."
enabled=true
permissions=[
"flag=block-place, target=minecraft:snow_layer"
]
}
snow-melt {
description="Controls whether snow can melt."
enabled=true
permissions=[
"flag=block-break, target=minecraft:snow_layer"
]
}
soil-dry {
description="Controls whether soil will dry."
enabled=true
permissions=[
"flag=block-modify, state=moisture:0"
]
}
vehicle-place {
description="Controls whether vehicles(boats, minecarts, etc.) can be placed."
enabled=true
permissions=[
"flag=block-place, target=#vehicle"
]
}
water-flow {
description="Controls whether water can flow."
enabled=true
permissions=[
"flag=liquid-flow, source=minecraft:flowing_water"
]
}
}
enabled=true
# The hover text to be displayed when hovering over group name in GUI.
hover=""
# The title text to be used for TAB display.
title=""
}
}
}
As shown in config, there are 2 groups defined : ADMIN and USER. When GD launches, the above configuration is read and generates a flag GUI with each group in its own tab. Here are some screenshots of how it looks in game.
Note: Everything you see is controlled by permissions.
And here is a screenshot showing the original GUI from 1.1.0 but redesigned for admins use only.
As you can see from above, this is only the delivered setup. You have the ability to create whatever you want. The possibilities are endless once you learn how to configure flags for your players.
Economy Mode
For many servers that have used GriefPrevention in the past, it was very common to allow players to buy and sell blocks with currency using an economy plugin. While this is good in a sense that it gives value to claim blocks, it also requires you to have both systems to co-exist. The claim block system and an economy system.
With GriefDefender's economy mode, you can completely move to an economy based system for claiming. When a player creates a claim, they are presented with an amount as shown below
You also have the ability to keep claim block task accrual as an extra way for players to earn income. The only difference will be they earn currency rather than claim blocks.
The amount per block is controlled by the option 'economy-block-cost'. The sell return cost is controlled by option 'economy-block-sell-return'. Options (also known as meta) are stored with permissions and give you complete control of how you want them to be applied to users and groups.
Option System
The option system has been completely rehauled in 1.2.0. It now mimics the same permission lookups as flags to make things more consistent for administrators.
In previous versions, one big issue was not being able to apply options easily. To solve this issue, I have created a brand new option GUI for administrators to use. Below is a screenshot of how it looks
Any option that represents a number can be toggled with the left and right arrows. Each arrow reduces or increases the amount by 1. Options without arrows are simply toggles.
For a full list of available options, see
https://github.com/bloodmc/GriefDef...efdefender/api/permission/option/Options.java
Ban System
You now have the ability to ban any item, block, or entity. The commands used are
- '/claimban hand | <type> <target> <message>'
- '/claimunban hand | <type> <target>'
Valid types are : item, block, and entity.
Message allows you to link a ban with a deny message to players. It supports minecraft's legacy text format.
If you are unsure what the id is for a specific item or block, you can use '/claimban hand' which will automatically resolve the registered id for item/block in hand.
A ban list command will be added in future update so for now you can only view current bans from config.
Here are 2 screenshots showing enderpearl being banned
Below is a sample config generate for bans
Code (Text):
# Controls which item/block/entity id's are banned globally from all events.
# Note: Id's support wildcards '?' and '*' by using Apache's wildcard matcher.
# The wildcard '?' represents a single character.
# The wildcard '*' represents zero or more characters.
# For more information on usage, see https://commons.apache.org/proper/commons-io/javadocs/api-2.5/org/apache/commons/io/FilenameUtils.html#wildcardMatch(java.lang.String,%20java.lang.String)
bans {
blocks {}
entities {}
items {
"minecraft:ender_pearl"="&cEnderpearl usage has been banned on this server. Contact administrator for more info."
}
}
French Language Support
FR is now a supported language thanks to the contribution and dedicated hard work of
Ark'I'Dian
Russian Language Support
RU is now a supported language thanks to the contribution and dedicated hard work of
Polyacov_Yury.
Quality of Life Changes
All abandon and delete claim commands now have confirmations to prevent accidental removal of claims.
New /giveblocks command
1.14.x Raid support!
Raids can also be controlled via the 'raid' option.
And much more....
Changelog
Now for the long list of changes....
Code (Text):
* Implement custom flag system to allow admins to create any flag they desire with contexts.
See wiki for more info.
* Rewrite option and flag GUI's to be more user friendly.
* Refactor permission handling to support more permission plugins.
* Refactor permission lookups to use storage directly for better context handling
* Refactor option system to support generics.
* Add many new options.
See https://github.com/bloodmc/GriefDefenderAPI/blob/master/src/main/java/com/griefdefender/api/permission/option/Options.java
* Add new permission 'griefdefender.user.claim.option' to control what options user's can use
in their claims. Ex. If a user tries to use 'player-deny-fly', GD will check 'griefdefender.user.claim.option.player-deny-fly'
* Added the following permissions to allow admins to designate a player to manage options
'griefdefender.admin.claim.command.option.group.{type}'
'griefdefender.admin.claim.command.option.player.{type}'
* Add new claim restore setting 'auto-schematic-restore'.
This setting will allow servers to have newly created claims auto-generate a schematic.
When these claims expire, the auto-generated schematic will be used for restore.
Note: This setting is only designed for newly created worlds where players cannot build
in the wilderness. Use with caution and read comments carefully.
* Add new message setting 'enter-exit-chat-type'.
This setting is used to control the default chat type (Chat/ActionBar/Title) used when sending
enter/exit claim messages to players.
Note: This can be overridden by plugins.
* Add support for controlling raids. You can find the new toggle in /raid
* Add various GP command aliases to make it easier for users transitioning to GD
* Add confirmations for all claim delete commands.
* Add GPFlags migrator.
Note: When the GP Bukkit migrator is enabled, GD will automatically look for GPFlags data and migrate
with claim data.
* Add support for EntityCombustByBlockEvent, EntityCombustByEntityEvent, and EntityDamageByBlockEvent.
* Add EssentialsX hook to deny '/fly' command when 'player-deny-flight' is true for a user
* Add event result cache.
* Add contexts to hover in '/cf' command
* Add /givepet command
* Add confirmations to abandon and delete commands
* Add support for /sellblocks in economy mode
* Add new messages for economy mode
* Add explosion pre support.
* Add extra teleport check for claim corners.
* Add additional overlay/style for custom flags.
* Add javadocs for PermissionProvider.
* Add many improvements to custom flag GUI.
* Fix NPE during checkSizeLimits
* Fix interactions with custom inventories.
* Fix custom flags not showing up in '/cf' command.
* Fix interact-inventory denying action when interact-block-secondary is true
* Fix interact-inventory not checking entity ids.
* Fix shovel location being reset with insufficient blocks
* Fix GP Bukkit migrator not handling subdivisions properly.
* Fix 'block-break' flag being ignored in wilderness
* Fix invalid playerdata UUID files being loaded causing errors in console.
* Fix HashSet error in TaxApplyTask
* Fix 'command-execute' flag
* Fix PvP setting in /claiminfo.
* Fix claim overrides not checking default group.
* Fix various message issues
* Fix 'minecraft:air' showing up as used_item context.
* Fix EntityChangeBlockEvent user tracking.
* Fix abandonclaims not returning blocks to player.
* Fix players not being able to use pet inventories in other claims.
* Fix players being kicked when using gd callbacks.
* Fix '/cf' display issues
* Fix '/cf' mod id not being set properly with contexts
* Fix '/cf' item id context lookups
* Fix '/scb' command
* Fix '/gddebug' start/end time.
* Fix economy plugin detection
* Fix economy mode buy/sell not applying proper funds
* Fix ClaimBlocks task not depositing funds while in economy mode
* Fix user custom flag GUI init not showing USER group.
* Fix item frame protection during explosions.
* Fix entity-spawn not being triggered with slime splits.
* Fix 'SouthCorners' lang translation in /claiminfo.
* Fix 'explosion-entity' flag.
* Fix shovel visual not hitting leaves.
* Prevent /buyblocks working in economy mode
* Remove economy mode check from /scb and /acb
* Rewrite option and flag GUI's to be more user friendly.
* Improve PermissionHolderCache
* Refactor permission handling to support more permission plugins.
* Refactor permission lookups to use storage directly for better context handling
Note: '/lp verbose' will no longer be able to track GD flag lookups.
* Increase cache to 30min
* Change gddebug paste site to griefdefender.github.io
Well that about wraps it up for another major update. I hope you all enjoy it as much as I did developing it =)
Thanks again for the support!