Ez4p1xEL 发表于 2023-1-8 14:21:10

NoBuildPlus —— 轻量级的世界保护插件

本帖最后由 Ez4p1xEL 于 2024-5-8 13:30 编辑



NoBuildPlus | 别建+




https://i.imgur.com/ViLNhLZ.png这是个很轻量级的插件大小60kb左右可为各个启用该插件的世界设置规则比如你可以为某个世界开启保护(禁止破坏、建造、PVP、对生物造成伤害)目前有的规则:break(破坏), build(建造), use(使用(工作台、铁砧等)), container(打开容器), move(移动), mob-damage(对生物造成伤害), mob-explode(生物爆炸), pvp(PVP), shoot(射击) tnt(TNT爆炸), tnt-damage(TNT爆炸伤害), frame(展示框保护), bed(床), voidtp(虚空传送), villager(右键村民), command(指令), chat(聊天), leaf-decay(树叶枯萎), melt(冰雪融化), fall-damage(摔落伤害), armorstand(盔甲架), farmbreak(农耕破坏), ride(右键能骑的实体), painting(画), bucket-place(桶放置), bucket-fill(桶填满), boat(船), button(按钮), door-interact(玩家与门互动), lever(拉杆), trapdoor-interact(活版门), fencegate-interact(栅栏门), drop-item(玩家丢弃物品), egg-throw(鸡蛋投掷), snowball-throw(雪球投掷), water-spread(水蔓延), lava-spread(岩浆蔓延), fly(飞行), teleport(玩家传送), mob-spawn(生物生成), minecart(矿车互动), item-pickup(物品拾取), potion(喝药水), bonemeal(骨粉催熟), elytra(鞘翅使用), nether(地狱传送门建立)强烈建议在worlds.yml里更改flag的true/false, 而不是/nbp flag如果需要查看规则的详细介绍, 可以前往WIKI查看 --> GiteeGithub支持 Residence 领地插件 (如果玩家在领地内将不会使用本插件任何检测) v1.0.9

https://i.imgur.com/tMEktHg.png
https://s2.loli.net/2022/05/04/8j1KTHqbZ6yScYB.png
https://s2.loli.net/2022/05/04/HU8EVg4nApfMs5Z.png
https://s2.loli.net/2022/05/04/1sqmQ45xbSCRli8.png
https://s2.loli.net/2022/06/01/U31KrFumjnRXbyZ.png


https://i.imgur.com/U3HB6Gy.png



https://i.imgur.com/j71ltHa.png
nobuildplus.use 使用指令
nobuildplus.bypass 绕过规则设置 默认op(1.0.3版本后可为各个世界设置,可自行设置权限节点)


https://i.imgur.com/aNQVD6r.png
只需要把NoBuildPlus.jar放进你的服务器plugins文件夹里就行
1. 输入/nbp create <世界> 在worlds.yml中创建世界
2. 输入/nbp flag <世界> <规则> <布尔值> 更改世界的规则 (true=允许 / false=禁止)
2.1. 或者你可以在配置文件中进行更改, 更改完成后需要/nbp reload重载配置文件
   2.2 如果你想要删除世界的消息提示,将worlds.yml中该世界的deny-message项删除即可
3. 享受插件功能!
4. 在WIKI中查看规则介绍能更好地助你完成插件配置
已知BUGs:
规则farmbreak检测的时候会给后台刷屏,那个不是bug 忘记去掉了 已在v1.1.2解决
创建世界时不会在worlds.yml里创建fall-damage [解决办法: 加个 fall-damage: true/false就行] 已在v1.1.5解决

↓ 可能为非最新版插件的文件 不会定时更新下面的文件 如有需要可前往Spigotmc查看较新的配置文件

#############################################################################
##                                                                         ##
##                                                                         ##
##                                                                         ##
##                           No Build Plus                                 ##
##                        made by p1xEL_mc                               ##
##                                                                         ##
##                                                                         ##
##                                                                         ##
#############################################################################
## How to use the plugin
##
## worlds.yml is the worlds data file. You can change each world's flag and deny message.
## You can change the flag for world with command. However, you have to change the deny message by yourself. (Or it will use the default settings')
##
## flags.yml is a flags manager file. You can enable or disable the flag here.
## There is a type for the flag. type: all (some flags are unavailable for type: all) type: list (Use the objects from the list.)
##
## Sorry for my bad english.
##
## Thanks for using my plugin
## My name on SpigotMC is p1xEL_mc

# The version of the plugin.
Version: 1.1.7
type: Release

# Language of the file.
# Languages list: en(English) zh_CN(Simplified Chinese).
# It only changes the texts from language file if you change this.
Language: en

# Check update when the plugin loaded.
check-update: true

hook:
Residence: true



flags:
break:
    enable: true
    type: all
    list:
      - GRASS_BLOCK
