Scythe - 自动补种、右键收割插件
功能
- 作物收割后自动补种
- 右键收割已成熟的作物
- 蹲下即可破坏作物,无需关闭该功能
- 提供配置选项,允许自定义插件在服务器上的工作方式
命令
/scythe toggle: 切换执行该命令玩家的自动补种和右键收割功能。需要 scythe.toggle 权限。
/scythe reload: 重新加载插件的配置。需要 scythe.reload 权限。
权限
scythe.use : 访问 Scythe 功能的基础权限。
scythe.use.harvest : 允许玩家使用 Scythe 功能收割方块
scythe.use.replant : 允许玩家使用 Scythe 功能自动补种作物
scythe.toggle : 允许玩家通过 /scythe toggle 命令自行切换该功能。
scythe.reload : 允许玩家通过 /scythe reload 命令重新加载配置。
配置
注意:生成的配置文件不会有这么多注释 lol,这里只是为了 README/描述文档
#Scythe
auto-replant:
enabled: true # 是否应该自动补种作物?
require-seeds: false # 是否要求用户在背包中有种子?注意:这将消耗种子
require-tool: false # 是否要求用户使用特定工具?
delay-ticks: 1 # 破坏方块后多久(以刻为单位)进行补种?(每秒 20 刻,无延迟情况下)
right-click-harvest:
enabled: true # 用户是否可以右键点击来收割方块?
require-tool: false # 是否要求用户使用特定工具?
#仅当上述任何类别中 "require-tool" 为 true 时适用
tools:
enabled-tools: # 如果要求用户使用特定工具,哪些工具是有效的?
- "minecraft:wooden_hoe"
- "minecraft:stone_hoe"
- "minecraft:iron_hoe"
- "minecraft:golden_hoe"
- "minecraft:diamond_hoe"
- "minecraft:netherite_hoe"
# 物品模型应声明为 "namespace:id"
required-item-models: [ ] # 你是否在使用具有不同外观模型的特定物品?如果是,请在此处声明
# 注意:在原版中,正常收割作物不会使用耐久度。
# 这将导致工具仅在右键收割时损耗耐久度
durability:
harvest-uses-durability: false # 右键收割是否会导致工具耐久度下降?
replant-uses-durability: false # 自动补种是否会导致工具耐久度下降?
prevent-tool-break: true # 如果上述两项中的任意一项设置为 'true',你是否希望当工具耐久度较低时阻止插件工作,以防止用户意外损坏他们的工具?
minimum-durability: 10 # 如果上述设置为 true,当插件停止工作时工具的最低耐久度应为多少?
# 请从以下列表中选择一种声音:https://jd.papermc.io/paper/1.21.4/org/bukkit/Sound.html
sounds:
enabled: true # 当用户破坏或自动补种作物时是否播放声音?
break-sound: BLOCK_CROP_BREAK # 破坏作物时应播放哪种声音?
plant-sound: ITEM_CROP_PLANT # 补种作物时应播放哪种声音?
# 介于 0 到 2 之间
volume: 1.0 # 音量有多大?
# 介于 0 到 2 之间
pitch: 1.0 # 音调有多高?
# 请从以下列表中选择一种粒子效果:https://jd.papermc.io/paper/1.20/org/bukkit/Particle.html
particles:
harvest:
enabled: true # 当用户右键收割方块时是否显示粒子效果?
particle: BLOCK # 应显示哪种粒子效果?
count: 40 # 应生成多少粒子?这很大程度上取决于所选的粒子效果
# 粒子从中心扩散的距离,单位为方块
spread: 0.5
replant:
enabled: true # 当方块自动补种时是否显示粒子效果?
particle: HAPPY_VILLAGER # 应显示哪种粒子效果?
count: 2 # 应生成多少粒子?这很大程度上取决于所选的粒子效果
spread: 0.5 # 粒子从中心扩散的距离,单位为方块
# 插件应生效的作物,材料列表见此处:https://jd.papermc.io/paper/1.21.4/org/bukkit/Material.html
# 注意,该材料必须具有 'Ageable'(可生长)的 BlockData - 注意,列表中其他大多数可生长方块无法按预期工作。
allowed-crops:
- BEETROOTS
- CARROTS
- COCOA
- NETHER_WART
- POTATOES
- WHEAT
# - PUMPKIN_STEM
# - MELON_STEM
API
HarvestEvent - 可取消
| 方法 |
返回类型 |
描述 |
getPlayer() |
Player |
返回触发收割的玩家。 |
getBlock() |
Block |
返回正在被收割的作物方块。 |
isCancelled() |
boolean |
检查事件是否已被取消。 |
setPlayer(Player) |
void |
更新与事件关联的玩家。 |
setBlock(Block) |
void |
更新事件中涉及的方块。 |
setCancelled(boolean) |
void |
取消或恢复事件的取消状态。 |
getHandlers() |
HandlerList |
Bukkit 必需的处理程序方法。 |
getHandlerList() |
HandlerList |
Bukkit 必需的静态处理程序方法。 |
ReplantEvent - 可取消
| 方法 |
返回值 |
描述 |
getPlayer() |
Player |
返回触发重新种植的玩家。 |
getBlock() |
Block |
返回正在被重新种植的方块。 |
getBlockData() |
BlockData |
返回应用于重新种植方块的 BlockData。 |
isCancelled() |
boolean |
检查事件是否已取消。 |
setPlayer(Player) |
void |
更新与事件关联的玩家。 |
setBlock(Block) |
void |
更新事件中涉及的方块。 |
setBlockData(BlockData) |
void |
更新重新种植方块的 BlockData。 |
setCancelled(boolean) |
void |
取消或恢复取消该事件。 |
getHandlers() |
HandlerList |
Bukkit 必需的处理程序方法。 |
getHandlerList() |
HandlerList |
Bukkit 必需的静态处理程序方法。 |
Maven
<repository>
<id>modrinth-repo</id>
<url>https://api.modrinth.com/maven/</url>
</repository>
<dependency>
<groupId>maven.modrinth</groupId>
<artifactId>scythe</artifactId>
<version>4.0</version>
<scope>provided</scope>
</dependency>
Gradle
exclusiveContent {
forRepository { maven { url = "https://api.modrinth.com/maven" } }
filter { includeGroup "maven.modrinth" }
}
dependencies {
compileOnly 'maven.modrinth:scythe:4.0'
}
支持
如果您需要任何关于 Scythe 插件的帮助,请在 GitHub 仓库中提交 issue 或加入我们的 Discord 服务器 获取支持。
Scythe - Auto-Replant, Right-Click-Harvest plugin
Features
- Automatically replant crops after they are harvested
- Right-click to harvest fully grown crops
- Crouch in order to break crops without having to toggle the functionality off
- Configuration options to customize how you'd like the plugin to work on your server
Commands
/scythe toggle: Toggles the automatic replanting and right-click harvesting feature for the player who executed the
command. This requires the scythe.toggle permission.
/scythe reload: Reloads the configuration for the plugin. This requires the scythe.reload permission.
Permissions
scythe.use : Base permission for access to Scythe functionality.
scythe.use.harvest : Allows a player to harvest blocks using scythe functionality
scythe.use.replant : Allows a player to auto-replant crops using scythe functionality
scythe.toggle : Allows the player to toggle the feature for themselves using the /scythe toggle command.
scythe.reload : Allows the player to reload the configuration using the /scythe reload command.
Config
Note, generated config does not have this many comments lol, this is just for the README/description
#Scythe
auto-replant:
enabled: true # Should crops automatically be replanted?
require-seeds: false # Should the user be required to have seeds in their inventory? Note: will consume seeds
require-tool: false # Should the user be required to use a specific tool?
delay-ticks: 1 # How long in ticks after breaking the block should it be replanted? (20 ticks per second, without lag)
right-click-harvest:
enabled: true # Should users be able to right-click to harvest blocks?
require-tool: false # Should users be required to use a specific tool?
#Only applies if "require-tool" is true in any of the above categories
tools:
enabled-tools: # If users are required to use a specific tool, which tools are valid?
- "minecraft:wooden_hoe"
- "minecraft:stone_hoe"
- "minecraft:iron_hoe"
- "minecraft:golden_hoe"
- "minecraft:diamond_hoe"
- "minecraft:netherite_hoe"
# Item models should be declared like "namespace:id"
required-item-models: [ ] # Do you have any specific item models you're using on tools that make them look different? If so, declare them here
# Note: In vanilla, harvesting normally crops does NOT use durability.
# This will cause the tool to lose durability on right-click harvest ONLY
durability:
harvest-uses-durability: false # Should right-click-harvest make tool durability go down?
replant-uses-durability: false # Should auto-replant make tool durability go down?
prevent-tool-break: true # If either of the two above are set to 'true', do you want to prevent the plugin from working if a tool is low on durability, to prevent users from accidentally breaking their tools?
minimum-durability: 10 # If the above is set to true, how low should durability be when the plugin stops working?
# Please choose a sound from this list: https://jd.papermc.io/paper/1.21.4/org/bukkit/Sound.html
sounds:
enabled: true # Should sounds be played when a user breaks or auto-replants a crop?
break-sound: BLOCK_CROP_BREAK # Which sound should be played when a crop is broken?
plant-sound: ITEM_CROP_PLANT # Which sound should be played when a crop is replanted?
# between 0 and 2
volume: 1.0 # How loud should it be?
# between 0 and 2
pitch: 1.0 # How high-pitched should it be?
# Please choose a particle from this list: https://jd.papermc.io/paper/1.20/org/bukkit/Particle.html
particles:
harvest:
enabled: true # Should particles show when a user right-click-harvests a block?
particle: BLOCK # Which particle should show?
count: 40 # How many particles should spawn? This will wildly depend on the selected particle
# how far from the center particles should go, in blocks
spread: 0.5
replant:
enabled: true # Should particles show when a block is auto-replanted?
particle: HAPPY_VILLAGER # Which particle should show?
count: 2 # How many particles should spawn? This will wildly depend on the selected particle
spread: 0.5 # how far from the center should particles go, in blocks
# Crops the plugin should work on, list of materials is here: https://jd.papermc.io/paper/1.21.4/org/bukkit/Material.html
# Note, the material must have the BlockData of 'Ageable' - note, most other ageable blocks in the list don't work as intended.
allowed-crops:
- BEETROOTS
- CARROTS
- COCOA
- NETHER_WART
- POTATOES
- WHEAT
# - PUMPKIN_STEM
# - MELON_STEM
API
HarvestEvent - Cancellable
| Method |
Returns |
Description |
getPlayer() |
Player |
Returns the player who triggered the harvest. |
getBlock() |
Block |
Returns the crop block being harvested. |
isCancelled() |
boolean |
Checks if the event is cancelled. |
setPlayer(Player) |
void |
Updates the player associated with the event. |
setBlock(Block) |
void |
Updates the block involved in the event. |
setCancelled(boolean) |
void |
Cancels or un-cancels the event. |
getHandlers() |
HandlerList |
Bukkit-required handler method. |
getHandlerList() |
HandlerList |
Bukkit-required static handler method. |
ReplantEvent - Cancellable
| Method |
Returns |
Description |
getPlayer() |
Player |
Returns the player who triggered the replanting. |
getBlock() |
Block |
Returns the block being replanted. |
getBlockData() |
BlockData |
Returns the BlockData being applied to the replanted block. |
isCancelled() |
boolean |
Checks if the event is cancelled. |
setPlayer(Player) |
void |
Updates the player associated with the event. |
setBlock(Block) |
void |
Updates the block involved in the event. |
setBlockData(BlockData) |
void |
Updates the BlockData for the replanted block. |
setCancelled(boolean) |
void |
Cancels or un-cancels the event. |
getHandlers() |
HandlerList |
Bukkit-required handler method. |
getHandlerList() |
HandlerList |
Bukkit-required static handler method. |
Maven
<repository>
<id>modrinth-repo</id>
<url>https://api.modrinth.com/maven/</url>
</repository>
<dependency>
<groupId>maven.modrinth</groupId>
<artifactId>scythe</artifactId>
<version>4.0</version>
<scope>provided</scope>
</dependency>
Gradle
exclusiveContent {
forRepository { maven { url = "https://api.modrinth.com/maven" } }
filter { includeGroup "maven.modrinth" }
}
dependencies {
compileOnly 'maven.modrinth:scythe:4.0'
}
Support
If you need any help with the Scythe plugin, please open an issue on the GitHub repository or join
our Discord server for support.
评论 0
登录后参与评分
还没有评论,来抢沙发吧