KillProtect-pikutog

插件

· 作者 pikutog

被玩家击杀后提供临时的 PvP 保护,支持可选的临时权限(LuckPerms),禁用床重生点。/ 在一段时间内禁止对被击杀者进行 PvP。支持临时赋予权限、禁用床重生点。

0 本站下载 0 关注 更新于 6 天前

最新 1.0.0 · 26.3 · Paper / Purpur

一键开服(送7天)

SUMMARY FIELD (paste into Modrinth's "Summary", max 256 characters) EN: 玩家被其他玩家击杀后获得短暂喘息时间:临时 PvP 保护、可选的临时权限(LuckPerms),以及禁用床重生点。支持英文和日文消息。 JA: 他のプレイヤーにキルされた人を、一定時間 PvP 不可にします。LuckPerms による権限の一時付与と、ベッドのリスポーン地点の無効化にも対応。メッセージは英語・日本語。

================ DESCRIPTION BODY STARTS BELOW (paste everything under this line) ================

KillProtect

English | 日本語

A lightweight plugin for PvP, lifesteal and survival servers. When a player is killed by another player, they get a short breather: they cannot be attacked (and cannot attack) for a configurable time, and you can optionally give them temporary permissions, such as a free /rtp to get away from the spot where they died.

Features

  • Temporary PvP protection: after being killed, a player can neither attack other players nor be attacked by them. Arrows, tridents and other projectiles count too.
  • Temporary permissions (optional): give the killed player any permissions for the same amount of time through LuckPerms. For example, let players use /rtp only right after they died.
  • No bed respawn points: sleeping in a bed no longer sets the respawn point, but players can still sleep to skip the night. Respawn anchors can be disabled too.
  • English and Japanese: choose the language in config.yml. Every message can be edited, and you can add your own language file.
  • Lightweight: no database and no required dependencies.

Requirements

  • Paper 1.21 or newer (Folia is not supported)
  • LuckPerms is optional. It is only needed if you want temporary permissions.

Installation

  1. Put KillProtect.jar into your plugins folder.
  2. Start the server. plugins/KillProtect/config.yml and the lang folder are created.
  3. Edit config.yml as you like.
  4. Run /killprotect reload (or restart the server).

Configuration

language: "en"            # "en" or "ja" (or your own language file)

protection:
  duration: "10m"         # 30s, 10m, 1h30m, 2d ... (s, m, h, d, w)
  only-player-kills: true # false = every death starts the protection
  pvp-block: true         # block attacks to and from the protected player
  permissions: []         # temporary permissions, needs LuckPerms

spawn:
  disable-bed-respawn: true
  disable-anchor-respawn: false
Option Description
language Language of the in-game messages. en and ja are included.
protection.duration How long the protection and the temporary permissions last.
protection.only-player-kills true: only kills by other players count. false: every death counts.
protection.pvp-block true: the protected player can neither attack nor be attacked.
protection.permissions Permission nodes given temporarily to the killed player (LuckPerms).
spawn.disable-bed-respawn true: beds no longer set the respawn point.
spawn.disable-anchor-respawn true: respawn anchors no longer set the respawn point.

Example: allow /rtp only after being killed

  1. Find the permission of the command. Run /lp verbose on, use the command with a non-OP account and read the permission in the output.
  2. Make sure your default group does not have that permission. Otherwise everyone can use it all the time.
  3. Add it to config.yml:
    protection:
      permissions:
        - "simplertp.rtp"
    
  4. Run /killprotect reload.

From now on, a player who is killed by another player can use the command for duration. LuckPerms removes the permission automatically when the time is up.

Commands and permissions

Command Permission Description
/killprotect reload killprotect.admin (default: OP) Reloads config.yml and the language files.

Languages

On the first start, lang/en.yml and lang/ja.yml are created in plugins/KillProtect/. Set language in config.yml to choose one. To add your own language, copy lang/en.yml to lang/<code>.yml, translate it and set language: "<code>". Any message missing from a language file falls back to English.

Notes and limitations

  • The PvP protection timer is kept in memory, so it is cleared when the server restarts. Temporary permissions are stored by LuckPerms and survive restarts.
  • Only direct hits and projectiles are blocked. Indirect damage (for example splash potions or TNT) may not be blocked.
  • Respawn points that were set before the plugin was installed are not removed.

日本語

English | 日本語

PvP・ライフスティール・サバイバルサーバー向けの軽量プラグインです。他のプレイヤーにキルされた人は、設定した時間のあいだ、攻撃されず、攻撃もできなくなります。さらに、死んだ場所から離れるための /rtp など、好きな権限を一時的に付与することもできます。

機能

  • 一時的な PvP 保護: キルされたプレイヤーは、一定時間、他のプレイヤーを攻撃できず、攻撃もされません。矢や三叉槍などの飛び道具も対象です。
  • 権限の一時付与(任意): LuckPerms を通じて、キルされた人に好きな権限を同じ時間だけ付与できます。たとえば、死んだ直後だけ /rtp を使えるようにできます。
  • ベッドのリスポーン地点を無効化: ベッドで寝てもリスポーン地点は登録されませんが、夜をスキップすることはできます。リスポーンアンカーも無効にできます。
  • 英語・日本語に対応: config.yml で言語を選べます。メッセージはすべて編集でき、自分の言語ファイルを追加することもできます。
  • 軽量: データベースは不要で、必須の依存プラグインもありません。

必要なもの

  • Paper 1.21 以降(Folia には非対応です)
  • LuckPerms(任意)。権限の一時付与を使う場合だけ必要です。

導入方法

  1. KillProtect.jar を plugins フォルダに入れます。
  2. サーバーを起動します。plugins/KillProtect/config.yml と lang フォルダが作られます。
  3. config.yml を好きなように編集します。
  4. /killprotect reload を実行します(またはサーバーを再起動します)。

設定

language: "ja"            # "en" か "ja"(自作の言語ファイルも可)

protection:
  duration: "10m"         # 30s, 10m, 1h30m, 2d ... (s, m, h, d, w)
  only-player-kills: true # false にすると、すべての死亡が対象
  pvp-block: true         # 保護中の人への攻撃と、その人からの攻撃を止める
  permissions: []         # 一時付与する権限(LuckPerms が必要)

spawn:
  disable-bed-respawn: true
  disable-anchor-respawn: false
項目 説明
language ゲーム内メッセージの言語。en と ja が付属しています。
protection.duration 保護と、一時権限が続く時間。
protection.only-player-kills true: 他のプレイヤーに殺された時だけ対象。false: すべての死亡が対象。
protection.pvp-block true: 保護中の人は、攻撃も被攻撃もできません。
protection.permissions キルされた人に一時付与する権限ノード(LuckPerms)。
spawn.disable-bed-respawn true: ベッドでリスポーン地点が登録されません。
spawn.disable-anchor-respawn true: リスポーンアンカーでリスポーン地点が登録されません。

例: キルされた後だけ /rtp を使えるようにする

  1. コマンドの権限ノードを調べます。/lp verbose on を実行し、OP ではないアカウントでそのコマンドを使って、表示された権限を読み取ります。
  2. default グループに、その権限が付いていないことを確認します。付いていると、全員がいつでも使えてしまいます。
  3. config.yml に追加します。
    protection:
      permissions:
        - "simplertp.rtp"
    
  4. /killprotect reload を実行します。

これで、他のプレイヤーにキルされた人は、duration の間だけそのコマンドを使えます。時間が来ると、LuckPerms が自動で権限を外します。

コマンドと権限

コマンド 権限 説明
/killprotect reload killprotect.admin(初期値: OP) config.yml と言語ファイルを再読み込みします。

言語

初回の起動時に、plugins/KillProtect/ に lang/en.yml と lang/ja.yml が作られます。config.yml の language で選んでください。自分の言語を追加するには、lang/en.yml を lang/<コード>.yml としてコピーして翻訳し、language: "<コード>" と設定します。言語ファイルにないメッセージは、英語で表示されます。

注意点と制限

  • PvP 保護の残り時間はメモリ上にあるので、サーバーを再起動すると消えます。一時権限は LuckPerms が保存しているので、再起動しても残ります。
  • 直接の攻撃と飛び道具だけを止めます。スプラッシュポーションや TNT などの間接的なダメージは、止められない場合があります。
  • プラグインを入れる前に設定されていたリスポーン地点は、消えません。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源