HomeJavaModsDefenestrate
Defenestrate

Defenestrate

This is a spigot plugin designed to give players the ability to pick up and throw most blocks and entities in the game. You can customize the throw power individually for blocks, players, and entities, and can disable the throwing of any group if you so choose.

Usage

Simply crouch and right click with no item in your main hand to pick a Player, Entity, or Block up. After that, look in the direction you want to launch, and left click to throw!
Note: In an attempt to add some form of spawn protection for server owners, by default non-op players will not be able to pick up/throw mobs or blocks that are in the spawn protection defined in server.properties. This can be changed in the settings if desired.

You can find a ""very high quality"" stridsfordon-style demonstration video here

Installation and Setup

To install, simply add the latest release to the Plugins folder in any bukkit fork server and run /reload

Settings can be either changed in the plugin config file, or by using the in-game /dSettings command.
The /dSettings command works as follows:
/dSettings list - Lists all settings and their respective values
/dSettings get <setting> - Returns the value of the specified setting
/dSettings set <setting> <value> - Sets the value of the specified setting to the specified value
/dsettings blacklist <addBlock/removeBlock> <block> - Adds or removes a block from the blacklist
/dsettings blacklist <addEntity/removeEntity> <block> - Adds or removes a block from the blacklist
/dsettings blacklist <listBlock/listEntity> - Returns a list of the blacklist for the specified category

List of settings that can be changed

Power settings:

Feature toggles:

Permission settings:

Other settings:

Permissions

There is no built-in permissions manager in this plugin. However, if you wish to set up ranks to give players permission to use parts of this plugin, you can use a permission manager such as LuckPerms to give players these permissions.

defenestrate.players - Permission for throwing players (only required if throwPlayersRequiresPermission is true)
defenestrate.entities - Permission for throwing entities (only required if throwEntitiesRequiresPermission is true)
defenestrate.blocks - Permission for throwing blocks (only required if throwBlocksRequiresPermission is true)
defenestrate.settings - Permission needed for non-operators to use /dSettings
defenestrate.all - Grants every permission listed

Old Block Handling

The old block handling method uses Minecraft's "falling block" entity. The issue with this is that falling blocks have a habit of just... randomly breaking. If you pick a block up while crouching and just in general being in the wrong area, the block will just drop. Even more than that, when falling blocks land, there's a stupidly large chance that the block just drops as an item instead of being placed as a block.

My solution to this is to create a ""custom"" block entity using the 1.19.4 Block Displays and Interactions, along with a very shrunk down baby zoglin to handle the gravity. This means that the block entities are actually 3 entities stacked on top of each other. If your server starts lagging because of players throwing blocks, it may be worth it to use the old block handling.

Other Notes

If the block throw power is set to exactly 1.5, throwing a block directly upwards will cause it to be placed as a block in midair. Powers 1.51 and 1.49 have been tested and work as usual. This is because of a coincidence in timing where the block will have the exact same velocity as an unmoving block when the plugin checks it. Fixing this would require much more processing power than it is worth.

If your server crashes while blocks are flying, the blocks might not be correctly removed by the plugin upon the next startup. as of version 1.41, there is now a /removeblocks [radius (optional)] command that can be used to kill either all block entities if no radius is specified, or just the block entities within the specified radius.

Issues and Additional Features

If you've found an issue with the plugin or have a request for a new feature, head over to the issues page and create an issue. Please be sure to include as much detail about the bug/feature request as possible in the issue.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more