Commit Graph

175 Commits

Author SHA1 Message Date
bloodshot eb7cb16fe8 Remove leftover debug. 2020-01-16 20:54:51 -05:00
bloodshot b8c3bfe820 Fix users accessing trust without permission. 2020-01-16 19:28:19 -05:00
bloodshot 89e57c17ba Improve User Flag GUI.
User Flag GUI will no longer show values as 'undefined'. Instead, if no
claim value is found then the default value will be displayed instead.
This should be more friendly for end-users.

* Fix sponge /givepet command.
* Add 'protect-tamed-entities' claim config to allow protection for tamed entities such as horses. This new config setting is enabled by default.
2020-01-12 00:31:24 -05:00
bloodshot a170a5cef0 Move assets to common folder. 2020-01-09 19:53:00 -05:00
bloodshot ebe0e49745 Fix claim context calculators. 2020-01-09 14:18:46 -05:00
bloodshot eca403bf1d Fix wrong permission for claim reserve. 2020-01-09 11:40:02 -05:00
bloodshot ab6db04328 Add chat recording feature for all command GUI's.
* Improve '/trustlist' command.
  Note: This command now supports adding and removing trusted users and
  groups.
* Improve '/claiminfo' command.
  Note: Trusted users will now link to the improved '/trustlist' command.
* Fix sizing for various GUI's. All GUI's should now fill screen.
2020-01-08 23:59:26 -05:00
bloodshot 9014c93633 Bump version to 1.2.5 2020-01-06 16:30:59 -05:00
bloodshot d5213a3d64 Various enhancements.
* Add '/claimreserve' command for administrators to reserve claim names.
* Add support for untrusting specific type via all untrust commands.
* Add #pet context support.
* Hide teleport button if player does not have access to teleport.
* Fix pagination error when swapping between menu's.

Fixes #8
Fixes #25
Fixes #26
Fixes #91
Fixes #93
2020-01-06 16:24:24 -05:00
bloodshot 0d870c2a70 Validate claim type permissions when using '/claimcreate'. 2020-01-03 09:40:16 -05:00
bloodshot 6169644109 Allow DynmapProvider to hide claim's by UUID. 2020-01-03 00:56:13 -05:00
bloodshot 0629618946 Fix NPE using '/cf' command with no value. Fixes #86 2020-01-01 21:21:05 -05:00
bloodshot 8743c5fe96 Don't add active contexts during getPermissionValue calls.
* Fix 'entity-spawn' flag lookups with wrong context.
2020-01-01 19:43:36 -05:00
bloodshot cccb3c79d5 Add server context to getPermissionValue calls. 2020-01-01 16:34:01 -05:00
bloodshot 1ac3ad932e Fix getOptionValue without server context.
* Disable weather change message.
2019-12-31 23:49:45 -05:00
bloodshot 63005e72f8 More fixes on handling of server contexts. Fixes #88
* Server contexts will be automatically added if not found on set.
* Flag definitions will automatically add a server context if none is
found on deserialization.
* Option and Flag GUI will fallback to no server context if none is
found.
2019-12-31 22:42:15 -05:00
bloodshot 90d7db65cc Add server context support. Fixes #88
* Fix user permission check.
* Add check for max inspection distance.
* Add radius-inspect option to config.
* Add active contexts when checking permissions.
2019-12-31 20:14:33 -05:00
bloodshot 3c1a515e34 bukkit: Fix '/cfg' and '/cog' commands. 2019-12-31 16:15:16 -05:00
bloodshot 039087cac7 Deny teleport to non-trusted users if no permission.
* Allow teleports to non-trusted if claim is for sale and they have
permission to teleport.
2019-12-31 12:37:33 -05:00
bloodshot 0ec94bb2cb Add option default value for list type. 2019-12-31 04:19:04 -05:00
bloodshot 091106308b More improvements for Option GUI.
* Fix missing options from claim tab.
* Fix '/claimlist' showing claims to non-trusted users.
* Fix setOptionValue return result.
* Fix wrong version in 'plugin.yml'.
* Force local weather change to player on toggle.
* Add missing fr_FR translations.
2019-12-31 04:04:18 -05:00
bloodshot dde267d997 Fix NPE when using flag command. 2019-12-30 18:50:20 -05:00
bloodshot 436f053fbe Finish implementing options for next major release.
* Fixed '/cfg' and '/cog' commands.
* Fixed 'create-mode' not working as intended.
* Fixed 'any' usage with flag commands.
* Fixed 'command-execute' usage.
* Fixed 'command-execute-pvp' usage.
* Fixed option removal/save with LP v5.
* Added context support for controlling user flag command usage.
* Added context support to option GUI.
* Added permission 'griefdefender.user.claim.command.flag.arg' which controls if a user can use flag command with arguments.
* Added permission 'griefdefender.user.claim.command.flag.gui' which controls if a user can use flag GUI.
* Added new group context '#all' which can be used to represent all sources or targets.
* Removed 'max-claim-inspection-distance' from config as it is now controlled by 'radius-inspect' option.
* Removed 'combat-timeout' from config as it is now controlled by 'pvp-combat-timeout' option.
* Implemented the folloing new options
  'player-command-enter' - Handles executing commands when a player enters a claim.
  'player-command-exit' - Handles executing commands when a player exits a claim.
   Note: both command options support the following placeholders : %player%, %owner%, %uuid%, %world%, %server%, %location%

  'player-gamemode' - Used to determine the gamemode of a player when entering a claim.
  'player-deny-godmode' - Used to determine if a player can be in godmode when entering a claim.
  'player-walk-speed' - Controls the player walk speed when entering a claim.
  'player-weather' - Controls player local weather when entering a claim.
  'pvp-combat-command' - Used to determine if a player can use commands during PvP combat.
  'pvp-combat-teleport' - Used to determine if a player can teleport during PvP combat.
  'pvp-combat-timeout' - Used to determine how many seconds PvP combat is considered to continue after the most recent damage.
  'radius-inspect' - Controls the radius in blocks to search within when inspecting for claims.
  'spawn-limit' - Used to control the spawn limit for a specific set of entities in a claim.
