{"id":16374161,"url":"https://github.com/mouse0w0/law","last_synced_at":"2026-02-26T10:06:30.671Z","repository":{"id":63448870,"uuid":"566671465","full_name":"mouse0w0/law","owner":"mouse0w0","description":"A Spigot plugin for managing game behavior.","archived":false,"fork":false,"pushed_at":"2024-08-14T12:48:48.000Z","size":165,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-12T03:16:25.302Z","etag":null,"topics":["bukkit","bukkit-plugin","minecraft-plugin","spigot","spigot-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mouse0w0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-16T06:58:49.000Z","updated_at":"2024-08-25T13:09:09.000Z","dependencies_parsed_at":"2023-02-08T19:31:30.854Z","dependency_job_id":"6fb7759d-9899-4717-af80-d09250a6fb62","html_url":"https://github.com/mouse0w0/law","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouse0w0%2Flaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouse0w0%2Flaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouse0w0%2Flaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mouse0w0%2Flaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mouse0w0","download_url":"https://codeload.github.com/mouse0w0/law/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221811225,"owners_count":16884279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bukkit","bukkit-plugin","minecraft-plugin","spigot","spigot-plugin"],"created_at":"2024-10-11T03:16:25.191Z","updated_at":"2026-02-26T10:06:30.619Z","avatar_url":"https://github.com/mouse0w0.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 插件介绍\n本插件基于Bukkit API开发，用于在服务器中控制实体和方块行为，并为不同世界设置不同规则。本插件基于1.16.5开发，但已完成全版本兼容，除部分功能无法在较低版本运行外，其余功能均可运行。插件功能如下所示：\n- 阻止实体生成、通过传送门、爆炸、破坏方块、乘坐载具、捡起物品。\n- 阻止玩家受到伤害、放置方块、破坏方块、点击方块和实体。\n- 阻止物品受到爆炸、火焰和岩浆伤害。\n- 阻止生物转变（村民、女巫、僵尸村民、溺尸、苦力怕、僵尸猪人、蘑菇牛）。\n- 阻止火焰蔓延、烧毁方块、熄灭。\n- 阻止雪形成、融化。\n- 阻止雪傀儡产雪。\n- 阻止冰形成、融化。\n- 阻止珊瑚失水。\n- 阻止踩碎海龟蛋。\n- 阻止耕地退化。\n- 阻止树叶腐烂。\n- 阻止龙蛋传送。\n- 阻止床和重生锚爆炸。\n- 阻止水和岩浆流动。\n- 死亡时保留经验和物品。\n- 控制天气。\n- 阻止方块被点燃。\n\n# 如何配置\n插件初次运行后会在插件安装目录下创建`Law`文件夹，`Law`文件夹的内容如下：\n- `config.yml`：插件的配置文件。\n- `lang.yml`：插件的语言文件。\n- `global.yml`：全局规则配置文件。\n- `worlds`：存放各个世界的规则配置文件的文件夹。\n\n`global.yml`内的文件内容如下所示：\n```yaml\n# 阻止实体生成（1.7及以上版本）\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-entity-spawn: true时匹配所有实体\nprevent-entity-spawn: []\n\n# 阻止实体通过传送门\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-entity-teleport-by-portal: true时匹配所有实体\nprevent-entity-teleport-by-portal: []\n\n# 阻止实体爆炸\n# 苦力怕（CREEPER）、TNT（PRIMED_TNT）、末影水晶（ENDER_CRYSTAL）\n# 凋零头颅（WITHER_SKULL）、恶魂火球（FIREBALL）、TNT矿车（MINECART_TNT）\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-entity-explosion: true时匹配所有实体\nprevent-entity-explosion: []\n\n# 阻止实体破坏方块、画以及展示框\n# 苦力怕（CREEPER）、TNT（PRIMED_TNT）、末影水晶（ENDER_CRYSTAL）、凋零头颅（WITHER_SKULL）\n# 恶魂火球（FIREBALL）、烈焰人火球（SMALL_FIREBALL）、TNT矿车（MINECART_TNT）、末影人（ENDERMAN）\n# 僵尸（ZOMBIE）、凋零（WITHER）、羊（SHEEP）、劫掠兽（RAVAGER）\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-entity-break-block: true时匹配所有实体\nprevent-entity-break-block: [CREEPER, PRIMED_TNT, ENDER_CRYSTAL, WITHER, WITHER_SKULL, FIREBALL, SMALL_FIREBALL, MINECART_TNT, ENDERMAN]\n\n# 阻止实体乘坐载具\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-entity-enter-vehicle: true时匹配所有实体\nprevent-entity-enter-vehicle: []\n\n# 阻止实体捡起物品\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-entity-pickup-item: true时匹配所有实体\nprevent-entity-pickup-item: []\n\n# 阻止实体受到伤害\n# 对画和展示框无效\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用伤害类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/entity/EntityDamageEvent.DamageCause.html\n# 支持正则表达式匹配\n# prevent-entity-damage: true时阻止所有实体受到伤害\nprevent-entity-damage:\n  # 阻止盔甲架受到爆炸伤害\n  ARMOR_STAND: [ENTITY_EXPLOSION, BLOCK_EXPLOSION]\n  # 阻止玩家受到伤害\n  # PLAYER: []\n  # 阻止物品受到爆炸伤害\n  # DROPPED_ITEM: [ENTITY_EXPLOSION, BLOCK_EXPLOSION]\n  # 阻止物品受到火焰和岩浆伤害\n  # DROPPED_ITEM: [LAVA, FIRE, FIRE_TICK]\n\n# 阻止实体受到实体伤害\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 支持正则表达式匹配\n# prevent-entity-damage-by-entity: true时阻止所有实体受到实体伤害\nprevent-entity-damage-by-entity:\n  # 示例\n  _UNKNOWN: []\n  # 阻止玩家受到铁傀儡伤害\n  # PLAYER: [IRON_GOLEM]\n\n# 阻止村民转变为女巫（1.13及以上版本）\nprevent-villager-to-witch: false\n\n# 阻止村民转变为僵尸村民（1.13及以上版本）\nprevent-villager-infection: false\n\n# 阻止僵尸村民转变为村民（1.13及以上版本）\nprevent-villager-cure: false\n\n# 阻止僵尸转变为溺尸\nprevent-zombie-drowning: false\n\n# 阻止苦力怕充能\nprevent-creeper-charge: false\n\n# 阻止猪转变为僵尸猪人\nprevent-pig-to-zombie-pigman: false\n\n# 阻止蘑菇牛切换颜色\nprevent-mooshroom-switch: false\n\n# 阻止火焰蔓延\nprevent-fire-spread: false\n\n# 阻止火焰摧毁方块\nprevent-fire-burn: false\n\n# 阻止火焰熄灭\nprevent-fire-fade: false\n\n# 阻止雪形成\nprevent-snow-form: false\n\n# 阻止雪傀儡产雪\nprevent-snowman-generate-snow: false\n\n# 阻止雪融化\nprevent-snow-melt: false\n\n# 阻止冰形成\nprevent-ice-form: false\n\n# 阻止冰融化\nprevent-ice-melt: false\n\n# 阻止珊瑚失水\nprevent-coral-death: false\n\n# 阻止踩碎海龟蛋\nprevent-turtle-egg-trampling: false\n\n# 阻止耕地退化\nprevent-farmland-decay: false\n\n# 阻止树叶腐烂\nprevent-leaves-decay: false\n\n# 阻止龙蛋传送\nprevent-dragon-egg-teleport: false\n\n# 阻止床爆炸\nprevent-bed-explosion: false\n\n# 阻止重生锚爆炸\nprevent-respawn-anchor-explosion: false\n\n# 阻止水流动\nprevent-water-flow: false\n\n# 阻止岩浆流动\nprevent-lava-flow: false\n\n# 死亡时保留物品\nkeep-inventory-on-death: false\n\n# 死亡时保留经验\nkeep-exp-on-death: false\n\n# 禁用下雨（包括雷暴）\ndisable-weather-raining: false\n\n# 禁用雷暴\ndisable-weather-thunder: false\n\n# 禁用下雨和雷暴打雷\ndisable-weather-lightning: false\n\n# 阻止玩家放置方块\n# 可用方块类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html\n# 支持正则表达式匹配\n# prevent-place-block: true时匹配所有方块\nprevent-place-block: []\n\n# 阻止玩家破坏方块\n# 可用方块类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html\n# 支持正则表达式匹配\n# prevent-break-block: true时匹配所有方块\nprevent-break-block: []\n\n# 阻止玩家左键交互方块\n# 可用方块类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html\n# 支持正则表达式匹配\n# prevent-left-click-block: true时匹配所有方块\nprevent-left-click-block: []\n\n# 阻止玩家右键交互方块\n# 可用方块类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html\n# 支持正则表达式匹配\n# prevent-right-click-block: true时匹配所有方块\nprevent-right-click-block: []\n# 阻止玩家右键花盆和盆栽\n# prevent-right-click-block: [FLOWER_POT, POTTED_.+]\n\n# 阻止玩家使用物品\n# 可用物品类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html\n# 支持正则表达式匹配\n# prevent-use-item: true时匹配所有物品\nprevent-use-item: []\n\n# 阻止发射器发射物品\n# 可用物品类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html\n# 支持正则表达式匹配\n# prevent-dispense-item: true时匹配所有物品\nprevent-dispense-item: []\n\n# 阻止玩家左键交互实体\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-left-click-entity: true时匹配所有实体\nprevent-left-click-entity: []\n\n# 阻止玩家右键交互实体\n# 可用实体类型：https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html\n# 可用实体类型组：LIVING（匹配所有生物）、FRIENDLY（匹配所有友好生物）、HOSTILE（匹配所有敌对生物）\n# 支持正则表达式匹配\n# prevent-right-click-entity: true时匹配所有实体\nprevent-right-click-entity: []\n\n# 阻止点燃方块\n# 可用点燃类型：https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/block/BlockIgniteEvent.IgniteCause.html\n# 支持正则表达式匹配\n# prevent-ignite-block: true时匹配所有点燃原因\nprevent-ignite-block: []\n```\n\n如果要为每个世界单独配置规则，需要在`worlds`文件夹下创建对应世界名的`yml`文件，例如主世界：`world.yml`，下界：`DIM-1.yml`。并将需要覆盖的全局配置的配置项，写入到相应世界的配置文件中，然后使用`UTF-8`编码格式保存配置文件。\n\n# 指令列表\n- `/law help` - 查看插件指令帮助。\n- `/law reload` - 重载插件的配置文件。\n- `/law world` - 查看当前所在世界名。\n- `/law query` - 切换查询模式（点击方块或实体查看其名）。\n\n# 权限列表\n- `law.admin.help` - 查看插件指令帮助。\n- `law.admin.reload` - 重载插件的配置文件。\n- `law.admin.world` - 查看当前所在世界名。\n- `law.admin.query` - 切换查询模式（点击方块或实体查看其名）。\n- `law.bypass.place-block` - 绕过放置方块检查。\n- `law.bypass.break-block` - 绕过破坏方块检查。\n- `law.bypass.left-click-block` - 绕过左键点击方块检查。\n- `law.bypass.right-click-block` - 绕过右键点击方块检查。\n- `law.bypass.use-item` - 绕过使用物品检查。\n- `law.bypass.left-click-entity` - 绕过左键点击实体检查。\n- `law.bypass.right-click-entity` - 绕过右键点击实体检查。\n\n# 下载插件\n\n- [百度网盘下载](https://pan.baidu.com/s/1V3YTptQWiRpBMlSglfwy-A?pwd=ffjc)\n- [Github 加速下载](https://ghproxy.com/?q=https%3A%2F%2Fgithub.com%2Fmouse0w0%2Flaw%2Freleases%2Fdownload%2F2.4.0%2FLaw-2.4.0.jar)\n- [Github 官方下载](https://github.com/mouse0w0/law/releases/download/2.4.0/Law-2.4.0.jar)\n\n# 开源信息\n本插件所有源代码托管于Github，使用**BSD-3-Clause license**开源协议。\n\nhttps://github.com/mouse0w0/law\n\n# 统计信息\n![bStats](https://bstats.org/signatures/bukkit/Law.svg)\n\n**本插件所用所有代码均为原创,不存在借用/抄袭等行为**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmouse0w0%2Flaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmouse0w0%2Flaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmouse0w0%2Flaw/lists"}