Open phoenixlzx opened 5 years ago
问题:
新需求: region
/yasui region create [region name]
保存 WE 选区内的所有区块为新的 region/yasui region rule [region name] [rule name] [bypass|enforce]
设置 region 的 bypass 属性/yasui region list
列出所有 region 信息和配置/yasui region [enable|disable] [region name]
- 设置是否启用此 region 配置region/region-name.yml
enabled: true
region:
minChunkX: 7
minChunkZ: 11
maxChunkX: 10
maxChunkZ: 16
bypass:
- cull-entity # rule names
- suppress-redstone
New config option - broadcast messages destination
broadcast:
type: CHAT
log_console: true
permission: yasui.command.status
Only players with yasui.command.status
permission will receive the broadcast message.
update - Entity Culler (paper)
Mobcap implementation (paper)
operations/cull-entity
operations/mobcap
using Paper API and Spigot API (fallback)API reference:
Module mobcap
Operation operations/mobcap.yml
If engaged, new mob will not naturally spawn when:
new mob will not spawn for most of the reasons (except custom/plugin) when:
Note:
/yasui status
causes lag)mobcap:
global:
soft: 1600
hard: 2400
types:
- VILLAGER: 100
- PILLAGER: 100
- PIG_ZOMBIE: 200
chunk:
default: 32
types:
- VILLAGER: 4
- PILLAGER: 4
- CHICKEN: 8
Rule rule/mobcap.yml
enabled: false
operations:
- 'mobcap'
worlds:
- world
- world_nether
- world_the_end
engage:
condition: tps_5m < 17.0 && world_living_entities > 1500
message: '&b[YASUI] &c[ENGAGED] &6Mob spawn limited'
release:
condition: tps_5m > 19.5
message: '&b[YASUI] &c[RELEASED] &6Mob spawn lifted'
Dynamic View Distance (Paper)
API reference
Module adjust-view-distance
Operation operation/adjust-view-distance.yml
Reduce player view distance by 1 on engage, and increase by 1 on release, to the minimum or maximum value.
adjust-view-distance:
min: 6
max: 10
Rule rule/adjust-view-distance.yml
enabled: false
operations:
- 'adjust-view-distance'
worlds:
- world
- world_nether
- world_the_end
engage:
condition: tps_5m < 16.0 && world_chunks > 5000
message: '&b[YASUI] &c[ENGAGED] &6View Distance &d{world_view_distance}'
release:
condition: tps_5m > 19.0
message: '&b[YASUI] &c[RELEASED] &6View Distance &d{world_view_distance}'
Features
Design
The plugin should be modular. It has 3 major parts:
Commands
/yasui status
yasui.command.status
/yasui chunks [world]
yasui.command.chunks
[world]
is supplied, shows data for that specific world. Otherwise use the world which the executor is in./yasui counter <entity\|redstone> [world]
yasui.command.counter
entity
listsLivingEntity
andAll Other
categories, whileredstone
listsRedstone
andPhysics
categories./yasui operation <engage\|release> <operation> [world\|all]
yasui.command.operation
/yasui reset
yasui.command.reset
/yasui reload
yasui.command.reload
Configuration example
config.yml
Operation files are placed under
operations/
directory, with operation name as the file name, and module name as root variable name in the file, along with its parameters.Operation names use hyphens, while feature module names use underscores.
suppress-entity-ai
-operations/suppress-entity-ai.yml
cull-entity
-operations/cull-entity.yml
suppress-redstone
-operations/suppress-redstone.yml
adjust-random-tick-speed
-operations/adjust-random-tick-speed.yml
custom-command
-operations/custom-command.yml
Rule files are placed under
rules/
directory.rules/suppress-ai.yml
- Example rule to suppress AI on high mob load.rules/adjust-random-tick.yml
- Example rule to auto adjust random tick speed according to server load.rules/suppress-redstone.yml
rules/cull-entity.yml