Implemented a moblimiter (#95)

* Update WhoHasCMD.java

Added functionality that clears all players with a specified item

* Added functionality that clears all players with a specified item

* Altered tab completion to include "clear" argument

* Update WhoHasCMD.java

* Implemented a mob limiter that can be configured via a command

* Fixed some imports

* Refined tab complete

* Implemented reviewed changes

---------

Co-authored-by: Telesphoreo <me@telesphoreo.me>
This commit is contained in:
james
2024-05-31 21:41:14 +01:00
committed by GitHub
parent 5f12a1532f
commit 23611e218b
5 changed files with 139 additions and 0 deletions

View File

@ -156,6 +156,15 @@ blocked_entities:
- "ENDER_DRAGON"
- "MINECART_TNT"
# Limit entities per chunk
entity_limit:
# Is the mob limit enabled?
mob_limit_enabled: true
# The maximum number of mobs allowed in a chunk
max_mobs_per_chunk: 50
# The available ceiling for the maximum number of mobs
mob_limit_ceiling: 500
# See https://docs.plex.us.org/docs/customization/config#worlds for documentation
# These gamerules apply to all worlds on the server
global_gamerules:

View File

@ -175,6 +175,18 @@ notAValidMobButValidEntity: "<red>That is a valid entity, but is not a valid mob
# 1 - Number of mobs removed
removedMobs: "<red>{0} - Removed {1} mobs"
autoWipeDisabled: "<gray>Item wiping is currently disabled in the config!"
# 0 - The boolean for whether the limit is enabled or disabled
mobLimitToggle: "<gray>The mob limit has been {0}"
# 0 - The amount that the mob limit has been set to
mobLimitSet: "<gray>The mob limit has been set to: <em><white>{0}"
# 0 - The boolean for whether the limit is enabled or disabled
# 1 - The current amount of mobs in the world
# 2 - The current set mob limit
# 3 - Chunk x value
# 4 - Chunk z value
mobLimitStatus: "<gray>({0}<gray>) <em><white>{1} <reset><gray>/ <em><white>{2} <reset><gray>per chunk (<em><white>Chunk<gray>: <reset>{3}, {4}<gray>)"
# 0 - The max set limit in config
mobLimitCeiling: "<gray>The limit you have entered is too high. Defaulting to the ceiling value from config"
commandBlocked: "<gray>That command is blocked."
# 0 - The command sender
# 1 - The message being said