build:
    enable: true
    type: all
    list:
      - GRASS_BLOCK
use:
    enable: true
    type: list
    list:
      - ENCHANTING_TABLE
      - CRAFTING_TABLE
      - ANVIL
      - CHIPPED_ANVIL
      - DAMAGED_ANVIL
container:
    enable: true
    type: list
    list:
      - CHEST
      - ENDER_CHEST
      - TRAPPED_CHEST
      - FURNACE
move:
    enable: true
    list:
      - s1mple
mob-damage:
    enable: true
    type: all
    list:
      - ZOMBIE
mob-explode:
    enable: true
    type: all
    list:
      - CREEPER
pvp:
    enable: true
shoot:
    enable: true
    # set true if your minecraft server version has crossbow.
    include-crossbow: false
tnt:
    enable: true
tnt-damage:
    enable: true
frame:
    enable: true
    # 1.17+
    include-glow-frame: false
bed:
    enable: true
voidtp:
    enable: true
villager:
    enable: true
command:
    enable: true
    type: list
    list:
      - 'spawn'
chat:
    enable: true
leaf-decay:
    enable: true
melt:
    enable: true
fall-damage:
    enable: true
armorstand:
    enable: true
farmbreak:
    enable: true
ride:
    enable: true
    # list only
    type: list
    list:
      - HORSE
      - MINECART
painting:
    enable: true
bucket-place:
    enable: true
bucket-fill:
    enable: true
boat:
    enable: true
    # list only
    type: list
    # For Boat Placing only
    list:
      - 'OAK_BOAT'
      - 'SPRUCE_BOAT'
      - 'BIRCH_BOAT'
      - 'JUNGLE_BOAT'
      - 'ACACIA_BOAT'
      - 'DARK_OAK_BOAT'
      - 'MANGROVE_BOAT'
      - 'OAK_CHEST_BOAT'
      - 'SPRUCE_CHEST_BOAT'
      - 'BIRCH_CHEST_BOAT'
      - 'JUNGLE_CHEST_BOAT'
      - 'ACACIA_CHEST_BOAT'
      - 'DARK_OAK_CHEST_BOAT'
      - 'MANGROVE_CHEST_BOAT'
    chestBoatEnable: false
button:
    enable: true
    # list only
    type: list
    list:
      - 'stone_button'
      - 'oak_button'
      - 'spruce_button'
      - 'birch_button'
      - 'jungle_button'
      - 'acacia_button'
      - 'dark_oak_button'
      - 'mangrove_button'
      - 'crimson_button'
      - 'warped_button'
      - 'polished_blackstone_button'
door-interact:
    enable: true
    # list only
    type: list
    list:
      - 'oak_door'
      - 'spruce_door'
      - 'birch_door'
      - 'jungle_door'
      - 'acacia_door'
      - 'dark_oak_door'
      - 'mangrove_door'
      - 'crimson_door'
      - 'warped_door'
lever:
    enable: true
trapdoor-interact:
    enable: true
    # list only
    type: list
    list:
      - 'oak_trapdoor'
      - 'spruce_trapdoor'
      - 'birch_trapdoor'
      - 'jungle_trapdoor'
      - 'acacia_trapdoor'
      - 'dark_oak_trapdoor'
      - 'mangrove_trapdoor'
      - 'crimson_trapdoor'
      - 'warped_trapdoor'
fencegate-interact:
    enable: true
    # list only
    type: list
    list:
      - 'oak_fence_gate'
      - 'spruce_fence_gate'
      - 'birch_fence_gate'
      - 'jungle_fence_gate'
      - 'acacia_fence_gate'
      - 'dark_oak_fence_gate'
      - 'mangrove_fence_gate'
      - 'crimson_fence_gate'
      - 'warped_fence_gate'
# For Player
drop-item:
    enable: true
    type: all
    list:
      - 'STONE'
egg-throw:
    enable: true
snowball-throw:
    enable: true
water-spread:
    enable: true
lava-spread:
    enable: true




global-settings:
# true = not prevent
# false = prevent
flags:
    break: false
    build: false
    use: true
    container: false
    move: true
    mob-damage: true
    mob-explode: false
    pvp: false
    shoot: false
    tnt: false
    tnt-damage: false
    frame: false
    bed: false
    voidtp: false
    villager: true
    command: true
    chat: true
    leaf-decay: true
    melt: true
    fall-damage: true
    armorstand: false
    farmbreak: false
    ride: true
    painting: true
    bucket-place: false
    bucket-fill: false
    boat: false
    button: true
    door-interact: true
    lever: true
    trapdoor-interact: true
    fencegate-interact: true
    drop-item: true
    egg-throw: true
    snowball-throw: true
    water-spread: true
    lava-spread: true
