ProtectionStones [Updated for 1.20.6+] icon

ProtectionStones [Updated for 1.20.6+] -----

The easiest grief prevention method that players will enjoy!




Warning: This version is only compatible Minecraft 1.20.6 (& Java 21) and higher.

Features:
  • RGB support has been added to messages.yml, use &#abc123 to use hex colors
  • PSBreakProtectBlockEvent has been added, which is triggered when a protection block is broken
Fixes:
  • Custom heads are fixed for 1.20.6+
  • The enchanted effect option for protection blocks has been fixed for 1.20.6+
----------, Jul 5, 2024

It is highly recommended to update to this release, as it contains critical fixes.

Behavior Changes:

  • /ps home now directly teleports you to your home if you only have one home
Fixes:
  • Fixed potential for overflow and server hanging with several text based GUI menus (special thanks to Mati Salcedo for reporting)
  • Fix placing_bypasses_wg_passthrough behavior being denied in many cases
----------, Nov 13, 2023

Time for a new release!

Additions:
  • Added custom_model_data to block config, to better easily integrate with resource packs
Fixes:
  • Reduced regions save messages in the console from enabling taxes
  • Fix rent period limits using completely wrong values
  • Add debug messages for /ps tp wait movement
  • Add extra check against block form events
----------, Jul 14, 2022

Hi everyone,

This release fixes the following issues:
  • Fixed section symbols being generated in messages.yml instead of & (both are accepted)
  • Fix critical issue introduced in 2.10.0 with placing_bypasses_wg_passthrough allowing protection blocks to be placed in existing regions in certain cases
  • Fixed exploit with enchanted protection block items to get infinite xp in grindstones
  • Fix wither breaking block not respecting destroy_region_when_explode option
Thanks!
----------, May 15, 2022

Hey everyone,

This is a quick update that fixes an unintended API breakage in v2.10.0, which may have affected plugins using the ProtectionStones API.
----------, Apr 30, 2022

Hey everyone, it's time for another update!

Feature Additions

Add enchanted_effect block config option
A glow effect can now be enabled in the block config for the protection block when shown in the inventory.

Add ability to place regions where block placing is denied in general
Add "placing_bypasses_wg_passthrough" to the config, allowing protection blocks to be placed even if WorldGuard doesn't allow it for regular blocks.

Add /ps unclaim [region-id]
It is now possible to remove regions remotely, when the protectionstones.unclaim.remote permission is given.

Other Changes
  • Add currentplayer_protection_placing_enabled placeholder
  • Show crafting recipes in help book
  • Raise /ps view particle view distance to 150 blocks (from 30)
  • Request block break event cancellation earlier in the event chain, improving compatibility with certain plugins
  • Regions with the "passthrough allow" are now ignored when checking region distances and overlap
  • Fix region distance checks checking the region that is being placed
  • Fix removal of regions that are parents of other regions (/ps setparent) causing their children to be deleted
  • Fixed errors when using flags that do not have group types available
  • Fixed LuckPerms group permissions not being taken into account for checking offline player protection block limits
  • Fixed added members/owners not being evicted from rented region when rent periods end
  • Fixed errors when non-merged regions are polygonal (not square)
----------, Apr 27, 2022

This build is only compatible with 1.17+/Java 16+!

Please read the v2.9.0 announcement if you are upgrading from an older version.

Fixes:
  • Fix /ps on and /ps off being swapped
  • Fix protection blocks not being protected from wither body explosions
  • Fix allow_other_regions_to_overlap = none from interfering with distance_between_claims
----------, Dec 27, 2021

This build is only compatible with 1.17+/Java 16+!

Starting with this release, the minimum version needed will be Minecraft 1.17 in order to add support for newer Minecraft features. Support for versions 1.13-1.16 has been dropped.

New Features:

1.17 Support
Support for negative-y values has been added into the plugin. Older regions will be automatically updated in order to cover negative-y values.

Added block chunk snapping
Added the chunk_radius block option, a new way of claiming regions. This replaces the classic x_radius and z_radius options if specified, and allows players to claim based on chunk boundaries instead of simply distance from the protection block. Players can claim in a much neater way, and not have to worry about messy overlapping issues.

Members by default can now /ps home to regions they belong to
Added the config option allow_home_teleport_for_members (on by default), which allows members of regions to use /ps home to teleport to the region.