* Only save once when toggling flag definitions that include multiple definitions.
2019-12-30 18:27:37 -05:00
bloodshot 9bd3436a55 Fix gradle jar output. 2019-12-28 17:26:37 -05:00
bloodshot 69cb3c6728 Fix debug filter with usernames. 2019-12-28 12:55:22 -05:00
bloodshot 217d5aecb8 Improve PvP checks. 2019-12-28 12:45:25 -05:00
bloodshot 772a8d077e Update LuckPermsProvider to v5. 2019-12-28 12:35:03 -05:00
John cad082bdcd Improve de_DE translations (#87) 2019-12-26 19:38:41 -05:00
YoSuboDeToh c74f578692 Add es_ES language support. 2019-12-24 11:14:41 -05:00
bloodshot 53ad9e1f84 bukkit: Update PEX permission provider. 2019-12-23 09:16:17 -05:00
bloodshot 57357bf4d8 Fix NoSuchMethodError during teleport. 2019-12-23 08:41:26 -05:00
bloodshot 309f0f237c Fix door spam allowing player access. 2019-12-22 12:33:46 -05:00
bloodshot eec002a377 Fix Flag GUI toggle. Fixes #84 2019-12-21 20:26:34 -05:00
bloodshot 7aeb9f1333 Fix wrong encoding in de_DE lang file. 2019-12-20 22:46:50 -05:00
bloodshot f17b45fd68 Update API for FlagDefinition update. 2019-12-19 18:19:52 -05:00
bloodshot 75fbcebb58 Implement FlagDefinition API. 2019-12-19 17:43:16 -05:00
andrepl f2a13b9539 Fix teleport cancelled message showing after successful teleport. (#72) 2019-12-15 15:41:55 -05:00
bloodshot 699cc3bb97 Update plugin.yml for 1.2.3 release. 2019-12-11 18:42:02 -05:00
bloodshot 5f3992fd60 Add MC 1.15 support. 2019-12-11 11:51:39 -05:00
DrWurzeli d22fdc0196 Add de_DE language support. 2019-12-08 17:29:17 -05:00
bloodshot f3ac02782c More improvements and bug fixes.
* Add PlaceholderAPI support. See https://github.com/bloodmc/GriefDefender/wiki/PlaceholderAPI
* Add Dynmap support. See https://github.com/bloodmc/GriefDefender/wiki/Dynmap
* Fix /claimexpand and /claimcontract up and down directions.
* Fix create claim location cache not clearing properly on delete.
* Fix being unable to interact with doors with access trust if holding an item.
* Fix getAllPlayerClaims not accounting for global playerdata.
* Avoid migrating empty claim files during GP migration.

Fixes #71, Fixes #73, Fixes #75
2019-12-07 16:50:56 -05:00
bloodshot 3a8de49049 Fix world permission checks.
* Ignore item frames during entity-chunk-spawn checks.
2019-12-02 22:18:04 -05:00
bloodshot 4433d9c2f3 Force save after claim migration. 2019-12-02 16:11:12 -05:00
bloodshot 8b4239452d Add proper gradle support. 2019-11-19 13:11:47 -05:00
bloodshot 2f7da6a633 More fixes for next release.
* Fix /buyblocks command adding to accrued instead of bonus blocks.
* Fix various relocation issues causing plugin event listeners not to be
registered.
* Move visual revert and claim creation cancel to shift right-click.
Note: With this change, visuals will no longer revert on left-click and/or item change.
* Add support to visualize claims, using left-click, during claim creation.
* Add teleport support for BorderClaimEvent.
* Add support for Java 13.
* Update FR/RU lang files. Thanks to Ark'I'Dian and Polyacov for
translations.

Fixes #67
Fixes #68
Fixes #70
2019-11-19 11:40:46 -05:00
bloodshot 90eed11bea First round of fixes for 1.2.3 release.
* Fix funds not being returned after claim create failure in economy
mode.
* Fix '/gd option claim' command with global options such as
'economy-block-cost'.
* Fix schematics not loading on startup.
* Fix claim cleanup task.
* Remove item frame defaults.
* Add '/claimcreate <radius> [type]' command. Used to create a claim
around player.
* Add new direction parameter 'all' for commands '/claimexpand' and
'/claimcontract'.
* Add confirmation to '/cfr' command.

Fixes #59
Fixes #63
Fixes #64
Fixes #65
Fixes #66
2019-10-30 10:44:33 -04:00
bloodshot 7d6654aa39 More stability fixes for 1.2.2.
* Fix inspection tool interact on right-click when targetting a block.
* Fix custom flags being applied twice.
* Fix entity type NPE.
* Fix /claimlist user trust.
* Fix /claimlist usage with player name.
* Fix LP provider hasPermission check.
* Fix item frame transient defaults in wilderness.
2019-10-09 16:28:35 -04:00
bloodshot d92365e50a More fixes and improvements for 1.2.2 release.
* Fix flags being reset on claim deletion.
* Fix user claim flag permission check.
* Fix sign interaction not using proper flag 'interact-block-secondary'.
* Fix '/claimexpand' and '/claimcontract' tab completion.
* Fix 'entity-damage' flag attempting to protect dropped items.
* Fix 'player-keep-inventory' not clearing drops on death.
* Fix 'player-keep-level' not clearing XP drops on death.
* Fix EntityChangeBlockEvent using wrong source location.
* Fix claim create mode triggering twice on first right-click.
* Fix default/override claim types not showing up properly in Flag GUI.
* Fix entity-damage flag not using proper user on left-click.
* Fix abandon-delay default value.
* Remove ability to resize claims when auto-schematic-restore is enabled.
* Add support for setting no modification/investigation tool in config.
* Add '/claim', '/gd mode claim' command to toggle a new claim mode for inspecting and claim creation.
* Add 'combat-timeout' pvp setting to config to control how long a player stays in pvp combat after an attack.
* Implement 'abandon-delay' option.
* Implement 'player-teleport-delay' option.
* Implement 'pvp' option.
  - When a player attempts to attack another player, both players must have pvp allowed.
  If 1 player is not allowed to PvP, the attack will be cancelled.
* Improve '/claimlist' command.
  - Only trusted claims will be shown to users.
  - Admins can use '/ignoreclaims' to see all claims.
  - Fixed server crash if too many claims were listed.
  - Fixed subdivision filter.
* Improve '/claimspawn' command.
  - The command now takes the following arguments  '/claimspawn [name] [player]'
  Ex. If you want to spawn in a claim that you own named 'lair', you would enter '/claimspawn lair'
  Ex. If you want to spawn in a claim owned by 'Mike' named 'stables', you would enter '/claimspawn stables mike'
* Improve flag definition defaults.
* Improve flag default configuration.

Fixes #51, Fixes #53, Fixes #54
Fixes #55, Fixes #56, Fixes #57
2019-09-18 11:28:49 -04:00
bloodshot 4ca3d78709 More fixes for 1.2.2 release.
* Fix claim inheritance.
* Fix getPermissionValue not continuing after matching contexts.
* Fix messages being sent to players during entity attacks.
* Fix item frame protection.
* Fix safe teleport being used for /claimspawn (temp fix)
* Fix safe teleport ending above nether.
* Fix PvP toggle not showing proper default value in /claiminfo.
* Fix a few issues with option GUI.
* Add /claimexpand <amount> [direction] and /claimcontract <amount> [direction] to resize claims without shovel.
* Add support for VehicleMoveEvent.
* Don't listen to InventoryOpenEvent. Handle inventory via interacts instead.
* Reset claim visuals on resize.
* Remove 'gd_claim_type' context as it is no longer needed.
2019-09-03 13:59:12 -04:00
bloodshot 9bcb2f265c Fix active pages with flag preset menu. 2019-08-26 13:21:32 -04:00
bloodshot 14c087c950 Fix timing corruption in onExplosionPrimeEvent. Fixes #24 2019-08-25 17:28:27 -04:00
bloodshot d6f214db45 Fix NPE in findOverlappingClaims.
* Fix safe teleport.
* Bump version to 1.2.1
2019-08-25 11:19:25 -04:00
bloodshot e9377d4935 Final fixes for 1.2.0 release.
* 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.
* 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.
2019-08-25 04:19:31 -04:00
bloodshot 0520c502c9 Improve ban system.
* Fix empty text serialization.
* Update adapters for NPE bug fix.
2019-08-24 01:53:13 -04:00
zml c7bed01866 Add support for PermissionsEx v2 (#46)
Support is still fairly rudimentary, but this is a first step to be expanded on
as PEX becomes more stable
2019-08-23 22:26:52 -04:00
bloodshot 8c23f33e82 Move remaining LP code to its provider. 2019-08-23 21:58:56 -04:00
bloodshot c086316c23 Fix some issues with new option GUI.
* Don't set transient option if a persisted one exists.
* Add 'economy-block-cost' check for claim creation in economy mode.
2019-08-23 20:51:10 -04:00
PolyacovYury 1f812f367e Add ru_RU lang support. 2019-08-23 18:35:05 -04:00
bloodshot 760c9d93ff Don't save config if it fails to load. 2019-08-23 18:04:04 -04:00
bloodshot 6991d6395c Update for 1.2.0 release.
* 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

* 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
* 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
2019-08-23 16:49:00 -04:00
bloodshot a75d0410bf Update for 1.1.0 release.
* Add support for all visual blocks to be changed in config.
* Add config setting 'hide-wecui-drag-visuals-2d' to disable drag
visuals while in 2D mode (true by default)
* Fix start block visual disappearing when second block overlaps an
existing claim.
* Fix second block point on existing claim corner starting a resize.
* Fix all active visuals disappearing when starting a resize.
* Fix some lang issues.
2019-08-02 11:14:49 -04:00
bloodshot 39af6e2430 Move all used text to language file to support translations.
* Add WorldGuard migrator.
Note: This does not support custom flags atm.
* Add message cache for all messages that do not use parameters.
* Refactor option permission lookups.
* Update kyori text dependencies.
* Minor cleanup.
2019-07-30 19:35:48 -04:00
bloodshot 7bc59aae71 Fix accessor trust with non-inventory blocks. 2019-07-29 11:49:01 -04:00
bloodshot ebf5f6ad3e Add JDK 11+ support.
* Add missing contexts for global option lookups.
* Fix min/max claim size messages.
2019-07-28 17:37:34 -04:00
bloodshot d23e070e68 Fix container trust.
* Fix public/admin usernames not displaying properly after restart.
* Fix block collision debug spam.
2019-07-28 12:41:26 -04:00
bloodshot af5fade803 Fix /claiminfo displaying public and wilderness owner incorrectly. 2019-07-28 10:27:25 -04:00
bloodshot 347419a7fd Fix group trust.
* Fix claim type messages not being formatted properly.
2019-07-28 09:35:10 -04:00
bloodshot e69449f40e Use non-async cache for PermissionHolder. 2019-07-28 01:30:23 -04:00
bloodshot 81e09725f2 Fix ClaimBlockTask distance world error. 2019-07-27 23:51:12 -04:00
bloodshot 542247e73d Improve item/block registry id lookups.
* Update en_US lang file.
* Update for latest API and adapter changes.
2019-07-27 20:19:02 -04:00
bloodshot 96c90fcd7b Add command completions.
* Fix accessor trust not affecting block collisions.
* Fix tools in config not supporting mod ids.
* Fix lava placement bug.
* Fix flag default tab permission.

Fixes #3, Fixes #5, Fixes #7, Fixes #10
2019-07-27 04:15:53 -04:00
bloodshot ba39de90ab Refactor message system.
en_US lang will be delivered with assets and will no longer be generated.

The remaining translation files de_DE, ru_RU, and zh_CN have been
removed as they will need to be translated in the new format.

Thanks to Glare for the help making this happen. Closes #9
2019-07-27 01:37:06 -04:00
bloodshot 54ab8f4fbc Add missing CommandFlagReset registration.
* Add support for migrating existing Sponge claim data.
* Fix 'en_US' lang error on startup.
2019-07-24 23:18:46 -04:00
bloodshot 83b4596690 Fix claim visuals not reverting properly. Fixes #1
* Fix version.
* Ignore '_nextClaimID' file during GP Bukkit migration.
2019-07-24 00:07:41 -04:00
bloodshot 8a8d4dd08c Add bukkit source. 2019-07-23 23:31:17 -04:00