permission: nobuildplus.bypass
deny-message: '&c&l! &7You cannot do that here.'




https://i.imgur.com/Sgskt3q.png
https://s2.loli.net/2022/05/07/bjZu36B8yoDN1zE.png https://s2.loli.net/2022/05/07/xH7kaiQCPVnyvSZ.png https://s2.loli.net/2022/05/07/JKMNt5UGZyTehAs.png https://s2.loli.net/2022/05/20/RhYoBs13dEbH4zr.png https://s2.loli.net/2022/05/20/aqhCsi3K7YxXrtl.png
我仅是一名仍在学习的开发者 我的代码没有任何参考价值 请不要评论我的源码
前置插件:
[可选] Residence SpigotMC
更新记录:
1.0.0
于以下服务端核心上测试1.8.8 Spigot1.12.2 Spigot1.16.5 Spigot1.18.2 Paper完善插件功能

1.0.1
于 Spigot 1.16.5 上测试
新增mob-explode及tnt

1.0.2
于 Spigot 1.16.5 上测试
修复了一些bug
新增规则: 展示框保护

1.0.3
于 Spigot 1.16.5 上测试
现在可以为各个世界设置自定义绕过权限了

1.0.4
于 Spigot 1.12.2 上测试
新增指令/nbp setspawn /nbp tp /nbp flag list
新增规则: bed, voidtp
修复bug

1.0.5
于 Spigot 1.12.2 上测试
新增规则: villager, command
将自定义文件名字功能从config中删除
修复了一些Bug

1.0.6
于 Spigot 1.12.2 上测试
新增规则: tnt-damage, chat, leaf-decay
修复了输入/nbp后报错的问题

1.0.7
于 Spigot 1.12.2 上测试
新增规则: shoot, melt

1.0.8
于 Spigot 1.8.8 及 Paper 1.18.2 上测试
新增规则: fall-damage
支持Java8

1.0.9
于 Spigot 1.8.8 上测试
新增对 Residence 的支持
玩家在领地内将无视世界的规则
(未完全测试,只测试数个规则)

1.1.0
于 Spigot 1.8.8 上测试
新增规则: armorstand (op不能放)
更改了一些代码的位置
修复了展示框无法被有权限的人放置的问题

1.1.1
于 Spigot 1.8.8 上测试
新增规则: farmbreak

1.1.2
于 Spigot 1.8.8 上测试
去掉了检测farmbreak时在后台刷屏的问题
简化了farmbreak的检测方式
去除flags.yml中farmbreak的isHighVersion

1.1.3
于 Spigot 1.12.2 上测试
修复了其他生物仍然能踩踏农田的问题

1.1.4
于 Spigot 1.19 上测试
新增对1.19的支持
优化部分代码 (插件本体下降了1KB)
移除了Settings.yml中的enable-worlds及flags.yml的FlagsList
修复了展示框依然能被鸡蛋、雪球、箭等破坏的问题
新增规则 ride (需要自行在flags.yml加入需要阻止的实体,默认: horse(马), minecart(矿车))

1.1.5
于 Spigot 1.12.2 上测试
新增规则: painting, bucket-place, bucket-fill
调整了一些代码

1.1.6
于 Spigot 1.19 上测试
新增规则: boat

1.1.7
于 Purpur 1.19.1 上测试
新增规则:
- button
- door-interact
- lever
- trapdoor-interact
- fencegate-interact
- drop-item
- egg-throw
- snowball-throw
- water-spread
- lava-spread

1.1.8
于 Purpur 1.19.1 上测试
改了点代码
新增规则: fly, teleport(玩家)
新增语言: 繁体中文(zh_TW)

1.1.9
于 Purpur 1.19.1 上测试
减少了插件大小

1.2.0
于 Purpur 1.19.1 上测试
新增规则: mob-spawn

1.2.1
于 Purpur 1.19.1 上测试
小改了water-spread和lava-spread的代码
flags.yml中的move已默认改为false(比较卡 不建议开启)

1.2.2
于 Purpur 1.19.1 上测试
将部分规则改为默认关闭
小优化了插件代码

1.2.3
于 Mohist 1.12.2 上测试
修复了snowball的Bug

1.2.4
于 Mohist 1.12.2 上测试
修复了部分bug

1.2.5
于 Purpur 1.19.1 上测试
如果你不想要消息提示
将 deny-message 项删除即可

1.2.6
没有进行测试
调整了move的代码

新更新记录请前往SpigotMC查看



欢迎加入我的插件反馈Q群906136216

你的每次评分亦是我更新及制作的动力 不妨给个评分?

本插件所用代码部分来自其他开源或闭源(已授权)作品





DYY.. 发表于 2023-2-12 14:29:10

好像哪里见过它
页: [1]
查看完整版本: NoBuildPlus —— 轻量级的世界保护插件