Other changes:
  • Added adjacent region checking for merging regions (regions next to each other can merge, don't have to overlap)
  • Added new placeholders for accessing region names
  • Added /ps admin cleanup preview (and removed /ps admin cleanup disown)
  • Add playerlist tab autocomplete for /ps list
  • Added protectionstones.view.others permission
  • /ps help now ignores blank lines
  • Added helpful warning and error messages for block config flags
  • Removed x_offset, y_offset and z_offset, as they fundamentally don't work
----------, Nov 4, 2021

This version fixes a critical issue in v2.8.4 that caused removing a single block in a merged region to either not work, or remove all of the protection blocks of that merged region.

Other Changes:
  • Added /ps on|off (you will need to update messages.yml in order to get the new help message for /ps toggle|on|off)
  • Only add id or name, not both to /ps home tab autocomplete
----------, Jun 21, 2021

1.17 news: From my testing so far, the plugin seems to work fine without changes on 1.17, enjoy! Once 1.17 is mature and most servers have switched, I will likely drop support for < 1.17 versions so that I can support newer features like hexadecimal colours.

Changes:
  • Revamped /ps info entries in messages.yml for more customization, please change to the -2 suffix strings!
  • Removed unnecessary player queries with head checks, greatly improving overall plugin performance
  • Removed BlockPhysicsEvent event handling (laggy, and there are other events to prevent certain physics behaviour that is less laggy)
  • Add support for location yaw and pitch in /ps home/sethome
  • Added explicit message for /ps list with no regions
  • /ps admin stats now only counts PS regions
  • Added /ps admin debug
  • Fixed /ps addowner limit check with merged regions
  • Fixed /ps tp [name] [number] giving the wrong error message
  • Fixed allow_addowner_for_offline_players_without_lp config option upgrade
  • Prevent v1->v2 world upgrade from changing existing regions
  • Allowed the plugin to be compiled with Java 16 (Java 8 compiled version will work fine on Java 16 however)
----------, Jun 12, 2021

This is a quick update to fix an accidental debug message left in v2.8.0 that spams the console with tax processing messages if you have a large amount of regions and have taxes enabled.
----------, Apr 14, 2021

Hello,

This update contains some fixes.

Fixes:
  • Fixed the v2.8.1 config.toml upgrade not working (your configs will be upgraded with this release automatically)
  • Tweaked farewell actions to not show, if the greeting action is being shown (entering another region)
  • Fix added v2.8.1 region placeholders from including cross-world regions if they were named
----------, Apr 11, 2021

Hey!

Please read the changes regarding /ps admin cleanup.

This update fixes several issues with 2.8.0 and introduces some new features and helpful checks listed below.

Changes:
  • /ps admin cleanup was reworked to not remove inactive owners from regions if the region is not being deleted
  • cleanup_delete_regions_with_members_but_no_owners was added to config.toml, allowing you to have regions not be deleted if there are active members, but no active owners (disabled by default)
  • Added the following placeholders:
    Code (Text):
    protectionstones_currentplayer_num_of_owned_regions_world
    protectionstones_currentplayer_num_of_accessible_regions_world
    protectionstones_currentplayer_num_of_accessible_regions
    protectionstones_currentplayer_owned_regions_ids_world
    protectionstones_currentplayer_accessible_regions_ids_world
  • Added a different message for when the player is unable to place a protection block due to a block specific permission, rather than protectionstones.create
  • Players are now prevented from removing themselves as the owner of a region if no other owners are left
  • Added clarification that allow_use_in_crafting has to be enabled in order to use protection blocks as crafting ingredients
  • Fixed console error messages with /ps home due to changed world cache
  • Fix flag placeholders not applying when reset to default
  • Added support for %player% flag in /ps admin flag
As always, please report bugs if you see them!
----------, Apr 2, 2021

Hey everyone,

This update batches together bug fixes and feature additions from the past few months. It is recommended to read through, as some default behaviour has changed.

#1 - Important fix for limits

/ps addowner used to be able to bypass protection limits (protectionstones.limits.x), and was now fixed with this update. However, this required adding a soft-dependency on LuckPerms in order to lookup limits of offline players as the Vault and Spigot API are unable to see offline player permissions. If you do not have LuckPerms, /ps addowner will be disabled for offline players since it is impossible to know the player's protection block limit.

However, you can set allow_addowner_for_offline_players_without_lp to true in config.toml to bypass this restriction.

#2 - Protection blocks by default now cannot be smelt in furnaces
This prevents accidentally using protection blocks in the furnace, and also prevents infinite ingredients if protection blocks are free. Toggle the allow_smelt_item option in the block config to change this.

#3 - Protection blocks by default now cannot be used as ingredients in crafting
This prevents accidentally using protection blocks in crafting, and also prevents infinite items if protection blocks are free. Toggle the allow_use_in_crafting option in the block config to change this.

Additions:

  • Add allow_smelt_item option to toggle whether protection blocks can be smelt in the furnace (default is false)
  • Add allow_use_in_crafting to toggle whether protection blocks can be used in crafting (default is false)
  • Add currentplayer_num_of_owned regions placeholder
  • Add console_message event action
  • Run config specified creation event actions on the next tick, so that the region will have already been created when running the actions
  • Add %world% variable to event section
  • Added ability to do per block /ps admin cleanup with [-t typealias] option
  • Add default_protection_block_placement_off to have protection block placement off by default (/ps toggle on join effectively)
  • Add allow_addowner_for_offline_players_without_lp for offline permissions workaround

Fixes:

  • Important: /ps admin cleanup is now much safer and faster for extremely large cleanups involving thousands of regions, and does not crash the server
  • Important: Fix block limits not being checked for /ps addowner
  • Important: Added LuckPerms soft-dependency to lookup offline player permissions
  • Important: Fixed pvp flag from being set to null when flag group is restricted to all (region members can kill nonmembers, but nonmembers can't damage region members)
  • Fixed multiple cases where explosions of protection blocks were not prevented when prevent_explode was true
  • Added extra checks and event prevention for protection blocks (leaf decay, liquids, etc.)
  • Fixed /ps admin help messages not reflecting the base command if it is not /ps
  • Disregard regions without a configured block type to fix many issues with unconfigured block types and batch operations
  • Store world ids, not world objects in cache, greatly reducing RAM usage
  • Added merging hole checks to /ps unclaim
  • Prevent placing of protection blocks where hidden blocks exist
  • Fix UnsupportedOperationException from getPSRegions singletonList
----------, Feb 14, 2021

I lied, there is another bug patch release! I've been quite busy with school, so I am prioritizing maintaining stability and bug fixes over new features for now.

Fixes:
  • Fix blocks getting placed anyway when other plugins attempt to block a protection block from being placed
  • Remove restrictions on block offset for negative values
  • Fix base64 heads from breaking with crafting recipes
  • Adjust no moving when waiting for teleport threshold to be slightly more lenient (half a block rather than exact)
  • /ps admin recreate now skips problematic regions and shows a warning rather than error out and stop the entire process
  • Sped up the physics event slightly (performance)
----------, Oct 24, 2020

Hey,
This is a minor bug fix update for the v2.7.x branch. This will likely be the last update before work begins on v2.8.0.

Fixes:
  • Fix PS aliases with non ascii characters from causing errors with crafting recipe registration
  • Fix /ps unhide for versions before 1.16 with custom base64 heads
  • Minor code refactoring to make head protection blocks perform faster
----------, Sep 2, 2020

Hello,

This is another bug fix update, that addresses various issues including supporting the new UUID format for NBT in 1.16.

Fixes:
  • Fix /ps flag gui not carrying groups values correctly
  • Fix /ps flag chat GUI colours
  • Fix 1.16.1 base64 heads causing server freezes and not showing textures (converted to new 4 int UUIDs)
  • Fix wrong name for SkullOwner nbt tag in /ps unhide for base64 heads
  • Give defaults for config.toml rather than erroring out if the field does not exist
----------, Jun 30, 2020

Hey,

This update contains a few critical fixes, as well as some minor feature additions.

Fixes:
  • Fixed invalid yml in messages.yml from resetting the file
  • Fixed shift right click block to remove behaviour from being used on other blocks of the same type
  • Other minor fixes and checks
Additions:
  • Added prevent_ps_home config option, to prevent certain region types from showing up in /ps home
  • Added event variables block_x, block_y, block_z for coordinates of block placed or broken
  • Added /ps give [block] [player] [amount]
----------, May 14, 2020

Hey!

This is another patch update, with some minor additions as well.

New Features:
  • allow_placing_in_wild block config option (useful for region types meant for plots)
  • currentplayer_total_tax_owed placeholder
  • Added /ps admin changeregiontype for quick block type changes (useful for debugging and migrating regions)
Fixes:
  • Reduce the amount of tax messages, if nothing is being paid
  • Fixed cost-on_place placing the block when the event is prevented
  • Various other fixes
----------, Apr 14, 2020

Please read this, as there is a highly recommended manual config change.

There was a longstanding bug with /ps get where the description shown would be (xradius x yradius), which is wrong, because the actual dimensions of the region are xradius*2+1 by yradius*2+1. I've decided to take this as an opportunity to add descriptions for protection blocks.

I will be keeping the incorrect radiusx and radiusy to avoid confusing server owners, but I highly recommend doing what I say below.

There is now a new config option in the block config called "description". This should be shown instead of the old message for describing blocks in /ps get. In order for this message to be shown, you need to either reset messages.yml (delete it, the plugin will regenerate with default), or change the "gui_block" field to:

Code (Text):
'&7> &b%alias% &7- %description% (&f$%price%&7)'
Other new features:
  • Added allowed_types_to_merge_into config option, allowing control over which types of regions a region type can merge into
  • Added the ability to prevent owners from overlapping their own region ("none" option for allow_other_regions_to_overlap)
Fixes:
  • Fixed tenant from being listed as seller in /ps info
  • Fixed random errors from renting regions while removing region owners
----------, Apr 7, 2020

This is a quick fix for some servers that may have some player data stored with only a UUID and not a name.
----------, Apr 5, 2020

Hey!
It has been a while since the last major release!

New Features and Changes
  • Placeholders for PlaceholderAPI! View them here: https://github.com/espidev/ProtectionStones/wiki/Placeholders
  • Taxes for regions! Enable them and configure them in the config.
  • Player names are now case insensitive for commands like /ps add and /ps remove
  • For rented regions, tenants are now members by default, and landlords remain as owners of the region. Configure this behaviour with the new tenant_rent_role and landlord_still_owner config options
Fixes
  • Fixed various renting exploits with region merging
  • Fixed various behaviour with owners being removed during sales and renting
  • Various other fixes
Please report bugs!
----------, Apr 3, 2020

Hey everyone,

This will likely be the last 2.6.x patch release. I've tried to focus a lot on the stability of the plugin for a while, but I feel I am at the point where I feel comfortable adding more ambitious features again (2.7.0!).

New Features:
  • Use other protection blocks as crafting ingredients for a protection block! This can be done by using PROTECTION_STONES:alias in the recipe section of the block config
Fixes:
  • Fixed rents not working with offline landlords
  • Fixed ugly errors with problematic crafting recipes
  • More safe checks relating to offline players
----------, Mar 29, 2020

Hey,
This is another round of bug fixes.

Fixes:
  • Fixed cross-world name behaviour, now regions named with /ps name can be seen with /ps home no matter which world you are in
  • Fixed client disconnection with changing greeting and farewell messages, since their default value contains § and MC doesn't like that
  • Fixed overlapping issue with owners overlapping themselves
  • Fixed overlapping region check with manually created WorldGuard regions
  • Fixed errors from worlds that have WG disabled
----------, Feb 19, 2020

Fixes:
  • Critical fix for plugin not preventing block place from overlapping plain WG regions (was introduced in 2.6.6)
Additions:
  • New -a option for /ps add, /ps remove, /ps addowner and /ps removeowner! -a does the operation on all of the regions the player owns.
----------, Feb 9, 2020

Hello!

Another release already? Some more issues were reported and so I decided to speed up the release for the fixes for these bugs.

Additions:
  • Whitelist groups for allowed_flags! You can now whitelist which groups are allowed when changing the flag with /ps flag -g [group] [flag] [value], by now being able to do use "-g [group1],[group2]... [flag]" in allowed_flags! The documentation is in the default config, and does not automatically update the comment.

Fixes:
  • Fixed duplication bug with two different region types being unmerged and 2+ regions be created from that unmerge
  • Fix ps name cache from not being reloaded when dealing with 3+ regions being involved in an unmerge
----------, Feb 4, 2020

Hey,

There have been a lot of bug reports and feature requests lately, and this deals with a bunch of them.

It is highly recommended to upgrade to this version, since some critical bug fixes were added.

Additions:
  • Added "allow_other_regions_to_overlap", which allows you to set what types of players can overlap a region. Useful for making town plots with subregions.
  • Added merged region count to /ps count
Bug Fixes:
  • Fixed merged regions returning the wrong block type when sub region blocks in a specific order (critical)
  • Fixed name cache not reloading when removing regions (ex. /ps home [name] not working)
  • Fixed /ps info from erroring when standing inside of a protection block (ex. heads)
  • Fixed explosions not dropping the block with correct NBT data
----------, Feb 2, 2020

Hey everyone,

I've recently had a lot of issues reported to me, and I did not have the chance to fix them until now. Thank you for the bug reports! Please continue to report them on the discussion page, and on GitHub.

Additions:
  • Added protectionstones.flags.edit.[flag], allowing you to deny flags for certain players, even if it is on the "allowed_flags" list. In order to deny it, set the permission to false (ex. protectionstones.flags.edit.tnt false)
Fixes:
  • Prevent hidden players from showing up on command autocomplete
  • Fixed protectionstones.limit.x conflicting with protectionstones.limit.block.x
  • Fixed -e flags, and made it more flexible in the config (ex. "deny-message -e")
  • Fixed tile entity errors when using a head protection block with auto_hide
  • Prevented blank lines from sending in /ps help if the message was blanked out
  • Fixed default config tabs
----------, Jan 24, 2020

Hey,

This is another fix and improvement update:
  • Added -e (empty flag) support for flags in config, allowing for disabling block break warning messages
  • Added rent limits to config.toml, allowing to set limits for the amount of time and the amount of money renting costs
  • Fixed protectionstones.adjacent.-1 from not working
  • Fixed /ps buy not checking the amount of money a player has
  • Fixed /ps buy having no message when a limit is reached
  • Better handling of regions not having a configured type issues
  • Preliminary work for taxes in 2.7.0
----------, Jan 5, 2020

Hey!

New Features:
  • Added permission protectionstones.rent.limit.x, limiting the number of rented regions a player can have
Fixes:
  • Fixed heads using player names giving the wrong item
  • Fixed limits not applying to regions obtained with /ps buy
I've been pretty busy with school, so I've only been able to focus on bug fixes. As always, please report bugs to the issue tracker, or the discussion page!
----------, Nov 29, 2019

Hey!
This update contains a new round of bug fixes.

Fixes:
  • Fixed heads as protection stones from being water logged
  • Fixed tenants being able to steal the landlord's region
  • Fixed merged regions using parent regions rather than root regions
  • Added options for /ps admin forcemerge (to make its requirements less strict)
----------, Nov 15, 2019

Hey, this is a quick bug fix release.

Fixes:
  • Prevented water from washing away protection blocks
  • Prevented players from using /ps rent on their own regions
----------, Nov 5, 2019

Hey, it's been a while since the previous update!

New Features:

Player Heads now support custom heads!

I'm aware that there were many issues with the way player heads as protection stones was implemented, so I have rewritten the code to work. I've also added support for custom heads from sites such as minecraft-heads.com. In order to add them, get their base64 value and put it after PLAYER_HEAD: as the block name.

Experimental Economy Features!
  • Note that this is experimental, and is bound to change from community feedback!
  • /ps rent for renting related commands
  • /ps buy/sell to buy and sell regions
  • Requires the permission protectionstones.buysell and protectionstones.rent
  • Future support for renting and buying signs
Added allow_shift_right_break to block configs!
This allows for players to use shift-right click to break their protection block! (useful for bedrock and other unbreakable blocks)

Added cost_to_place to block configs!
This allows for charging players when they place down a protection block (rather than charging when they do /ps get)

Added hidden_flags_from_info to block configs!
This hides specific flags from /ps info, so that the list does not look spammy.

Added auto_merge to block configs!

This allows for protection stones that are placed to automatically attempt to merge into any overlapping regions, without needing to use /ps merge menu.

Added new entries to /ps info!

/ps info now shows more information, such as merged regions, region types, and also the renting and buying information!

Fixes:

  • /ps admin changeblock now uses aliases instead of block types
  • home_offset options now accept decimal numbers rather than integers
  • player head code as protection block was rewritten to fix all of the bugs from 2.5.0
  • Fixed errors from trying to show action bar to offline player

As always, please report issues!
----------, Nov 2, 2019

Hey,

This update adds features that have been proposed by the community, as well as fixing some bugs in the plugin.

New Features:

Player head support as ProtectionStones region block!

You can now use player heads as ProtectionStones region block type! Use the format PLAYER_HEAD:name (ex. PLAYER_HEAD:Notch) to specify a player head as a region block type.

greeting-action and farewell-action flags!

These custom flags add the same functionality as the greeting and farewell flags when you enter and leave regions, except they show up as action bars! These have replaced greeting-title and farewell-title as the default since they are are less intrusive on the screen for players.

PlaceholderAPI support in string flags!
You can now use PlaceholderAPI tags in string flags (ex. greeting, farewell)!

Pages for /ps home and /ps help!
/ps help was getting very long so there are now pages. Since this page system was made to be reusable, it was used for /ps home as well.

/ps admin changeblock [world] [fromblock] [toblock]

You can now change ProtectionStones regions to different blocks, if you ever wanted to switch the block type for a region type. Both region types must be configured for this to work, so keep them both loaded before removing the old region type toml config file!

/ps admin forcemerge [world]
Force regions that are overlapping and have the same owners, members and flags to merge together.

allow_merging_holes option in config.toml
Allow whether or not there can be unprotected holes in merged regions. Prevents the dynmap line issue as well as preventing players from surrounding other regions using their region.

/ps admin help

/ps admin was getting very long, so I've made a full help section for it.

Thanks!
Please continue to report issues on GitHub or on the discussion page!
----------, Sep 23, 2019

Hey,
This is a patch update for the 2.4.x branch, fixing regions being removed by blocks with the same type as existing protection blocks, despite not being the actual region block.

While I do feel 2.4.x is now stable (though I said this about 2.4.0), you can still use 2.3.1 for the time being if you do not need the merging regions functionality.

Please continue to report issues you encounter, thank you!
----------, Aug 26, 2019

Hey,
Many issues have been reported by the community about 2.4.x, and I am unable to fix the for the time being (since I am on a trip), so I am recommending that server owners revert to 2.3.1.

Warning: The issues only affect ores as protection stones, so don't downgrade if you are using different blocks.

You can simply replace the plugin jar. Regions that have already been merged will have the secondary protection blocks ignored, so it is recommended to unmerge regions before downgrading.

Sorry for the inconvenience.
----------, Aug 25, 2019

Hey,
This update fixes pistons so that they can't push the protection blocks of merged regions. It also prevents merged region protection blocks from absorbing water (sponge).
----------, Aug 23, 2019

Hello!

This was probably one of the most complex features I've added to the plugin...

Introducing region merging!
Players can now merge regions using either /ps merge while in a region, or once you place down a protection block that overlaps an existing region you own. Players will need the permission protectionstones.merge to be able to use it. Merged regions are in fact one region, meaning that flags, members, owners and other settings will be shared across the region. When you break a protection block in a merged region, it will unmerge the region using the protection block as if the block was never part of the original region.

Merging can be disabled in the config if you wish, since there may be performance hits when unmerging very large and complex regions. Other than that, performance is fairly optimal.

/ps view particles!
Since regions are now much more complex to showcase, I've switched over /ps view to particles since they are less laggy to render for the client, and work much better for visualizing complex borders. They also now show where the protection block is.

State of the project
I'm going to be gone for ~2 weeks, so I'll maybe be able to do maintenance and help with issues but there won't be any feature development for the time being.

Thank you!
Be sure to report issues you have to either GitHub or the discussion page!
----------, Aug 22, 2019

Hey,

This version contains a bug fix for flags when doing /ps flag and showing the GUI.
----------, Aug 19, 2019

Hello everyone,

This update is a fairly big one, addressing many issues and adding features suggested by the community.

New Features:
  • Added tab completion for commands
  • Added /ps get text GUI
  • Added /ps flag text GUI (this one took a while)
  • Added config option to only allow protection regions to be created next to other protection regions you own (to prevent random spreading of regions)
  • Added config option to allow block placing in a restricted world (it won't create a protected area)
  • Added config option allow for offsetting the protection block from the WG area (doesn't have to be in the centre)
  • Added config option to allow new regions to overlap unowned ones
  • -g (group flags) are now allowed in the flags section of the block config
  • Added config option to disable /ps get on a block
Fixes:
  • UUIDs+name associations are now added to the WorldGuard cache, so player names will show up on dynmap as well as /rg info instead of UUIDs!
  • Custom crafting recipes will now work for more than one block
  • Custom crafting recipes will now not affect other plugins
Thank you! Please report bugs on either GitHub (preferable) or the discussion page!
----------, Aug 13, 2019

Hello,

This update fixes the bug where /ps tp [player] [num] ignores the [player] name, and also adds a clickable GUI when you do /ps home, allowing for easy teleportation!

The next major planned update (2.3.0) will focus on doing some region manipulation with protection stones regions.

Thank you, and please continue reporting issues on either GitHub or the discussion page!
----------, Aug 2, 2019

Hey,
This is a quick update adding some fixes for issues reported by the community.

Fixes:
  • Fixed /ps tp [player] [num] also finding regions the player is a member of, but doesn't own
  • Added config option to toggle dropping item when inventory is full
  • Fixed issues where plugin would detect inventory is full but make region edits anyway
  • Allow for items to be dropped when inventory is full
  • API changes to getPlayerPSRegions, allowing for only giving a set where player owns all regions
----------, Jul 29, 2019

Hey everyone!

This update focuses on addressing the issues reported in the past month, as well as cleaning up the API, and adding custom events!

New Features:
  • Custom events in block configs! You can now have custom commands and messages when regions are created and destroyed!
  • Added /ps admin recreate, allowing to recreate PS regions with the size set in the config
  • Added protectionstones.info.others, allowing for using /ps info in unowned regions
API Changes:
  • The package name has been changed from dev.espi.ProtectionStones to dev.espi.protectionstones to follow Java standards. Please update existing code.
  • PSRegion creation methods have been moved from ProtectionStones to PSRegion static
  • Added more null preconditions
  • Fixed event listening causing errors
  • The JavaDocs are now available here: https://jdps.espi.dev
Bug Fixes:
  • Fixed error with /ps view when used outside of region
  • Fixed /ps admin cleanup not working at all
  • Fixed sponge duplication when used as a protection block and water is placed nearby
  • Fixed lack of error message when flag is not found in /ps admin flag
Thank you!
----------, Jul 28, 2019

Hello,
This is another patch release for the 2.1.x branch.

Fixes:

  • Fixes for per block limit permissions applying between blocks
  • Fix errors when doing /ps in console
  • Fix /ps admin flag just not working
  • Added more error catching and helpful messages
If you find any more issues, be sure to report them on the GitHub page, or on the discussion page!

Thank you!
----------, Jun 29, 2019

Hey,
This is the second patch release for the issues with protectionstones limits.

I believe that everything has been fixed.
----------, Jun 27, 2019

Hey,
This is a quick bug fix for the region limit permission be recognized as one lower than what is stated.

Sorry for the issues this may have caused.
----------, Jun 24, 2019

Hey!
This is probably one of the largest updates to the plugin, adding many new features, tweaks, as well as finally having the long awaited developer API!

Please read this post before updating, since some features have changed, with regarding to the new naming system.


Features + Changes:
Added /ps name [name]!

This command allows you to add aliases to each protection stone region. This is a fundamental change, since now other commands don't need to depend on numbering systems or IDs to identify a region (ex. /ps tp, /ps home). This also allows speedier commands, since there is no more need to loop through all of a world's regions on each command. It is optional to have unique names between regions (configurable in config).

Added /ps list [player (optional)]!
This command allows players to see how many regions they have, as well as their aliases and IDs. It is intended to replace /ps count, but /ps count will stay for the near future.

Added /ps setparent [name/id]!
This command finally adds a long requested feature: synchronized settings across regions! This allows regions to basically mirror the flags and player list of other regions. It is also optional to allow players to inherit regions that are not theirs (permission). To read more about this, which I strongly recommend, look here: https://worldguard.readthedocs.io/en/latest/regions/priorities

Changed /ps home [num] to /ps home [name/id]
/ps home has been changed so that it does not depend on a number anymore, but instead uses the region's ID, or name. IDs only work in the world that the player is in, while names are cross-world.

Added /ps tp [name/id]
This allows for direct teleportation to regions by name and ID.

Added /ps admin flag [world] [flag] [value|null|default]
Have you ever wanted to update all PS region flags, since you forgot to set it as default? This command finally brings this feature to the plugin.

Added custom crafting recipes per block!
There is now the option in the config to set crafting recipes for protection blocks!

Fixed /ps flag placeholders (default, null)
The /ps flag placeholders code has been rewritten, now allowing for the option of "default" and "null", with default being the default flag setting (from the config), and null removing the flag.

Added the option to have minimum distances between protected regions!
In the block config, there is now the option to set the minimum allowed distance between the edge of a protected region, and the centre of another when creating a new one!

Added support for names in greeting-title and farewell-title flags!
As requested by the community, support has now been added for %player% tags in these flags!

No more config scrambling!
I've finally found a way to avoid scrambling the config each time it is updated. This will now work for this and future config upgrades.

Upgrade Instructions:
As with any upgrade, you can just simply replace the plugin in the plugins folder, and the config upgrades will be automatic (and not scrambled anymore). However, since multiple commands changed, it is highly recommended to regenerate the messages.yml file, since those messages do not get upgraded with a new update. If you don't regenerate the file, the help menus and other messages may be incorrect!

Developer API:
At last, the developer API is here! It is still in beta, meaning that the API is still subject to change, but you can start your projects with them, since future changes aren't anticipated to be very large. I will at some point be working on a new ProtectionStones addon, which adds a GUI to the plugin and gives reference usage of the API.

I am working to host this API on Maven Central, but it will take some time. For now, you can pull the dependency directly from my repository:

Code (Text):

...
<repository>
    <id>protectionstones</id>
    <url>https://repo.espi.dev/repository/maven-public</url>
</repository>
...
<dependency>
    <groupId>dev.espi</groupId>
    <artifactId>protectionstones</artifactId>
    <version>2.1.0</version>
</dependency>
 
In terms of documentation, I am working to get a Javadoc up at some point, but you can just read the comments on GitHub for now.

State of the Project:

For the next month, I will be on a trip so I will not be very active online. If I can, I will issue emergency bug fixes, but there are no guarantees that I can do them immediately. Please do report bugs though to the discussion page or GitHub!
----------, Jun 21, 2019

Hey,
This update fixes a bug with some shop plugins (notably ShopChest) that are able to create a shop based on an in-game item. Now, it should be possible to have restrict-obtaining on while using these in-game items with the shop!

Thank you @ DalekLIVE for assisting with the bug reports.

Technical Details:
The way these shop plugins store itemstacks involve serializing the object. For some reason, Bukkit serializes NBT tags that have strings with "true" into a byte as 1. In order to mitigate this and compress the NBT tag that ProtectionStones uses, I've switched the default recognized NBT tag to be a byte rather than a string.
----------, Jun 3, 2019

Hi!
This update allows you to have a permission that limits the number of each protection stone that a player can place. This permission node is:
protectionstones.limit.alias.x - where you replace alias with the protection block alias and x with the limit of that protection block the player can place.
----------, Jun 2, 2019

Hey,
This is a minor update to address some issues raised by the community:
  • /ps give can now be used from the console!
  • /ps admin cleanup now has better performance, and the functionality has been fixed to not delete active regions with both active and inactive players!
Thank you!
----------, May 30, 2019

Hey!
This update adds new performance options to the plugin, and also addresses a key vulnerability for duplicating protection blocks.

New Config Options:
  • ps_view_cooldown - Prevents players from spamming /ps view
  • async_load_uuid_cache - Option for larger servers to run the UUID cache asynchronously, increasing server startup speed
New Block Options:
  • prevent_explode - Prevents the protection stone from being broken by an explosion. This addresses the bug where players could blow up their protection stone and then do /ps unhide to get it back
  • destroy_region_when_explode - Destroys the protection stone region when broken by explosion. This option is targeted at PVP servers
Thank you!
----------, May 10, 2019

Hello!

This update fixes issues that have been reported, as well as adding some performance improvements.

Changes:
  • Improved performance with /ps count, /ps tp and /ps home by making them async (not blocking the server thread)
  • Fixed block breaking not firing when in locations with coordinates above 2,147,483,647 (x, z)
  • Fixed issue with duplicate command registrations with /ps reload
  • Improved error catching with /ps tp and /ps home
  • Fixed permission error with /ps flag using -g flag
----------, May 7, 2019

If you are upgrading from < 2.0.0 (1.x.x), please read the v2.0.0 post!

This release allows for changing the base command (in the config), and also includes some bug fixes.
  • Added option to change base command, and aliases!
  • Blank messages in messages.yml now are not sent
  • Fixed null pointers from changed protection stone materials
----------, May 3, 2019

This is a bug fix for various errors that spam the console.
If you are upgrading from < 2.0.0 (1.x.x), please read the v2.0.0 post!

This build should also be compatible with 1.14, but please report any issues if you have any!
----------, Apr 22, 2019

Hello!
Please read this fully before upgrading from an older version.

This update overhauls the configuration to use a different file format, and have custom settings per block. It also now stores data within WorldGuard flags rather than on separate files (hiddenpstones.yml). As a result, a conversion is required. I have built an automatic converter into the plugin, so please start the server with the updated plugin once before making further configuration changes.

Note:
The config converter is not perfect, so the order might seem a bit messed up. I recommend taking a new version of the block1.toml config from the overview page and transferring your settings to it.

New Features:

New Restrict Obtaining Config Option!

This new config option is intended to replace the old no silk-touch behaviour. This option prevents blocks obtained naturally (ex. mining) to be used as protection blocks, and only allows players to obtain the protect block with /ps give and /ps get. This is done internally by adding NBT tags to blocks.

More Config Options per block!
You can now set many more config options (ex. flags) per block!

/ps get [block]
This command allows you to get a protection block. There is optional support for a price for the block (requires Vault). You can also add an alias for the block in the config.

/ps give [block] [player]
This command can be used by admins and shops to give protection blocks to players. This can be used with the "restrict obtaining" config option to sell protection blocks to players from another plugin, while restricting obtaining the block naturally.

/ps sethome
This command can be used to change the position of the protection block's home (for /ps tp and /ps home)

Display Name and Lore for Protection Blocks!
In the config, you can change the display name and lore of protection blocks obtained by /ps get and /ps give.

/ps admin fixregions
This command allows admins to run the region upgrading process again, and check if all of the ps internal flags exist.

Custom permission per protection block!
In the config, you can now define a special permission per protection block!

Teleport delay for /ps home or /ps tp!
You can now set a teleport delay for these commands, as well as requiring players to not move for that time. You can bypass this with "protectionstones.tp.bypasswait"

Console can now use /ps admin commands
The /ps admin commands have been revamped to be faster, and can be used by the console.

Removed the need for hiddenpstones.yml
You can remove the file.

Many, many bug fixes and smaller additions!

Please be sure to report bugs to the discussion thread or on the GitHub issues page.

Thank you!
----------, Apr 21, 2019

Hello!

This minor update fixes many issues, especially ones related to setting flags. It also now does not need to call Mojang's servers for UUIDs, speeding up commands!

Fixes and Optimizations:
  • Removed calls to Mojang's servers for name to UUIDs, by adding a cache
  • Rewrote the flag parsing code entirely, making it future proof and not flag specific
  • Fixed some issues relating to using the '*' permission in some plugins
  • Fixed some issues for offline servers with UUIDs
Thank you!
----------, Apr 18, 2019

Hey!
This is a relatively large update, and brings many new features as well as bug fixes.

New Features:
  • Added /ps reload! Can now reload changes from the config while the server is running!
  • Added customizable messages in messages.yml!
  • Added a new /ps help menu that removes commands the player does not have permission for
Fixes and Reworks:
  • Reworked many of the messages in the plugin
  • Fixed a bug where pistons caused errors when interacting with protection stones
  • Fixed blocks being removed when the inventory is full
  • Fixed default priority option not being set
  • Removed regen functionality since it caused major lag issues and is rarely used
  • Completely reworked the placing and breaking block logic to be more performant
Thank you!

The next major update will focus on making the config much more customizable, and useful (though it will require config regen).
----------, Apr 14, 2019

Hey!
A bug involving the denied worlds section in the config not working has been fixed!
Check the update release below for future features in the works!
----------, Mar 31, 2019

Hello!
In this update, /ps unclaim was added, allowing for players to unclaim their region without needing to find where their protection stone is. The rarely used /ps reclaim was also removed, with its functionality being reimplemented in /ps unclaim.

Data types in block names have also now been officially removed, since all of the blocks are covered by the material list now. This should have been done in 1.8...

Internally, some major changes were done to prepare for adding new features in future updates:
  • Actionbar/titles when entering regions
  • Configurable messages in messages.yml
Thank you!
----------, Mar 31, 2019

A bug fix has been added to allow deny-spawn as a default flag for regions to work.

Also to note, metrics have now been enabled in the plugin (bStats). This makes no performance difference, and is used by major plugins (WorldEdit, WorldGuard, etc.) to help plugin developers to have a better idea of plugin usage. If you would like to turn off all metrics on your server, you can go to the folder bStats in your plugins folder (note: this turns off metrics for all plugins using it).
----------, Feb 19, 2019

If you are running an older version of ProtectionStones, it is highly recommended to update to this build. This build requires the latest version of WorldGuard and WorldEdit.

Summary:
- Major UUID bugfixes
- Added automatic converting from names to UUIDs for old ProtectionStones regions
- New /ps view format using fake blocks!
- Performance improvements from rewritten code
- Lots and lots and lots and lots of bugfixes!


This build contains major fixes for many bugs, including for UUIDs. The previous versions that were released by the original authors did not fully implement UUID support, which prevents players that changed their name from having access over their protection stones.

In order to fix all of the regions that have the old protection stones format with names, I have added a converter to the plugin, which will automatically start with the server and will run only the first boot.

Internally, the plugin has also been partially rewritten to help speed up development for the future.

Thank you!
----------, Feb 16, 2019

I've updated support to the latest versions of WorldGuard 7 and WorldEdit 7.
----------, Feb 7, 2019

This build is compiled against the Spigot 1.13.2 API
----------, Feb 7, 2019

Resource Information
Author:
----------
Total Downloads: 314,896
First Release: Oct 22, 2018
Last Update: Jul 5, 2024
Category: ---------------
All-Time Rating:
161 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings