Resource icon

dPrevention 1.3.1

This version fixes the display for Polygons within the /dPrevention admininfo command and also the removal of admin claims.
IMPORTANT NOTICE: YOU NEED THE LATEST DENIZEN RELEASE BUILD FOR THIS TO WORK (AT THE TIME OF WRITING REL-1774

[Features]
  • It's now possible to expand admin claims.
[Core]
  • Object storage was changed. dPrevention will now save AreaObjects instead of noted names. The conversion will fire on the next server start. So watch your console.
  • Generation of /dprevention info menu has been rewritten and optimized and is now incredible fast.
[Changes]
  • Creating a dPrevention claim will now preview the claim with debugblocks
  • Intersecting claims will show up in the sky, when your selection intersects with them.
  • dPrevention will now pass all flags to the new cuboid automatically, deprecating config option: scripter.flags
[Bugfixes]
  • Flag use will now prevent players from triggering pressure plates and other interactable materials.
  • Fixed command output when Area Tool isn't installed.
  • It's now impossible to delete a claim when it's in use by another player.
  • Flag block-place will now prevent players from emptying buckets.
  • Flag block-break will now prevent players from filling buckets.
  • Chat handling is now compatible with other scripts that already cancelled the chat event.
  • Preventing errors on specific flags that prevent using items when clicking on air.
[How to update from a previous version]
  1. Stop your server.
  2. Create a backup of your server. It's important.
  3. Update Denizen
  4. Remove all dPrevention files, excluding the config.
  5. Add dPreventions files into your /scripts/external/dPrevention folder.
  6. Start your server up and watch your console.
[Bugfixes]
  • If the player can't afford a claim message was printed out and the player is still in claim mode while walking over blocks, it won't print errors in your console anymore.
  • Catched an error when a player opened an inventory without a location (like: workbenches, looms, grindstones etc.) when container-access is active.
[Core]
  • Area Selector Tool compatibility. Support with the seperate selector tools is dropped.
    You can simply remove the old ones and add the Area Selector Tool. Due to this you can also create sphere shaped admin regions via /dprevention create <shape> <name>
  • The config will be validated on /ex reload and server start. If a config option isn't valid it will output an error in your console and switches to a default value instead. The config is loaded into a server flag called dPrevention.config.
  • The files were reorganized. The config has a dedicated folder.
  • Config option added: scripters.flags where scripters can add their own flag paths of area objects, so that they will passed onto a new cuboid while expanding it.
  • Config option claims.depth will now applied on every cuboid shaped player claim on /ex reload.
  • An updater script was added, which will automatically update areas. On the next server start it will rename the unused teleport flag to teleport-item. Watch your console.
  • A command was added which can only be run from the console, to start these updates manually.
    You don't have to run them manually.

[Changes]
  • The flag container-access will now prevent players from taking items out of item_frames and glow_item_frames
  • The output of error messages was optimized. Players will get one error message per type every 2 seconds. That means a player who is not able to build on a claim, can receive this message only every 2 seconds but meanwhile is able to receive other ones.
  • While creating or expanding a claim with the dPrevention Tool, it will show areas, excluding owned ones, which intersects with the selection.
  • The flag block-break will now prevent players from breaking hanging entities such as paintings and item_frames.
  • The flag block-place will now prevent players from playing items into item_frames.

[Bugfixes]
  • flag container-access won't prevent the opening of script inventories anymore.
  • the block item in a /dprevention info menu isn't clickable anymore.
  • item-frame-rotation will also prevent players from rotating items in glow_item_frames
  • an error was catched while checking for intersectons, when a world doesn't has any areas yet.
[How to update from a previous version]
  1. Stop your server.
  2. Create a backup of your server. It's important.
  3. Update Denizen
  4. Remove all dPrevention files, excluding the config.
  5. Move your current config.dsc file into a scripts/external/dPrevention/config folder.
  6. Add the config options that were added in your config.dsc file.
    Rename the 'teleport' flag into 'teleport-item'.
    Use https://github.com/Hydroxycobalamin/dPrevention/blob/main/external/dPrevention/config/config.dsc as reference.
    1. If something borks, the console will tell you upon /ex reload or server start.
  7. Add the rest of dPreventions files into your /scripts/external/dPrevention folder.
  8. Start your server up and watch your console for possible errors.
This update adds a new config option: inventories.filler_item which allows to specify an item which will be shown in unused spots of inventories. Useful when you're using a resource pack.
USE THE NEW CONFIG.DSC INSIDE THE .ZIP FILE AND RECONFIGURE.

container-access will now prevent players to open any inventory excluding ender_chest and the players one.

New flag vehicle-move which prevents players from pushing vehicles like hopper_minecarts, to prevent players from moving hoppers inside the claim to access a chests content. Players can be whitelisted on this flag. It's strongly advised to add this flag to the flags that will added by default on new created claims in your config.
USE THE NEW CONFIG.DSC INSIDE THE .ZIP FILE AND RECONFIGURE.

Flag vehicle-place was reworked. It now takes chat input in form of a list of vehicles. Useful to prevent players from placing hopper_minecarts directly under a chest. It's strongly advised to add this flag to the flags that will added by default on new created claims in your config.
USE THE NEW CONFIG.DSC INSIDE THE .ZIP FILE AND RECONFIGURE.


It's now userfriendlier when asking for chat input. For example, if you provided zombie zombie
Zombie is now either added or removed from the list but not added and removed at the same time

Reminder: Create a backup of your server first, before updating this script.
To update, simply remove all dPrevention files and add the new ones in.
USE THE NEW CONFIG.DSC INSIDE THE .ZIP FILE AND RECONFIGURE.
Note: The new added flags won't be updated on preexisting claims. Make sure your players have the permission dPrevention.flag.vehicle-place and dPrevention.flag.vehicle-move OR dPrevention.flag.* so they have the permission to modify flags on their own claim. Advise them to add minecart_hopper to the vehicle-place flag and setting vehicle-move to Denied.
This update adds 2 new events. dPrevention_player_block_amount_changed which fires everytime the block level of a player changes and dPrevention_area_created which fires everytime a new dPrevention area was created.

You can find more info's about the added events here: https://github.com/Hydroxycobalamin/dPrevention/wiki/Scripter-Documentation#custom-events

The vehicle ride-whitelist and depending flags, should be working properly now.

Reminder: Create a backup of your server first, before updating this script.
To update, simply remove all dPrevention files excluding the config and add the new ones in.