Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for WillPall

Prevent mobs from spawning by building simple block structures

Report MobRepellent?

MobRepellent

What is MobRepellent?

MobRepellent allows players to construct "repellers" that will prevent hostile mobs from spawning within a certain distance.

How do I use MobRepellent?

Simply add the MobRepellent jar file to your /plugins directory. MobRepellent will automatically create all the necessary files.

Once the plugin is loaded, to create a repeller you'll need 7 iron, gold, or diamond blocks. First, using five blocks, construct a shape that looks like a plus sign (+) parallel with the ground. Next, place the remaining two blocks directly above the block in the center of the plus sign.

After the repeller is constructed, no hostile mobs will spawn within a cuboid radius of the base of the repeller. For instance, if the radius is 50 blocks, it will repel in a 100x100x100 cube centered at the base of the repeller. Neutral mobs are not blocked by default, but this can be configured in the config.yml. MobRepellent does not affect mob spawners, hostile nor passive. To remove the repeller, simply remove one of the blocks that is part of the repeller.

Default repeller types and radii:

  • Small - Iron block - 20 block radius
  • Medium - Gold block - 30 block radius
  • Large - Diamond block - 50 block radius

Base

Completed

Console/Admin Commands

All console commands default to OP-only.

/mrlist - Lists all currently loaded repellers
/mrreload - Reloads the configuration file
/mrremove [repellerNumber] - Removes the selected number as found in the list given by /mrlist. Does not remove repeller structure.
/mrremoveall - Removes all currently loaded repellers. Does not remove the repeller structure.

Permissions

mobrepellent.* - Access to all permissions

mobrepellent.list
  Default: OP-only
  Allows use of /mrlist command
mobrepellent.reload
  Default: OP-only
  Allows use of /mrreload command
mobrepellent.remove
  Default: OP-only
  Allows use of /mrremove command
mobrepellent.removeall
  Default: OP-only
  Allows use of /mrremoveall command
mobrepellent.create
  Default: all players
  Allows player to create a repeller
mobrepellent.destroy
  Default: all players
  Allows player to destroy a repeller

Configuring MobRepellent

You can configure MobRepellent to use almost any block type instead of the default blocks. You can also configure MobRepellent to use any radius to repel mobs, and select which mobs to repel and which to ignore. On the first run of the plugin, MobRepellent will automatically create a config.yml file with the default values. See the sample config.yml file for more information:

https://github.com/WillPall/MobRepellent/raw/master/docs/config.yml

Todo list

  • Improve performance
  • Further testing on newer Minecraft versions
  • Ensure boss spawns work as expected with sane defaults and configuration options
  • Custom repeller shapes (admin defined structures)
  • Add visual cue that repeller is working. Possibly with the top block on fire (as suggested by darklust). This will be configurable and probably default to off.
  • Options to use beacons instead of block structures

Known Issues

  • TNT and creeper explosions can destroy repeller structures without destroying the actual repeller functionality
  • Permissions allow players to "construct" an inactive repeller, but not destroy it

Changelog

Version 3.0.0
  • Updated basic functionality to work with 1.20.1 version of PaperMC
    • There are many edge cases and new mobs/blocks that this update does not take into account. Please submit an issue on GitHub with details if this is failing in a specific instance
  • Fixed an issue where the plugin would not function when first installed on a server without restarting the server

See full Changelog in the README on GitHub

Information

CategoryGameplay
Published onAugust 1, 2023
LicenseMIT
Downloads26
Stars1
Watchers1

Pinned Versions

Members