GriefDefender/bukkit/src/main/java/com/griefdefender/command/ClaimFlagBase.java

1235 lines
65 KiB
Java
Raw Normal View History

2019-07-24 05:31:17 +02:00
/*
* This file is part of GriefDefender, licensed under the MIT License (MIT).
*
* Copyright (c) bloodmc
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.griefdefender.command;
import co.aikar.commands.BaseCommand;
import co.aikar.commands.InvalidCommandArgument;
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.google.common.collect.ImmutableMap;
import com.griefdefender.GDBootstrap;
2019-07-24 05:31:17 +02:00
import com.griefdefender.GDPlayerData;
import com.griefdefender.GriefDefenderPlugin;
import com.griefdefender.api.GriefDefender;
import com.griefdefender.api.Tristate;
import com.griefdefender.api.claim.Claim;
import com.griefdefender.api.claim.ClaimContexts;
import com.griefdefender.api.permission.Context;
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 22:49:00 +02:00
import com.griefdefender.api.permission.ContextKeys;
2019-07-24 05:31:17 +02:00
import com.griefdefender.api.permission.PermissionResult;
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 22:49:00 +02:00
import com.griefdefender.api.permission.ResultTypes;
2019-07-24 05:31:17 +02:00
import com.griefdefender.api.permission.flag.Flag;
2019-12-19 23:43:16 +01:00
import com.griefdefender.api.permission.flag.FlagData;
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
import com.griefdefender.api.permission.flag.Flags;
import com.griefdefender.cache.MessageCache;
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 22:49:00 +02:00
import com.griefdefender.cache.PermissionHolderCache;
2019-07-24 05:31:17 +02:00
import com.griefdefender.claim.GDClaim;
import com.griefdefender.configuration.MessageStorage;
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 22:49:00 +02:00
import com.griefdefender.configuration.category.CustomFlagGroupCategory;
2019-07-24 05:31:17 +02:00
import com.griefdefender.event.GDCauseStackManager;
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 22:49:00 +02:00
import com.griefdefender.event.GDFlagPermissionEvent;
2019-07-24 05:31:17 +02:00
import com.griefdefender.internal.pagination.PaginationList;
import com.griefdefender.internal.util.NMSUtil;
import com.griefdefender.permission.GDPermissionHolder;
import com.griefdefender.permission.GDPermissionManager;
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 22:49:00 +02:00
import com.griefdefender.permission.GDPermissionUser;
2019-07-24 05:31:17 +02:00
import com.griefdefender.permission.GDPermissions;
import com.griefdefender.permission.flag.GDActiveFlagData;
2019-12-19 23:43:16 +01:00
import com.griefdefender.permission.flag.GDFlagDefinition;
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
import com.griefdefender.permission.flag.GDFlags;
2019-12-19 23:43:16 +01:00
import com.griefdefender.permission.ui.UIFlagData;
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 22:49:00 +02:00
import com.griefdefender.permission.ui.MenuType;
import com.griefdefender.permission.ui.UIHelper;
2019-12-19 23:43:16 +01:00
import com.griefdefender.permission.ui.UIFlagData.FlagContextHolder;
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
import com.griefdefender.provider.PermissionProvider.PermissionDataType;
2019-07-24 05:31:17 +02:00
import com.griefdefender.registry.FlagRegistryModule;
import com.griefdefender.text.action.GDCallbackHolder;
import com.griefdefender.util.CauseContextHelper;
import com.griefdefender.util.ChatCaptureUtil;
2019-07-24 05:31:17 +02:00
import com.griefdefender.util.PaginationUtil;
import com.griefdefender.util.PermissionUtil;
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 22:49:00 +02:00
2019-07-24 05:31:17 +02:00
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import net.kyori.text.adapter.bukkit.TextAdapter;
import net.kyori.text.event.ClickEvent;
import net.kyori.text.event.HoverEvent;
import net.kyori.text.format.TextColor;
import net.kyori.text.format.TextDecoration;
import org.bukkit.Bukkit;
2019-07-24 05:31:17 +02:00
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.Collections;
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 22:49:00 +02:00
import java.util.Comparator;
2019-07-24 05:31:17 +02:00
import java.util.HashMap;
import java.util.HashSet;
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 22:49:00 +02:00
import java.util.Iterator;
2019-07-24 05:31:17 +02:00
import java.util.List;
import java.util.Map;
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 22:49:00 +02:00
import java.util.Map.Entry;
import java.util.Objects;
2019-07-24 05:31:17 +02:00
import java.util.Set;
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 22:49:00 +02:00
import java.util.TreeMap;
import java.util.TreeSet;
2019-07-24 05:31:17 +02:00
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
2019-07-24 05:31:17 +02:00
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
public abstract class ClaimFlagBase extends BaseCommand {
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 22:49:00 +02:00
private static final Component whiteOpenBracket = TextComponent.of("[", TextColor.AQUA);
private static final Component whiteCloseBracket = TextComponent.of("]", TextColor.AQUA);
2019-07-24 05:31:17 +02:00
protected GDPermissionHolder subject;
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 22:49:00 +02:00
protected ClaimSubjectType subjectType;
2019-07-24 05:31:17 +02:00
protected String friendlySubjectName;
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 22:49:00 +02:00
private final Cache<UUID, String> lastActivePresetMenuMap = Caffeine.newBuilder().expireAfterAccess(10, TimeUnit.MINUTES)
.build();
private final Cache<UUID, String> lastActiveMenuTypeMap = Caffeine.newBuilder().expireAfterAccess(10, TimeUnit.MINUTES)
2019-07-24 05:31:17 +02:00
.build();
protected ClaimFlagBase(ClaimSubjectType type) {
this.subjectType = type;
}
public void execute(Player player, String[] args) throws InvalidCommandArgument {
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 22:49:00 +02:00
final GDPermissionUser src = PermissionHolderCache.getInstance().getOrCreateUser(player);
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-31 00:25:55 +01:00
final GDPlayerData playerData = src.getInternalPlayerData();
final GDClaim claim = GriefDefenderPlugin.getInstance().dataStore.getClaimAtPlayer(playerData, player.getLocation());
2019-07-24 05:31:17 +02:00
String commandFlag = null;
String target = null;
String value = null;
String contexts = null;
final String arguments = String.join(" ", args);
int index = arguments.indexOf("context[");
if (index != -1) {
contexts = arguments.substring(index, arguments.length());
}
if (args.length > 0) {
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-31 00:25:55 +01:00
if (!src.getInternalPlayerData().canIgnoreClaim(claim) && !player.hasPermission(GDPermissions.COMMAND_FLAGS_CLAIM_ARG)) {
TextAdapter.sendComponent(player, MessageCache.getInstance().PERMISSION_FLAG_ARG);
return;
}
2019-07-24 05:31:17 +02:00
if (args.length < 3) {
throw new InvalidCommandArgument();
}
commandFlag = args[0];
target = args[1];
value = args[2];
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-31 00:25:55 +01:00
} else {
if (!src.getInternalPlayerData().canIgnoreClaim(claim) && !player.hasPermission(GDPermissions.COMMAND_FLAGS_CLAIM_GUI)) {
TextAdapter.sendComponent(player, MessageCache.getInstance().PERMISSION_FLAG_GUI);
return;
}
2019-07-24 05:31:17 +02:00
}
final Flag flag = FlagRegistryModule.getInstance().getById(commandFlag).orElse(null);
if (commandFlag != null && flag == null) {
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 22:49:00 +02:00
TextAdapter.sendComponent(player, MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.FLAG_NOT_FOUND, ImmutableMap.of(
"flag", commandFlag)));
2019-07-24 05:31:17 +02:00
return;
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (flag != null && !GDFlags.isFlagEnabled(flag)) {
TextAdapter.sendComponent(player, MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.FLAG_NOT_ENABLED, ImmutableMap.of(
"flag", commandFlag)));
return;
}
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 17:28:49 +02:00
if (flag != null && !player.hasPermission(GDPermissions.USER_CLAIM_FLAGS + "." + flag.getName().toLowerCase())) {
TextAdapter.sendComponent(player, MessageCache.getInstance().PERMISSION_FLAG_USE);
2019-07-24 05:31:17 +02:00
return;
}
if (target != null && target.equalsIgnoreCase("hand")) {
ItemStack stack = NMSUtil.getInstance().getActiveItem(player);
if (stack != null) {
target = GDPermissionManager.getInstance().getPermissionIdentifier(stack);
}
}
2019-12-31 00:50:20 +01:00
String flagPermission = flag != null ? flag.getPermission() : "";
final Set<Context> contextSet = CauseContextHelper.generateContexts(flagPermission, player, claim, contexts);
2019-07-24 05:31:17 +02:00
if (contextSet == null) {
return;
}
if (claim != null) {
if (flag == null && value == null && player.hasPermission(GDPermissions.COMMAND_LIST_CLAIM_FLAGS)) {
String defaultGroup = "";
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
for (Entry<String, CustomFlagGroupCategory> groupEntry : GriefDefenderPlugin.getFlagConfig().getConfig().customFlags.getGroups().entrySet()) {
final String permission = groupEntry.getValue().isAdminGroup() ? GDPermissions.FLAG_CUSTOM_ADMIN_BASE : GDPermissions.FLAG_CUSTOM_USER_BASE;
if (!player.hasPermission(permission + "." + groupEntry.getKey()) && !src.getInternalPlayerData().canIgnoreClaim(claim)) {
continue;
}
defaultGroup = groupEntry.getKey();
break;
}
if (!defaultGroup.isEmpty()) {
showCustomFlags(src, claim, defaultGroup);
} else {
TextAdapter.sendComponent(player, MessageCache.getInstance().PERMISSION_FLAG_USE);
}
2019-07-24 05:31:17 +02:00
return;
} else if (flag != null && value != null) {
GDCauseStackManager.getInstance().pushCause(player);
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 22:49:00 +02:00
PermissionResult result = CommandHelper.addFlagPermission(player, this.subject, claim, flag, target, PermissionUtil.getInstance().getTristateFromString(value.toUpperCase()), contextSet);
final String flagTarget = target;
if (result.getResultType() == ResultTypes.TARGET_NOT_VALID) {
GriefDefenderPlugin.sendMessage(player, MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.FLAG_INVALID_TARGET,
ImmutableMap.of("target", flagTarget,
"flag", flag)));
} else if (result.getResultType() == ResultTypes.NO_PERMISSION) {
GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().PERMISSION_FLAG_USE);
}
2019-07-24 05:31:17 +02:00
GDCauseStackManager.getInstance().popCause();
return;
}
} else {
GriefDefenderPlugin.sendMessage(player, MessageCache.getInstance().CLAIM_NOT_FOUND);
2019-07-24 05:31:17 +02:00
}
}
protected void showCustomFlags(GDPermissionUser src, GDClaim claim, String flagGroup) {
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 22:49:00 +02:00
final Player player = src.getOnlinePlayer();
final String lastPermissionMenuType = this.lastActivePresetMenuMap.getIfPresent(player.getUniqueId());
if (lastPermissionMenuType != null && !lastPermissionMenuType.equalsIgnoreCase(flagGroup.toLowerCase())) {
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 22:49:00 +02:00
PaginationUtil.getInstance().resetActivePage(player.getUniqueId());
}
TextComponent.Builder flagHeadBuilder = TextComponent.builder()
.append(" Displaying :", TextColor.AQUA);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
final Map<String, CustomFlagGroupCategory> flagGroups = GriefDefenderPlugin.getFlagConfig().getConfig().customFlags.getGroups();
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 22:49:00 +02:00
List<String> groups = new ArrayList<>();
for (Map.Entry<String, CustomFlagGroupCategory> flagGroupEntry : flagGroups.entrySet()) {
final CustomFlagGroupCategory flagGroupCat = flagGroupEntry.getValue();
if (!flagGroupCat.isEnabled()) {
continue;
}
final String groupName = flagGroupEntry.getKey();
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
final boolean isAdminGroup = GriefDefenderPlugin.getFlagConfig().getConfig().customFlags.getGroups().get(groupName).isAdminGroup();
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 22:49:00 +02:00
final String permission = isAdminGroup ? GDPermissions.FLAG_CUSTOM_ADMIN_BASE : GDPermissions.FLAG_CUSTOM_USER_BASE;
if (!player.hasPermission(permission + "." + groupName) && !src.getInternalPlayerData().canIgnoreClaim(claim)) {
continue;
}
groups.add(groupName);
}
final CustomFlagGroupCategory flagGroupCat = flagGroups.get(flagGroup);
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 22:49:00 +02:00
if (flagGroupCat == null || flagGroupCat.getFlagDefinitions().isEmpty()) {
TextAdapter.sendComponent(player, TextComponent.of("No custom flag definitions were found for group '" + flagGroup + "'."));
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 22:49:00 +02:00
return;
}
Collections.sort(groups);
for (String group : groups) {
flagHeadBuilder.append(" ").append(flagGroup.equalsIgnoreCase(group) ? TextComponent.builder()
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 22:49:00 +02:00
.append(whiteOpenBracket)
.append(group.toUpperCase(), flagGroups.get(group).isAdminGroup() ? TextColor.RED : TextColor.GOLD)
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 22:49:00 +02:00
.append(whiteCloseBracket).build() :
TextComponent.builder().append(group.toUpperCase(), TextColor.GRAY)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createCustomFlagConsumer(src, claim, group))))
.build());
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
final Map<String, GDFlagDefinition> definitions = new HashMap<>(flagGroupCat.getFlagDefinitions());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
final boolean isAdminUser = src.getInternalPlayerData().canManageAdminClaims;
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 22:49:00 +02:00
List<Component> textComponents = new ArrayList<>();
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
for (GDFlagDefinition customFlag : definitions.values()) {
if (customFlag.isEnabled()) {
Component flagText = TextComponent.builder()
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
.append(getCustomFlagText(customFlag, isAdminUser))
.append(" ")
.append(this.getCustomClickableText(src, claim, customFlag, flagGroup))
.build();
textComponents.add(flagText);
}
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 22:49:00 +02:00
}
Collections.sort(textComponents, UIHelper.PLAIN_COMPARATOR);
String lastMenu = this.lastActiveMenuTypeMap.getIfPresent(src.getUniqueId());
MenuType lastActiveMenu = MenuType.CLAIM;
if (lastMenu != null) {
lastActiveMenu = MenuType.valueOf(lastMenu.toUpperCase());
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 22:49:00 +02:00
}
int fillSize = 20 - (textComponents.size() + 2);
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 22:49:00 +02:00
Component footer = null;
if (player.hasPermission(GDPermissions.ADVANCED_FLAGS)) {
footer = TextComponent.builder().append(whiteOpenBracket)
.append(TextComponent.of("PRESET").color(TextColor.GOLD)).append(whiteCloseBracket)
.append(" ")
.append(TextComponent.builder()
.append(TextComponent.of("ADVANCED").color(TextColor.GRAY)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, lastActiveMenu)))))
.build())
.build();
if (player.hasPermission(GDPermissions.CHAT_CAPTURE)) {
footer = footer.append(TextComponent.builder()
.append("\n")
.append(ChatCaptureUtil.getInstance().createRecordChatComponent(player, claim, src.getInternalPlayerData(), "claimflag"))
.build());
fillSize = 20 - (textComponents.size() + 3);
}
} else if (player.hasPermission(GDPermissions.CHAT_CAPTURE)) {
footer = TextComponent.builder().append(ChatCaptureUtil.getInstance().createRecordChatComponent(player, claim, src.getInternalPlayerData(), "claimflag")).build();
fillSize = 20 - (textComponents.size() + 3);
}
for (int i = 0; i < fillSize; i++) {
textComponents.add(TextComponent.of(" "));
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 22:49:00 +02:00
}
PaginationList.Builder paginationBuilder = PaginationList.builder()
.title(flagHeadBuilder.build()).padding(TextComponent.builder(" ").decoration(TextDecoration.STRIKETHROUGH, true).build()).contents(textComponents).footer(footer);
final PaginationList paginationList = paginationBuilder.build();
Integer activePage = 1;
activePage = PaginationUtil.getInstance().getActivePage(player.getUniqueId());
if (activePage == null) {
activePage = 1;
}
this.lastActivePresetMenuMap.put(player.getUniqueId(), flagGroup.toLowerCase());
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 22:49:00 +02:00
paginationList.sendTo(player, activePage);
}
protected void showFlagPermissions(GDPermissionUser src, GDClaim claim, MenuType displayType) {
final Player player = src.getOnlinePlayer();
2019-07-24 05:31:17 +02:00
boolean isAdmin = false;
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 22:49:00 +02:00
if (player.hasPermission(GDPermissions.DELETE_CLAIM_ADMIN)) {
2019-07-24 05:31:17 +02:00
isAdmin = true;
}
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 22:49:00 +02:00
final String lastPermissionMenuType = this.lastActiveMenuTypeMap.getIfPresent(player.getUniqueId());
if (lastPermissionMenuType != null && !lastPermissionMenuType.equalsIgnoreCase(displayType.name())) {
PaginationUtil.getInstance().resetActivePage(player.getUniqueId());
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
final Component showOverrideText = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.UI_CLICK_FILTER_TYPE,
ImmutableMap.of("type", TextComponent.of("OVERRIDE", TextColor.RED)));
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 22:49:00 +02:00
final Component showDefaultText = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.UI_CLICK_FILTER_TYPE,
ImmutableMap.of("type", TextComponent.of("DEFAULT", TextColor.LIGHT_PURPLE)));
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 22:49:00 +02:00
final Component showClaimText = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.UI_CLICK_FILTER_TYPE,
ImmutableMap.of("type", TextComponent.of("CLAIM", TextColor.GOLD)));
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 22:49:00 +02:00
final Component showInheritText = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.UI_CLICK_FILTER_TYPE,
ImmutableMap.of("type", TextComponent.of("INHERIT", TextColor.AQUA)));
2019-07-24 05:31:17 +02:00
Component defaultFlagText = TextComponent.empty();
if (isAdmin) {
defaultFlagText = TextComponent.builder("")
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 22:49:00 +02:00
.append(displayType == MenuType.DEFAULT ? TextComponent.builder("")
2019-07-24 05:31:17 +02:00
.append(whiteOpenBracket)
.append("DEFAULT", TextColor.LIGHT_PURPLE)
.append(whiteCloseBracket).build() : TextComponent.of("DEFAULT", TextColor.GRAY))
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 22:49:00 +02:00
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, MenuType.DEFAULT))))
2019-07-24 05:31:17 +02:00
.hoverEvent(HoverEvent.showText(showDefaultText)).build();
}
final Component overrideFlagText = TextComponent.builder("")
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 22:49:00 +02:00
.append(displayType == MenuType.OVERRIDE ? TextComponent.builder("")
2019-07-24 05:31:17 +02:00
.append(whiteOpenBracket)
.append("OVERRIDE", TextColor.RED)
.append(whiteCloseBracket).build() : TextComponent.of("OVERRIDE", TextColor.GRAY))
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 22:49:00 +02:00
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, MenuType.OVERRIDE))))
2019-07-24 05:31:17 +02:00
.hoverEvent(HoverEvent.showText(showOverrideText)).build();
final Component claimFlagText = TextComponent.builder("")
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 22:49:00 +02:00
.append(displayType == MenuType.CLAIM ? TextComponent.builder("")
2019-07-24 05:31:17 +02:00
.append(whiteOpenBracket)
.append("CLAIM", TextColor.YELLOW)
.append(whiteCloseBracket).build() : TextComponent.of("CLAIM", TextColor.GRAY))
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 22:49:00 +02:00
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, MenuType.CLAIM))))
2019-07-24 05:31:17 +02:00
.hoverEvent(HoverEvent.showText(showClaimText)).build();
final Component inheritFlagText = TextComponent.builder("")
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 22:49:00 +02:00
.append(displayType == MenuType.INHERIT ? TextComponent.builder("")
2019-07-24 05:31:17 +02:00
.append(whiteOpenBracket)
.append("INHERIT", TextColor.AQUA)
.append(whiteCloseBracket).build() : TextComponent.of("INHERIT", TextColor.GRAY))
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 22:49:00 +02:00
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createClaimFlagConsumer(src, claim, MenuType.INHERIT))))
2019-07-24 05:31:17 +02:00
.hoverEvent(HoverEvent.showText(showInheritText)).build();
Component claimFlagHead = TextComponent.empty();
if (this.subjectType == ClaimSubjectType.GLOBAL) {
if (isAdmin) {
claimFlagHead = TextComponent.builder("")
.append(" Displaying : ", TextColor.AQUA)
.append(defaultFlagText)
.append(" ")
.append(claimFlagText)
.append(" ")
.append(inheritFlagText)
.append(" ")
.append(overrideFlagText).build();
} else {
claimFlagHead = TextComponent.builder("")
.append(" Displaying : ", TextColor.AQUA)
.append(claimFlagText)
.append(" ")
.append(inheritFlagText)
.append(" ")
.append(overrideFlagText).build();
}
} else {
claimFlagHead = TextComponent.builder("")
.append(" " + this.subjectType.getFriendlyName() + " ", TextColor.AQUA)
.append(this.friendlySubjectName, TextColor.YELLOW)
.append(" : ", TextColor.AQUA)
.append(claimFlagText)
.append(" ")
.append(inheritFlagText)
.append(" ")
.append(overrideFlagText).build();
}
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 22:49:00 +02:00
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
Map<String, UIFlagData> flagDataMap = new HashMap<>();
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
for (Map.Entry<Set<Context>, Map<String, Boolean>> mapEntry : PermissionUtil.getInstance().getTransientPermissions(GriefDefenderPlugin.GD_DEFAULT_HOLDER).entrySet()) {
2019-07-24 05:31:17 +02:00
final Set<Context> contextSet = mapEntry.getKey();
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 17:28:49 +02:00
if (contextSet.contains(claim.getDefaultTypeContext())) {
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
this.addFilteredContexts(GriefDefenderPlugin.GD_DEFAULT_HOLDER, flagDataMap, contextSet, MenuType.DEFAULT, mapEntry.getValue());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
} else if (contextSet.contains(ClaimContexts.GLOBAL_DEFAULT_CONTEXT) || (!claim.isWilderness() && contextSet.contains(ClaimContexts.USER_DEFAULT_CONTEXT))) {
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
this.addFilteredContexts(GriefDefenderPlugin.GD_DEFAULT_HOLDER, flagDataMap, contextSet, MenuType.DEFAULT, mapEntry.getValue());
2019-07-24 05:31:17 +02:00
}
}
final List<Claim> inheritParents = claim.getInheritedParents();
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
this.generateFilteredContexts(claim, GriefDefenderPlugin.GD_DEFAULT_HOLDER, flagDataMap, displayType, inheritParents);
this.generateFilteredContexts(claim, GriefDefenderPlugin.GD_CLAIM_HOLDER, flagDataMap, displayType, inheritParents);
this.generateFilteredContexts(claim, GriefDefenderPlugin.GD_DEFINITION_HOLDER, flagDataMap, displayType, inheritParents);
this.generateFilteredContexts(claim, GriefDefenderPlugin.GD_OVERRIDE_HOLDER, flagDataMap, displayType, inheritParents);
2019-07-24 05:31:17 +02:00
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 22:49:00 +02:00
final Map<String, Map<Integer, Component>> textMap = new TreeMap<>();
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
for (UIFlagData flagData : flagDataMap.values()) {
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 22:49:00 +02:00
final Flag flag = flagData.flag;
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (!GDFlags.isFlagEnabled(flag)) {
continue;
}
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 22:49:00 +02:00
for (FlagContextHolder flagHolder : flagData.flagContextMap.values()) {
if (displayType != MenuType.CLAIM && flagHolder.getType() != displayType) {
continue;
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
final Set<Context> contexts = flagHolder.getAllContexts();
Component flagText = TextComponent.builder()
.append(getFlagText(flag, contexts))
.append(" ")
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
.append(this.getClickableText(src, flagData.holder, claim, flag, flagHolder, contexts, displayType))
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 22:49:00 +02:00
.build();
final int hashCode = Objects.hash(flag.getPermission(), contexts);
Map<Integer, Component> componentMap = textMap.get(flag.getPermission());
if (componentMap == null) {
componentMap = new HashMap<>();
componentMap.put(hashCode, flagText);
textMap.put(flag.getPermission(), componentMap);
} else {
componentMap.put(hashCode, flagText);
2019-07-24 05:31:17 +02:00
}
}
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 22:49:00 +02:00
}
2019-07-24 05:31:17 +02:00
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 22:49:00 +02:00
List<Component> textList = new ArrayList<>();
for (Entry<String, Map<Integer, Component>> mapEntry : textMap.entrySet()) {
textList.addAll(mapEntry.getValue().values());
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
Collections.sort(textList, UIHelper.PLAIN_COMPARATOR);
String lastActivePresetMenu = this.lastActivePresetMenuMap.getIfPresent(src.getUniqueId());
if (lastActivePresetMenu == null) {
lastActivePresetMenu = "user";
}
int fillSize = 20 - (textList.size() + 2);
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 22:49:00 +02:00
Component footer = null;
if (player.hasPermission(GDPermissions.ADVANCED_FLAGS)) {
footer = TextComponent.builder().append(TextComponent.builder()
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
.append(MessageCache.getInstance().TITLE_PRESET.color(TextColor.GRAY)
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createCustomFlagConsumer(src, claim, lastActivePresetMenu)))))
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 22:49:00 +02:00
.build())
.append(" ")
.append(whiteOpenBracket)
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
.append(MessageCache.getInstance().TITLE_ADVANCED.color(TextColor.RED))
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 22:49:00 +02:00
.append(whiteCloseBracket)
.build();
if (player.hasPermission(GDPermissions.CHAT_CAPTURE)) {
footer = footer.append(TextComponent.builder()
.append("\n")
.append(ChatCaptureUtil.getInstance().createRecordChatComponent(player, claim, src.getInternalPlayerData(), "claimflag"))
.build());
fillSize = 20 - (textList.size() + 3);
}
} else if (player.hasPermission(GDPermissions.CHAT_CAPTURE)) {
footer = TextComponent.builder().append(ChatCaptureUtil.getInstance().createRecordChatComponent(player, claim, src.getInternalPlayerData(), "claimflag")).build();
fillSize = 20 - (textList.size() + 3);
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 22:49:00 +02:00
}
for (int i = 0; i < fillSize; i++) {
textList.add(TextComponent.of(" "));
}
2019-07-24 05:31:17 +02:00
PaginationList.Builder paginationBuilder = PaginationList.builder()
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 22:49:00 +02:00
.title(claimFlagHead).padding(TextComponent.builder(" ").decoration(TextDecoration.STRIKETHROUGH, true).build()).contents(textList).footer(footer);
2019-07-24 05:31:17 +02:00
final PaginationList paginationList = paginationBuilder.build();
Integer activePage = 1;
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 22:49:00 +02:00
activePage = PaginationUtil.getInstance().getActivePage(player.getUniqueId());
if (activePage == null) {
activePage = 1;
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
this.lastActiveMenuTypeMap.put(player.getUniqueId(), displayType.name().toLowerCase());
paginationList.sendTo(player, activePage);
2019-07-24 05:31:17 +02:00
}
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
private void generateFilteredContexts(GDClaim claim, GDPermissionHolder holder, Map<String, UIFlagData> flagDataMap, MenuType displayType, List<Claim> inheritParents) {
for (Map.Entry<Set<Context>, Map<String, Boolean>> mapEntry : PermissionUtil.getInstance().getPermanentPermissions(holder).entrySet()) {
final Set<Context> contextSet = mapEntry.getKey();
final Map<String, Boolean> flagPermissions = mapEntry.getValue();
if (displayType == MenuType.DEFAULT && (holder == GriefDefenderPlugin.GD_DEFAULT_HOLDER || holder == GriefDefenderPlugin.GD_DEFINITION_HOLDER)) {
if (contextSet.contains(claim.getDefaultTypeContext())) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.DEFAULT, flagPermissions);
} else if (contextSet.contains(ClaimContexts.GLOBAL_DEFAULT_CONTEXT) || (!claim.isWilderness() && contextSet.contains(ClaimContexts.USER_DEFAULT_CONTEXT))) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.DEFAULT, flagPermissions);
}
}
if (displayType == MenuType.CLAIM && holder != GriefDefenderPlugin.GD_OVERRIDE_HOLDER) {
boolean inheritPermission = false;
for (Claim parentClaim : inheritParents) {
GDClaim parent = (GDClaim) parentClaim;
// check parent context
if (contextSet.contains(parent.getContext())) {
inheritPermission = true;
break;
}
}
if (inheritPermission) {
continue;
}
if (contextSet.contains(claim.getContext())) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.CLAIM, flagPermissions);
}
}
if (displayType == MenuType.INHERIT && holder != GriefDefenderPlugin.GD_OVERRIDE_HOLDER) {
for (Claim parentClaim : inheritParents) {
GDClaim parent = (GDClaim) parentClaim;
// check parent context
if (contextSet.contains(parent.getContext())) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.INHERIT, flagPermissions);
}
}
}
if (displayType == MenuType.OVERRIDE && holder != GriefDefenderPlugin.GD_CLAIM_HOLDER) {
if (contextSet.contains(ClaimContexts.GLOBAL_OVERRIDE_CONTEXT) || (!claim.isWilderness() && contextSet.contains(ClaimContexts.USER_OVERRIDE_CONTEXT))) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.OVERRIDE, flagPermissions);
}
if (contextSet.contains(claim.getOverrideClaimContext())) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.OVERRIDE, flagPermissions);
} else if (contextSet.contains(claim.getOverrideTypeContext())) {
this.addFilteredContexts(holder, flagDataMap, contextSet, MenuType.OVERRIDE, flagPermissions);
}
}
}
}
private void addFilteredContexts(GDPermissionHolder holder, Map<String, UIFlagData> flagDataMap, Set<Context> contexts, MenuType type, Map<String, Boolean> permissions) {
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 22:49:00 +02:00
for (Map.Entry<String, Boolean> permissionEntry : permissions.entrySet()) {
final Flag flag = FlagRegistryModule.getInstance().getById(permissionEntry.getKey()).orElse(null);
if (flag == null) {
2019-07-24 05:31:17 +02:00
continue;
}
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
final UIFlagData flagData = flagDataMap.get(permissionEntry.getKey());
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 22:49:00 +02:00
if (flagData != null) {
flagData.addContexts(flag, permissionEntry.getValue(), type, contexts);
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
// set new holder
flagData.setHolder(holder);
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 22:49:00 +02:00
} else {
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
flagDataMap.put(permissionEntry.getKey(), new UIFlagData(holder, flag, permissionEntry.getValue(), type, contexts));
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 22:49:00 +02:00
}
2019-07-24 05:31:17 +02:00
}
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
private Component getCustomFlagText(GDFlagDefinition customFlag, boolean isAdminUser) {
TextComponent definitionType = TextComponent.empty();
TextColor flagColor = TextColor.YELLOW;
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (customFlag.isAdmin() && !isAdminUser) {
for (Context context : customFlag.getContexts()) {
if (context.getKey().contains("default")) {
definitionType = TextComponent.builder()
.append("\n")
.append(MessageCache.getInstance().LABEL_TYPE.color(TextColor.AQUA))
.append(" : ", TextColor.WHITE)
.append("DEFAULT", TextColor.LIGHT_PURPLE)
.append(" ")
.append(context.getValue().toUpperCase(), TextColor.GRAY)
.build();
flagColor = TextColor.LIGHT_PURPLE;
} else if (context.getKey().contains("override")) {
definitionType = TextComponent.builder()
.append("\n")
.append(MessageCache.getInstance().LABEL_TYPE.color(TextColor.AQUA))
.append(" : ", TextColor.WHITE)
.append("OVERRIDE", TextColor.RED)
.append(" ")
.append(context.getValue().toUpperCase(), TextColor.GRAY)
.build();
flagColor = TextColor.RED;
}
}
}
if (definitionType == TextComponent.empty()) {
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
TextComponent.Builder builder = TextComponent.builder()
.append("\n")
.append(MessageCache.getInstance().LABEL_TYPE.color(TextColor.AQUA))
.append(" : ", TextColor.WHITE)
.append(MessageCache.getInstance().TITLE_CLAIM.color(TextColor.YELLOW));
if (customFlag.isAdmin() && isAdminUser) {
builder.append("\n")
.append(MessageCache.getInstance().LABEL_GROUP.color(TextColor.AQUA))
.append(" : ", TextColor.WHITE)
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
.append(customFlag.getGroupName().toUpperCase(), TextColor.RED);
}
definitionType = builder.build();
}
final Component baseFlagText = TextComponent.builder()
2019-12-19 23:43:16 +01:00
.append(customFlag.getName(), flagColor)
.append(" ")
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 22:49:00 +02:00
.hoverEvent(HoverEvent.showText(TextComponent.builder()
.append(customFlag.getDescription())
.append(definitionType)
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 22:49:00 +02:00
.build())).build();
return baseFlagText;
}
2019-07-24 05:31:17 +02:00
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 22:49:00 +02:00
private Component getFlagText(Flag flag, Set<Context> contexts) {
boolean customContext = UIHelper.containsCustomContext(contexts);
2019-07-24 05:31:17 +02:00
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 22:49:00 +02:00
final Component baseFlagText = TextComponent.builder().color(customContext ? TextColor.YELLOW : TextColor.GREEN).append(flag.getName() + " ")
.hoverEvent(HoverEvent.showText(TextComponent.builder()
.append(flag.getDescription())
.build())).build();
2019-07-24 05:31:17 +02:00
return baseFlagText;
}
2019-12-19 23:43:16 +01:00
private Component getCustomClickableText(GDPermissionUser src, GDClaim claim, GDFlagDefinition customFlag, String flagGroup) {
boolean hasHover = false;
TextComponent.Builder hoverBuilder = TextComponent.builder();
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 22:49:00 +02:00
final Player player = src.getOnlinePlayer();
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
final boolean canIgnoreClaim = src.getInternalPlayerData().canIgnoreClaim(claim);
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 22:49:00 +02:00
boolean hasEditPermission = true;
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
Component denyReason = null;
if (!canIgnoreClaim) {
denyReason = claim.allowEdit(player);
if (denyReason != null) {
hasEditPermission = false;
hasHover = true;
}
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 22:49:00 +02:00
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
final boolean isAdminGroup = GriefDefenderPlugin.getFlagConfig().getConfig().customFlags.getGroups().get(flagGroup).isAdminGroup();
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 22:49:00 +02:00
final String permission = isAdminGroup ? GDPermissions.FLAG_CUSTOM_ADMIN_BASE : GDPermissions.FLAG_CUSTOM_USER_BASE;
// check flag perm
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
if (!canIgnoreClaim && !player.hasPermission(permission + "." + flagGroup + "." + customFlag.getName())) {
hoverBuilder.append(MessageCache.getInstance().PERMISSION_FLAG_USE).append("\n");
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 22:49:00 +02:00
hasEditPermission = false;
hasHover = true;
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 22:49:00 +02:00
}
final List<GDActiveFlagData> definitionResults = new ArrayList<>();
boolean hasOverride = false;
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
UUID parentInheritUniqueId = null;
Component parentInheritFriendlyType = null;
2019-12-19 23:43:16 +01:00
for (FlagData flagData : customFlag.getFlagData()) {
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
definitionResults.add(activeData);
if (activeData.getType() == GDActiveFlagData.Type.OVERRIDE) {
hasOverride = true;
hasEditPermission = false;
} else if (activeData.getType() == GDActiveFlagData.Type.OWNER_OVERRIDE_PARENT_INHERIT || activeData.getType() == GDActiveFlagData.Type.CLAIM_PARENT_INHERIT) {
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
if (!hasEditPermission) {
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
parentInheritUniqueId = activeData.getInheritParentUniqueId();
parentInheritFriendlyType = activeData.getInheritParentFriendlyType();
}
}
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 22:49:00 +02:00
}
boolean properResult = true;
Tristate defaultResult = null;
for (GDActiveFlagData definitionFlagData : definitionResults) {
final Tristate result = definitionFlagData.getValue();
if (defaultResult == null) {
defaultResult = result;
} else if (defaultResult != result) {
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 22:49:00 +02:00
properResult = false;
break;
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
}
2019-07-24 05:31:17 +02:00
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 22:49:00 +02:00
TextComponent.Builder valueBuilder = TextComponent.builder();
if (!properResult) {
if (hasEditPermission) {
hoverBuilder.append("Conflict Data : \n");
for (GDActiveFlagData definitionFlagData : definitionResults) {
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
hoverBuilder.append(definitionFlagData.getComponent(flagGroup))
.append("\n");
}
hasHover = true;
2019-07-24 05:31:17 +02:00
}
valueBuilder.append("partial");
defaultResult = null;
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 22:49:00 +02:00
} else {
TextColor valueColor = TextColor.GRAY;
if (defaultResult == Tristate.TRUE) {
valueColor = TextColor.GREEN;
} else if (defaultResult == Tristate.FALSE) {
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 22:49:00 +02:00
valueColor = TextColor.RED;
2019-07-24 05:31:17 +02:00
}
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
if (defaultResult == Tristate.TRUE) {
valueBuilder.append(MessageCache.getInstance().PERMISSION_TRUE.color(valueColor));
} else if (defaultResult == Tristate.FALSE) {
valueBuilder.append(MessageCache.getInstance().PERMISSION_FALSE.color(valueColor));
} else {
valueBuilder.append(MessageCache.getInstance().PERMISSION_UNDEFINED.color(valueColor));
}
}
if (hasEditPermission) {
if (defaultResult == Tristate.TRUE) {
hoverBuilder.append(MessageCache.getInstance().FLAG_UI_CLICK_DENY);
} else {
hoverBuilder.append(MessageCache.getInstance().FLAG_UI_CLICK_ALLOW);
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
hasHover = true;
if (properResult) {
hoverBuilder.append("\nDefault Value: ", TextColor.AQUA);
final Tristate defaultValue = customFlag.getDefaultValue();
if (defaultValue == Tristate.UNDEFINED) {
hoverBuilder.append(customFlag.getDefaultValue().toString().toLowerCase(), TextColor.GRAY);
} else if (defaultValue == Tristate.TRUE) {
hoverBuilder.append(customFlag.getDefaultValue().toString().toLowerCase(), TextColor.GREEN);
} else {
hoverBuilder.append(customFlag.getDefaultValue().toString().toLowerCase(), TextColor.RED);
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (src.getInternalPlayerData().canManageAdminClaims) {
if (!customFlag.getContexts().isEmpty()) {
hoverBuilder.append("\nDefinition Contexts: ");
hoverBuilder.append("\ngd_claim", TextColor.AQUA)
.append("=", TextColor.WHITE)
.append(claim.getUniqueId().toString(), TextColor.GRAY);
for (Context context : customFlag.getContexts()) {
if (!customFlag.isAdmin()) {
continue;
}
final String key = context.getKey();
if (key.contains("default") || key.contains("override")) {
// Only used in config for startup
continue;
}
hoverBuilder.append("\n");
final String value = context.getValue();
TextColor keyColor = TextColor.AQUA;
if (key.contains("default")) {
keyColor = TextColor.LIGHT_PURPLE;
} else if (key.contains("override")) {
keyColor = TextColor.RED;
} else if (key.contains("server")) {
keyColor = TextColor.GRAY;
}
hoverBuilder.append(key, keyColor)
.append("=", TextColor.WHITE)
.append(value.replace("minecraft:", ""), TextColor.GRAY);
}
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
} else {
hoverBuilder.append("\nClaim ID: ", TextColor.AQUA).append(claim.getUniqueId().toString(), TextColor.GRAY);
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (src.getInternalPlayerData().canManageAdminClaims) {
for (FlagData flagData : customFlag.getFlagData()) {
hoverBuilder.append("\nFlag: ")
.append(flagData.getFlag().getName(), TextColor.GREEN);
if (!flagData.getContexts().isEmpty()) {
hoverBuilder.append("\nContexts: ");
}
for (Context context : flagData.getContexts()) {
hoverBuilder.append("\n");
final String key = context.getKey();
final String value = context.getValue();
TextColor keyColor = TextColor.AQUA;
hoverBuilder.append(key, keyColor)
.append("=", TextColor.WHITE)
.append(value.replace("minecraft:", ""), TextColor.GRAY);
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
// show active value
final GDActiveFlagData activeData = this.getActiveDefinitionResult(claim, customFlag, flagData);
hoverBuilder.append("\nActive Result: ")
.append("\nvalue", TextColor.DARK_AQUA)
.append("=", TextColor.WHITE)
.append(activeData.getValue().name().toLowerCase(), TextColor.GOLD)
.append("\ntype", TextColor.DARK_AQUA)
.append("=", TextColor.WHITE)
.append(activeData.getType().name() + "\n", activeData.getColor());
}
}
}
} else {
if (hasOverride) {
hoverBuilder.append(MessageCache.getInstance().FLAG_UI_OVERRIDE_NO_PERMISSION);
hasHover = true;
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
} else if (parentInheritUniqueId != null) {
hoverBuilder.append(MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.FLAG_UI_INHERIT_PARENT,
ImmutableMap.of("name", parentInheritFriendlyType)));
hasHover = true;
} else if (denyReason != null) {
hoverBuilder.append(denyReason);
hasHover = true;
}
}
if (hasHover) {
valueBuilder.hoverEvent(HoverEvent.showText(hoverBuilder.build()));
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 22:49:00 +02:00
}
TextComponent.Builder textBuilder = null;
if (hasEditPermission) {
textBuilder = TextComponent.builder()
.append(valueBuilder
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createCustomFlagConsumer(src, claim, customFlag, defaultResult, flagGroup))))
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 22:49:00 +02:00
.build());
} else {
textBuilder = TextComponent.builder()
.append(valueBuilder
.build());
}
2019-07-24 05:31:17 +02:00
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 22:49:00 +02:00
return textBuilder.build();
2019-07-24 05:31:17 +02:00
}
public GDActiveFlagData getActiveDefinitionResult(GDClaim claim, GDFlagDefinition flagDefinition, FlagData flagData) {
Set<Context> contexts = new HashSet<>(flagData.getContexts());
contexts.addAll(flagDefinition.getContexts());
// check if admin definition has gd_claim contex
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
boolean hasOverrideOwnerContext = false;
boolean replaceClaimContext = false;
final Iterator<Context> iterator = contexts.iterator();
Context claimContext = claim.getContext();
while (iterator.hasNext()) {
final Context context = iterator.next();
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (context.getKey().equalsIgnoreCase(ContextKeys.CLAIM_OVERRIDE)) {
if (context.getValue().equalsIgnoreCase("claim")) {
iterator.remove();
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
replaceClaimContext = true;
hasOverrideOwnerContext = true;
}
} else {
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
iterator.remove();
}
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
final Set<Context> filteredContexts = new HashSet<>(contexts);
// First check if this permission has been overridden by admin
// Check override
Set<Context> permissionContexts = new HashSet<>(filteredContexts);
permissionContexts.add(ClaimContexts.GLOBAL_OVERRIDE_CONTEXT);
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (!claim.isWilderness()) {
contexts.add(ClaimContexts.USER_OVERRIDE_CONTEXT);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
permissionContexts.add(claim.getWorldContext());
permissionContexts.add(claim.getOverrideTypeContext());
permissionContexts.addAll(flagData.getContexts());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
Tristate result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.OVERRIDE);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
final List<Claim> inheritParents = claim.getInheritedParents();
// Check claim owner override
if (hasOverrideOwnerContext) {
permissionContexts = new HashSet<>(filteredContexts);
permissionContexts.addAll(flagData.getContexts());
for (Claim parentClaim : inheritParents) {
GDClaim parent = (GDClaim) parentClaim;
permissionContexts.add(parent.getOverrideClaimContext());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, parent.getUniqueId(), parent.getFriendlyNameType(), GDActiveFlagData.Type.OWNER_OVERRIDE_PARENT_INHERIT);
}
contexts.remove(parent.getOverrideClaimContext());
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
permissionContexts.add(claim.getOverrideClaimContext());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.OWNER_OVERRIDE);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
// Check claim
permissionContexts = new HashSet<>(filteredContexts);
permissionContexts.addAll(flagData.getContexts());
for (Claim parentClaim : inheritParents) {
GDClaim parent = (GDClaim) parentClaim;
// check parent context
permissionContexts.add(parent.getContext());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
if (result != Tristate.UNDEFINED) {
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, parent.getUniqueId(), parent.getFriendlyNameType(), GDActiveFlagData.Type.CLAIM_PARENT_INHERIT);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
contexts.remove(parent.getContext());
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (replaceClaimContext) {
permissionContexts.remove(claimContext);
permissionContexts.add(claim.getContext());
} else {
permissionContexts.add(claimContext);
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, hasOverrideOwnerContext ? GDActiveFlagData.Type.OWNER_OVERRIDE : GDActiveFlagData.Type.CLAIM);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
// Check default
permissionContexts = new HashSet<>(filteredContexts);
permissionContexts.addAll(flagData.getContexts());
permissionContexts.remove(claimContext);
// Check default type first
permissionContexts.add(claim.getDefaultTypeContext());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.DEFAULT);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
permissionContexts.remove(claim.getDefaultTypeContext());
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (!claim.isWilderness()) {
permissionContexts.add(ClaimContexts.GLOBAL_DEFAULT_CONTEXT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
permissionContexts.add(ClaimContexts.USER_DEFAULT_CONTEXT);
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.DEFAULT);
}
permissionContexts.remove(ClaimContexts.USER_DEFAULT_CONTEXT);
} else {
permissionContexts.add(ClaimContexts.GLOBAL_DEFAULT_CONTEXT);
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.PERSISTENT);
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.DEFAULT);
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
permissionContexts.remove(ClaimContexts.GLOBAL_DEFAULT_CONTEXT);
permissionContexts.add(claim.getDefaultTypeContext());
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
permissionContexts.add(ClaimContexts.USER_DEFAULT_CONTEXT);
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
result = PermissionUtil.getInstance().getPermissionValue(claim, (GDPermissionHolder) flagDefinition.getSubject(), flagData.getFlag().getPermission(), permissionContexts, PermissionDataType.TRANSIENT);
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (result != Tristate.UNDEFINED) {
return new GDActiveFlagData(flagDefinition, flagData, result, permissionContexts, GDActiveFlagData.Type.DEFAULT);
}
return new GDActiveFlagData(flagDefinition, flagData,Tristate.UNDEFINED, permissionContexts, GDActiveFlagData.Type.UNDEFINED);
}
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
private Component getClickableText(GDPermissionUser src, GDPermissionHolder holder, GDClaim claim, Flag flag, FlagContextHolder flagHolder, Set<Context> contexts, MenuType displayType) {
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 22:49:00 +02:00
Component hoverEventText = TextComponent.empty();
final MenuType flagType = flagHolder.getType();
final Player player = src.getOnlinePlayer();
boolean hasEditPermission = true;
if (displayType == MenuType.DEFAULT) {
if (!src.getInternalPlayerData().canManageFlagDefaults) {
hoverEventText = MessageCache.getInstance().PERMISSION_FLAG_DEFAULTS;
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 22:49:00 +02:00
hasEditPermission = false;
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
} else if (flagType == MenuType.OVERRIDE) {
if (!src.getInternalPlayerData().canManageFlagOverrides) {
hoverEventText = MessageCache.getInstance().PERMISSION_FLAG_OVERRIDES;
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 22:49:00 +02:00
hasEditPermission = false;
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
} else if (flagType == MenuType.INHERIT) {
UUID parentUniqueId = null;
for (Context context : contexts) {
if (context.getKey().equals("gd_claim")) {
try {
parentUniqueId = UUID.fromString(context.getValue());
} catch (IllegalArgumentException e) {
// ignore
}
}
}
// should never happen but just in case
if (parentUniqueId == null) {
hoverEventText = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.FLAG_UI_INHERIT_PARENT,
ImmutableMap.of("name", "unknown"));
hasEditPermission = false;
} else {
final GDClaim parentClaim = (GDClaim) GriefDefenderPlugin.getInstance().dataStore.getClaim(claim.getWorldUniqueId(), parentUniqueId);
hoverEventText = MessageStorage.MESSAGE_DATA.getMessage(MessageStorage.FLAG_UI_INHERIT_PARENT,
ImmutableMap.of("name", parentClaim.getFriendlyNameType()));
hasEditPermission = false;
}
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 22:49:00 +02:00
} else {
Component denyReason = claim.allowEdit(player);
2019-07-24 05:31:17 +02:00
if (denyReason != null) {
hoverEventText = denyReason;
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 22:49:00 +02:00
hasEditPermission = false;
2019-07-24 05:31:17 +02:00
} else {
// check flag perm
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 17:28:49 +02:00
if (!player.hasPermission(GDPermissions.USER_CLAIM_FLAGS + "." + flag.getName().toLowerCase())) {
hoverEventText = MessageCache.getInstance().PERMISSION_FLAG_USE;
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 22:49:00 +02:00
hasEditPermission = false;
2019-07-24 05:31:17 +02:00
}
}
}
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 22:49:00 +02:00
Set<Context> sortedContexts = new TreeSet<>(new Comparator<Context>() {
@Override
public int compare(Context o1, Context o2) {
return o1.getKey().compareTo(o2.getKey());
}
});
sortedContexts.addAll(contexts);
final boolean customContexts = UIHelper.containsCustomContext(contexts);
Component flagContexts = UIHelper.getFriendlyContextString(claim, contexts);
Component hoverText = TextComponent.builder()
.append(hoverEventText)
.append(hoverEventText == TextComponent.empty() ? "" : "\n")
.append(UIHelper.getPermissionMenuTypeHoverText(flagHolder, displayType))
.append("\n")
.append(flagContexts)
.build();
Tristate newValue = Tristate.UNDEFINED;
Boolean value = flagHolder.getValue();
if (customContexts) {
if (value) {
newValue = Tristate.FALSE;
} else {
newValue = Tristate.TRUE;
2019-07-24 05:31:17 +02:00
}
} else {
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 22:49:00 +02:00
if (displayType == MenuType.DEFAULT || (displayType == MenuType.CLAIM && flagHolder.getType() == MenuType.DEFAULT)) {
newValue = Tristate.fromBoolean(!value);
} else {
// Always fall back to transient default
newValue = Tristate.UNDEFINED;
}
}
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
TextComponent.Builder valueBuilder = TextComponent.builder();
if (value) {
valueBuilder.append(MessageCache.getInstance().PERMISSION_TRUE.color(flagHolder.getColor()));
} else {
valueBuilder.append(MessageCache.getInstance().PERMISSION_FALSE.color(flagHolder.getColor()));
}
valueBuilder.hoverEvent(HoverEvent.showText(hoverText));
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 22:49:00 +02:00
TextComponent.Builder textBuilder = null;
if (hasEditPermission) {
textBuilder = TextComponent.builder()
.append(valueBuilder
.hoverEvent(HoverEvent.showText(hoverText))
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createFlagConsumer(src, holder, claim, flag, flagHolder, newValue, contexts, displayType))))
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 22:49:00 +02:00
.build());
} else {
textBuilder = TextComponent.builder()
.append(valueBuilder
.hoverEvent(HoverEvent.showText(hoverText))
.build());
}
// check source/target
Component source = null;
Component target = null;
final Component whiteOpenBracket = TextComponent.of("[", TextColor.WHITE);
final Component whiteCloseBracket = TextComponent.of("]", TextColor.WHITE);
for (Context context : contexts) {
if (context.getKey().equals(ContextKeys.SOURCE)) {
source = TextComponent.builder()
.append(whiteOpenBracket)
.append("s", TextColor.GREEN)
.append("=", TextColor.WHITE)
.append(context.getValue().replace("minecraft:", ""), TextColor.GOLD)
.append(whiteCloseBracket)
.hoverEvent(HoverEvent.showText(MessageCache.getInstance().LABEL_SOURCE))
.build();
textBuilder.append(" ").append(source);
} else if (context.getKey().equals(ContextKeys.TARGET)) {
target = TextComponent.builder()
.append(whiteOpenBracket)
.append("t", TextColor.GREEN)
.append("=", TextColor.WHITE)
.append(context.getValue().replace("minecraft:", ""), TextColor.GOLD)
.append(whiteCloseBracket)
.hoverEvent(HoverEvent.showText(MessageCache.getInstance().LABEL_TARGET))
.build();
textBuilder.append(" ").append(target);
}
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
if (customContexts) {
textBuilder.append(" ")
.append("[", TextColor.WHITE)
.append(TextComponent.builder()
.append("x", TextColor.RED)
.hoverEvent(HoverEvent.showText(MessageCache.getInstance().FLAG_UI_CLICK_REMOVE))
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
.clickEvent(ClickEvent.runCommand(GDCallbackHolder.getInstance().createCallbackRunCommand(createFlagConsumer(src, holder, claim, flag, flagHolder, Tristate.UNDEFINED, contexts, displayType))))
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 22:49:00 +02:00
.build())
.append("]", TextColor.WHITE);
}
return textBuilder.build();
2019-07-24 05:31:17 +02:00
}
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
private Consumer<CommandSender> createCustomFlagConsumer(GDPermissionUser src, GDClaim claim, GDFlagDefinition flagDefinition, Tristate currentValue, String flagGroup) {
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 22:49:00 +02:00
final Player player = src.getOnlinePlayer();
2019-07-24 05:31:17 +02:00
return consumer -> {
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 22:49:00 +02:00
GDCauseStackManager.getInstance().pushCause(player);
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
Set<Context> definitionContexts = new HashSet<>(flagDefinition.getContexts());
boolean addClaimContext = false;
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
boolean addClaimOverrideContext = false;
final Iterator<Context> iterator = definitionContexts.iterator();
while (iterator.hasNext()) {
final Context context = iterator.next();
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
if (context.getKey().equalsIgnoreCase(ContextKeys.CLAIM_OVERRIDE) && context.getValue().equalsIgnoreCase("claim")) {
iterator.remove();
addClaimOverrideContext = true;
} else if (context.getKey().contains(ContextKeys.CLAIM)) {
iterator.remove();
}
Update for 1.4.2 release. * Fix entity damage not passing source in all cases. * Fix vehicle destroy source. * Fix collision interactions being ignored. * Fix #vehicle context not being added on vehicle item use. * Fix 'any' context showing up as 'all'. * Fix context entity type format using '#' in front of name instead of modid. * Fix parent exit claim messages showing on subclaims. * Fix block-place using wrong target in some cases. * Fix NPE during chunk load on new world creation. * Fix claim resize/subdivide resetting on error. * Fix offline players not being found with some commands. * Fix NPE in migrator during claim migration of subclaims. * Fix accrued blocks not being set for players if value exceeded max during migration. * Fix playerdata migrate file not being created if parent folder did not exist. * Fix hover contexts for partial results in flag GUI. * Fix #pet tag not being formatted properly with contexts. * Fix entity-damage used_item context not being added. * Add new group context #hanging which represents hanging entities such as item frames. * Add lava source to fire-spread flag definition. * Add user context support for advanced flag GUI. * Add endercrystal-use and armorstand-use definitions. * Add entity-damage-source-blacklist. * Add active claim visual time to config. * Add tag support for used_item. * Add visual tracking for create block visuals. * (Bukkit) Add extra permission check when using item on a block. * Add gd_claim_override=claim context to water-flow flag definition. * Add new admin command '/abandonworld [<world>]' which will abandon all user claims in world specified. * Add support for world argument in commands '/abandonall', '/deleteall', and '/deletealladmin'. * Add MC 1.16.1 support. * Update kyori libraries to latest. * Don't process stair blocks on right-click. * Refactor ADMIN group handling in PRESET GUI. - All ADMIN flags will now be forced to claim only. - If you want to change flags globally then simply provide a default context in the definition which will be applied at startup. * Cleanup USER PRESET hover for normal users. * Improve persistent check done if a user is trusted. - Only non-claim owners that are trusted will have an additional permission check to see if an admin denied/allowed something via a flag not given by trust system. * (Hybrid) Add mod registry support for hybrid servers. * (Hybrid) Add mod category to 'global.conf' to identify fakeplayers and mod id's. * (Hybrid) Add initial fakeplayer support. * (Hybrid) Added pixelmon animal support. * (Hybrid) Added #pixelmon:animal tag for natural spawns. * Check user/group permission excluding default group before trust is checked. Note: This allows admins to allow/deny permissions while using trust. Note: Only '/cfp' and '/cfg' is supported. * Only check persistent permissions with overrides. * Change user context to support all claim types except wilderness. * Change global context to support all claim types including wilderness. * Rename /cfd command to /cfdebug to avoid accidental use. * Disable /cfdebug on logout.
2020-06-25 09:15:24 +02:00
addClaimContext = true;
}
1.3.1 Update * Fix wrong type being displaying in /claiminfo. * Fix claim teleport in nether. * Fix claim visuals in/out of liquids. * Fix inventory check on interaction. * Fix walkspeed, gamemode, and weather options not resetting back to default on claim exit. * Fix option gui not displaying decimals for doubles. * Fix entity dupe on schematic restore. * Fix claim schematic creation dates on load. * Fix wither causing damage when spawned by players. * Fix ice/snow form flags. * Fix visuals not showing on snow. * Fix inability to attack tameable entities with no owner. * Fix claim cleanup task exiting prematurely. * Fix scaffolding not breaking fully. * Fix Flag GUI preset/advanced translations. * Fix '/cog <group>' not displaying options for group. * Fix option GUI toggle value hover. * Fix block burn across blocks not triggering block-spread. * Fix monsters such as phantom and ghast not being ignored during entity-damage checks. * Fixed tamed entity protection when source is not entity. * Fix snow-melt showing up as block-modify instead of block-break * Fix player buckets not checking place or break. * Fix 'fire-spread' and 'vehicle-use' flag definitions. * Fix NPE when changing claim type * Fix visuals loading unloaded chunks. * Fix player options not being set while in claim. * Fix isTileInventory check. * Fix user playerdata in PlaceHolderProvider. * Fix claim resize exploit. * Fix flag definitions GUI not showing inheritance values. * Fix entity explosion getting wrong user sometimes. * Fix tracking data not always being saved. * Fix #crops tag not working. * Fix tnt chain explosions. * Add 'player-fly-speed' option. * Add support for decimal values in option GUI. * Add missing translation when deleting all player claims. * Add restore claim in progress message. * Add pl_PL language support. Thanks to Maul for contribution * Add permission 'griefdefender.admin.bypass.pvp-creative' to bypass pvp creative protection. * Add permission 'griefdefender.user.claim.rent.base' for new '/claimrent' command. * Add permission 'griefdefender.user.claim.rent.sign' to control rent sign usage. * Add permission 'griefdefender.user.claim.sell.sign' to control sell sign usage. * Add flag definition 'turtle-egg-hatch' * Add flag definition 'falling-block-break' . * Add flag definition 'fire-entity-damage'. * Add flag/option enable control to respective configs. * Add group context support for flag definitions. * Add new context gd_claim_default=user and gd_claim_override=user which applies to all claim types except wilderness and admin. * Add owner override support with gd_claim_override=claim context. You can use this context to have owners be affected in claims. They also have the ability to toggle these. * Add villager-trade and villager-farm definitions. * Add /claimtax command. * Add /claimrent command. Note: To create a rental via command ex. /claimrent 10h - creates rental for $10 per hour ex. /claimrent 10h 5 - creates rental for $10 per hour w/ max 5 days. * Add claim restore functionality for 1.14+ servers. Note: To restore a claim, use /claimrestore * Add toggle support for isExpired in /claiminfo * Add Rent/Sell signs. * Add item frame rotation protection. * Add support for 'AsyncWorldEdit'. * Add /claimrent command for displaying rentable claims. * Add PvP config to manage pvp control. * Add PvP protection when flying during PvP. * Add PvP protection when in creative mode. * Add override support for options. * Add gd_claim_override=claim support for /cf command. * Add entity-damage logs for monster damage. * Add tracking support for piston item spawns. * Add client visual queue to avoid sending too much traffic in a single tick. Default 12 block changes per tick. See 'client-visuals-per-tick' in global.conf to change. * Add 'filler-spacing' to visual config. Default 10 * Add explosion surface blacklists for block/entities. * Add new flag 'inventory-item-move' * Add falling block tracking. * Add rent-schematic-restore-admin for controlling rent restores in admin claims. * Add explosion-cancel-block-limit for controlling explosion block size limit in devents. * Enhance claim visual functionality. * Refactor visual backend to be more efficient with server resources. * Ensure block transactions are never sent more than once to client during a single visual update. * Further enhance visual functionality with left/right clicks. * Improve '/gddebug' by adding a fully functional filter. Ex. '/gddebug record creeper' would show all actions with creeper. Ex. '/gddebug record claim' will show only claim you are standing in. * Cleanup option permission lookups. * Implement visual API. * Improve claim getChunks call. * Improve context display in debug paste. * Allow renters to interact with living entities. * Allow bank/tax systems to be used separately. * Allow pistons to be protected in wilderness. * Confirm buttons will now be invalidated after first click. * Deny owner item spawns in claim that is rented and can restore. * Deny '/giveblocks' on self. * Check max accrued blocks during /giveblocks. * Only adjust accrued blocks when using /giveblocks. * Optimize tracking data saves. * Force last active date save on player login. * Ignore drowning damage. * Move 'pvp' user definition to admin. * Change 'player-health-regen' option default to 0. * Change 'player-walk-speed' option default to 0. * Change 'tax-rate' option default to 0.1 * Change 'fall-entity-damage' to global default context. * Change 'fall-player-damage' to global default context.
2020-06-06 01:26:14 +02:00
if (addClaimOverrideContext) {
definitionContexts.add(claim.getOverrideClaimContext());
} else if (addClaimContext) {
definitionContexts.add(claim.getContext());
}
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
Tristate newValue = Tristate.UNDEFINED;
if (currentValue == Tristate.TRUE) {
newValue = Tristate.FALSE;
} else {
newValue = Tristate.TRUE;
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 22:49:00 +02:00
}
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-31 00:25:55 +01:00
Update for 1.5.0 * Fix blockstate id lookup not using proper id when block data was different than actual block. * Fix block-break showing air as target when source block broke on its own. * Fix race condition when migrating GP Bukkit playerdata. * Fix race condition during flag definition saves. * Fix wrong owner showing in claim when non-owner changes claim type. * Fix explosions causing no sound when cancelling event. * Fix rent min message showing max. * Fix rent min payment not being applied as credit. * Fix rent restore not working on rent end. * Fix sell sign not working when rent system was disabled. * Fix '/abandonall' not giving all money back when using economy mode. * Fix '/claimsell' requiring for sale to be turned on. * Fix '/givepet' taming pets without owner. * Fix explosion sounds not triggering on cancel. * Fix pvp 'allow-fly' only affecting creative mode. * Fix confirmation message not showing after abandoning a subdivision. * Fix wrong location being checked when placing water/lava with bucket. * Fix dynmap owner style colors not being used. * Fix NPE when using /reload. * Fix ghost claim overlap error when creating claim. * Fix user showing up as cause when using rtp. * Fix high memory usage caused by GDClaimManager fastutil usage. * (Bukkit) Fix NPE during InventoryMoveItemEvent. * (Sponge) Fix explosion-surface being triggered with no settings. * Refactor CompletableFuture handling when applying LP permissions and meta to avoid race conditions. * Remove owner override context for flag definition 'fire-spread' as it doesn't affect global overrides. * Change flag definition 'turtle-egg-hatch' target from 'air' to 'turtle-egg-hatch' * Change flag definition 'snow-melt' target from 'air' to 'snow' * Change onPlayerInteractBlockSecondary event priority from lowest to low in order to support plugins that need to cancel early. * Add support for CustomItems. Any customitem used in game will show up in debug as customitems:<item_id>. You can also use customitems for modification and investigation tool in config. * Add support for Slimefun4. Any slimefun item/block used in game will show up in debug as slimefun:<id>. You can also use slimefun items for modification and investigation tool in config. * Add '/acball' command for adjusting all online players' bonus blocks. * Add '/claiminvestigate' command to investigate claims. * Add '/claimtool' to toggle claim tool usage. * Add source/target any contexts to flag definitions. * Add 'piston-protection-in-claims' setting to control piston protection within claims. * Add pvp setting 'combat-logout' to determine if a player should be killed on logout during combat. Default 'false'. * Add `projectile-impact-entity` to `endcrystal-use` flag definition. * Add aquatic target for `monster-animal-damage` flag definition. * Add `restrict-world-max-height` to determine if claiming should be restricted to world max height. Default 'true'. * Add ability to control dynmap color settings by claim type. * Add permission griefdefender.user.claim.command.info.teleport.inside which controls whether a player can ONLY teleport within the claim they are in. This is useful if players become trapped. Note: This does not allow players to teleport to any other claim except the one they are in. It can only be used if the player cannot build in claim. * Add permission griefdefender.user.claim.command.info.others.creation-date to control whether a player sees creation date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.last-active to control whether a player sees last active date in /claiminfo * Add permission griefdefender.user.claim.command.info.others.claim-uuid to control whether a player sees claim uuid in /claiminfo * All flag definitions will now persist. * Refresh player option cache on permission change. * Show TP info in '/claiminfo' when player does not have TP permission. * (Sponge) Use 'tnt' as identifier instead of 'primedtnt' to match bukkit. * (Sponge) Use 'item_frame' as identifier instead of 'itemframe' to match bukkit.
2020-08-16 06:39:38 +02:00
PermissionUtil.getInstance().setFlagDefinition(GriefDefenderPlugin.GD_DEFINITION_HOLDER, flagDefinition, newValue, definitionContexts, false).thenAccept(r -> {
Bukkit.getScheduler().runTask(GDBootstrap.getInstance(), () -> {
GDCauseStackManager.getInstance().popCause();
showCustomFlags(src, claim, flagGroup);
});
});
2019-07-24 05:31:17 +02:00
};
}
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
private Consumer<CommandSender> createFlagConsumer(GDPermissionUser src, GDPermissionHolder holder, GDClaim claim, Flag flag, FlagContextHolder flagHolder, Tristate newValue, Set<Context> contexts, MenuType displayType) {
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 22:49:00 +02:00
final Player player = src.getOnlinePlayer();
return consumer -> {
GDCauseStackManager.getInstance().pushCause(player);
Set<Context> newContexts = new HashSet<>(contexts);
if (displayType == MenuType.CLAIM && newValue != Tristate.UNDEFINED) {
final Iterator<Context> iterator = newContexts.iterator();
while (iterator.hasNext()) {
final Context context = iterator.next();
if (context.getKey().equals("gd_claim_default")) {
iterator.remove();
}
}
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 22:49:00 +02:00
newContexts.add(claim.getContext());
}
2019-07-24 05:31:17 +02:00
Context serverContext = null;
final String serverName = PermissionUtil.getInstance().getServerName();
if (serverName != null) {
serverContext = new Context("server", serverName);
}
// Check server context
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 22:49:00 +02:00
final Iterator<Context> iterator = newContexts.iterator();
boolean hasServerContext = false;
boolean hasDefaultContext = false;
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 22:49:00 +02:00
while (iterator.hasNext()) {
final Context context = iterator.next();
if (context.getKey().equals("server")) {
hasServerContext = true;
} else if (context.getKey().equalsIgnoreCase("gd_claim_default")) {
hasDefaultContext = true;
}
}
if (!hasServerContext && serverContext != null) {
newContexts.add(serverContext);
2019-07-24 05:31:17 +02:00
}
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 22:49:00 +02:00
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
GDFlagPermissionEvent.Set event = new GDFlagPermissionEvent.Set(holder, flag, newValue, newContexts);
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 22:49:00 +02:00
GriefDefender.getEventManager().post(event);
GDCauseStackManager.getInstance().popCause();
if (event.cancelled()) {
return;
}
if (displayType == MenuType.DEFAULT || (hasDefaultContext && src.getInternalPlayerData().canManageFlagDefaults)) {
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
CompletableFuture<PermissionResult> future = PermissionUtil.getInstance().setPermissionValue(holder, flag.getPermission(), newValue, newContexts);
future.thenAccept(r -> {
Bukkit.getScheduler().runTask(GDBootstrap.getInstance(), () -> {
showFlagPermissions(src, claim, displayType);
});
});
return;
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 22:49:00 +02:00
}
final Context permServerContext = serverContext;
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
CompletableFuture<PermissionResult> future = PermissionUtil.getInstance().setPermissionValue(holder, flag, newValue, newContexts);
future.thenAcceptAsync(r -> {
if (!r.successful()) {
// Try again without server context
newContexts.remove(permServerContext);
Update for 1.5.5 release. * Add potion effects support. * Add item enchantment support. * Add pvp lookup methods for claim and playerdata. * Add 'block-tileentity-id-list' used to override mod block id's that are used for many TE's. - Ex. IC2 uses a base block id 'ic2:te' for all TE's. When the id is detected during block/item usage, it will be converted to the actual id. * Add TileEntity registry to better support hybrid servers. * Add '/claiminfo' UUID click support to copy text to chat. * Add support for overriding option 'player-command-exit/enter' on player. * Add command description translation support. * Add zh_HK language support. * Fix event cause not clearing on push. * Fix abandon claim within town returning funds to owner in economy mode. * Fix player afk detection during claim block task. * Fix async chunk load during visual revert. * Fix '/gd claim we' command. * Fix advanced flag GUI toggle with definitions. * Fix rent sign update not checking all children claims. * Fix rent sign not being updated when cancelled via '/claimrent cancel'. * Fix '/claimsell' on admin claim. * Fix NPE when attempting to purchase an admin claim for sale. * Fix command description translations. * Fix isInvulnerable NPE on 1.8.8 servers. * Fix '/abandonworld' exiting when no economy data found for player. * Fix '/deletealladmin' only deleting admin claims in current world when passing no world argument. * Fix '/claimcontract' and '/claimexpand' NPE in economy mode. * Fix GD claim enter/exit prefix. The prefix will now use '[<playername>]'. Note: This can be configured in lang file under 'claim-prefix-enter' and 'claim-prefix-exit' * Clean up advanced flag GUI code. * Disable /buyblocks command when economy-block-cost is <= 0 * Deny town claim abandon if basic claims exist owned by owner. * Allow to input string as option value. * Improve pvp source contexts. * Clean up '/acb' command code. * (Bukkit) Add potion splash protection support. * (Bukkit) Fix tamed entities being hit by projectiles. * (Bukkit) Fix enderman block place protection. * (Hybrid) Fix wrong EnumCreatureType being registered for entities. * (Hybrid) Add TileEntity registry. * (Hybrid) Add mod command support for 'command-execute' flag. * (Sponge) Add PlaceHolderAPI support. * (Sponge) Add Nucleus v2 support. * (Sponge) Add IgniteEntityEvent support. * (Sponge) Fix '/cpp' and '/cpg' command. * (Sponge) Fix player block placement deny not sending message. Fixes #4 Fixes #200, Fixes #206, Fixes #222 Fixes #232, Fixes #237, Fixes #267 Fixes #269, Fixes #276, Fixes #296 Fixes #310, Fixes #311, Fixes #317 Fixes #324, Fixes #333, Fixes #334 Fixes #335, Fixes #336, Fixes #347
2020-12-28 23:28:12 +01:00
CompletableFuture<PermissionResult> newFuture = PermissionUtil.getInstance().setPermissionValue(holder, flag, newValue, newContexts, false, true);
newFuture.thenAccept(r2 -> {
if (r2.successful()) {
Bukkit.getScheduler().runTask(GDBootstrap.getInstance(), () -> {
showFlagPermissions(src, claim, displayType);
});
}
});
} else {
Bukkit.getScheduler().runTask(GDBootstrap.getInstance(), () -> {
showFlagPermissions(src, claim, displayType);
});
}
});
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 22:49:00 +02:00
};
}
private Consumer<CommandSender> createCustomFlagConsumer(GDPermissionUser src, GDClaim claim, String flagGroup) {
return consumer -> {
PaginationUtil.getInstance().resetActivePage(src.getUniqueId());
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 22:49:00 +02:00
showCustomFlags(src, claim, flagGroup);
};
}
private Consumer<CommandSender> createClaimFlagConsumer(GDPermissionUser src, GDClaim claim, MenuType flagType) {
return consumer -> {
PaginationUtil.getInstance().resetActivePage(src.getUniqueId());
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 22:49:00 +02:00
showFlagPermissions(src, claim, flagType);
};
2019-07-24 05:31:17 +02:00
}
}