- Compatible API Versions
- 1.0
- Sourcecode
- https://github.com/Server-Founder/AshManPro
- Contributors
- zzz1999
AshManPro is a simple plugin that clean not require entities and items.
translate is not smooth , change soon afterwards
translate is not smooth , change soon afterwards
Markdown (GitHub flavored):
````yaml
# ____ ____
#| _ \ _ __ ___ __ _ _ __ ___ / ___| ___ _ ____ _____ _ __
#| | | | '__/ _ \/ _` | '_ ` _ \\___ \ / _ \ '__\ \ / / _ \ '__|
#| |_| | | | __/ (_| | | | | | |___) | __/ | \ V / __/ |
#|____/|_| \___|\__,_|_| |_| |_|____/ \___|_| \_/ \___|_|
# _ _ __ __ ____
# / \ ___| |__ | \/ | __ _ _ __ | _ \ _ __ ___
# / _ \ / __| '_ \| |\/| |/ _` | '_ \| |_) | '__/ _ \
# / ___ \\__ \ | | | | | | (_| | | | | __/| | | (_) |
#/_/ \_\___/_| |_|_| |_|\__,_|_| |_|_| |_| \___/
# prompt message before cleanup
beforehand-message:
20: All entities and items will be cleaned after 20 seconds
10: All entities and items will be cleaned after 10 seconds
# {ic} is the number of items to be cleaned, and {ec} is the number of entities to be cleaned
terminate-message: This cleaning cleaned up a total of {ic} items and {ec} entities
# Ways of cleaning up
eliminate-type:
"0": # Clean up all the worlds
enable: true
# The following world will not be cleaned up
eliminate-level-except: ["example world"]
"1": # Only clean up worlds with players
enable: false
# Clean up worlds where the number of players is greater than the threshold
threshold: 1
# The following world will not be cleaned up
eliminate-level-except: ["example world"]
"2": # Cleaning according to online players' collision box
enable: false
# X coordinate offset ±
offsetX: 16
# Y coordinate offset ±
offsetY: 5
# Z coordinate offset ±
offsetZ: 16
# The following players will be cleared of nearby entities or items
eliminate-player-except: ["pn1"]
# Enable cleaning items
eliminate-items: true
# Do not clean items with NBT
eliminate-items-except-nbtcontains: true
# Clean up the entity
eliminate-entity: true
# Forcing a cleanup of all entities ignores the restrictions on preserving entities
eliminate-entity-force: false
# Delete all entities in the block when the block is unloaded
eliminate-entity-after-chunk-unload: false
# The condition that triggers the cleanup
eliminate-trigger:
"0": # Cleanup when the total number of server entities is greater than a certain value
enable: true
# Cleaning is initiated when the number of entities detected is greater than this value
threshold: 50
# The detection time unit of second
detect-interval: 300
"1": # Cleanup when the average TPS of the server is less than a certain value
enable: false
# Cleaning is initiated when the average TPS is detected to be less than this value
threshold: 19.2
# The detection time unit of second
detect-interval: 300
"2": # Cleaning when the total number of server entities is greater than a certain value and when the average TPS of the server is less than a certain value
enable: false
# The number of entities needs to be greater than this value for cleaning to start
entityThreshold: 50
# The average TPS needs to be less than this value for cleaning to start
AvgTPSThreshold: 19.2
# The detection time unit of second
detect-interval: 300
````
Markdown (GitHub flavored):
## API
#### add clean exempted entity
````java
AshManPro.addExemptedEntity(long eid);
AshManPro.addExemptedEntity(Entity entity);
AshManPro.addExemptedEntity(long eid,Entity entity);
````
#### delete clean exempted entity
````java
AshManPro.removeExemptedEntity(long eid);
AshManPro.removeExemptedEntity(Entity entity);
````
## Command
````
/am force | clean all of the entities forcefully.
````