简体中文
kildtoken 是一款适用于 Minecraft 的 Paper 插件,旨在添加一个简单但受控的基于 PvP 的货币系统。当一名玩家击杀另一名玩家时,会在受害者死亡的位置掉落一个名为 Kill Token 的自定义物品。默认情况下,该物品是一个带有自定义名称和描述的下界之星(Nether Star),因此可以清楚地将其识别为特殊货币物品,而非普通掉落物。
工作原理
该插件监听玩家死亡事件,并检查击杀者是否为其他玩家。如果是,则直接在死亡位置生成配置好的货币物品。该物品包含固定的元数据(如名称和描述),确保令牌始终外观一致,并在服务器上易于识别。
防刷机制
为了防止同一对玩家之间互相刷取令牌,该插件使用了一对一的冷却系统。当玩家 A 击杀玩家 B 时,针对这一特定玩家对会应用一分钟的冷却时间。在此期间:
- 玩家 A 再次击杀玩家 B 将不会掉落令牌
- 玩家 B 再次击杀玩家 A 也不会掉落令牌
这样可以防止玩家从彼此身上刷取令牌。冷却时间仅适用于该特定的一对玩家,不会影响涉及其他玩家的击杀。例如,如果玩家 A 击杀了玩家 C,令牌仍会正常掉落。
货币自定义
可以通过以下命令动态更改货币:
/killtoken set
使用该命令后,玩家主手中当前持有的物品将成为新的货币物品。从此以后,所有后续的令牌掉落都将使用此物品,取代默认的下界之星。这允许服务器管理员在不修改代码的情况下自由定义经济系统中的物品。
English
kildtoken is a Paper plugin for Minecraft designed to add a simple but controlled PvP-based currency system. Whenever one player kills another player, a custom item called a Kill Token is dropped at the victim’s death location. By default, this item is a Nether Star with a custom name and lore, so it is clearly recognizable as a special currency item instead of a normal drop.
How it works
The plugin listens to player death events and checks whether the killer is another player. If that is the case, it spawns the configured currency item directly at the death location. The item includes fixed metadata such as name and lore, which makes sure the token always looks the same and is easy to identify on the server.
Anti-farming system
To prevent abuse and farming between the same players, the plugin uses a pair-based cooldown system. When Player A kills Player B, a cooldown of one minute is applied to this exact player pair. During that time:
- Player A killing Player B again will not drop a token
- Player B killing Player A again will also not drop a token
This prevents players from farming tokens from each other. The cooldown only applies to that specific pair and does not affect kills involving other players. For example, if Player A kills Player C, a token will still drop normally.
Currency customization
The currency can be changed dynamically with the command:
/killtoken set
When this command is used, the item currently held in the player’s main hand becomes the new currency item. From that point on, all future token drops will use this item instead of the default Nether Star. This allows the server owner to freely define the economy item without changing the code.
Deutsch
kildtoken ist ein Paper-Plugin für Minecraft, das ein einfaches, aber kontrolliertes PvP-Währungssystem einführt. Immer wenn ein Spieler einen anderen Spieler tötet, wird ein spezielles Item namens Kill Token am Todesort gedroppt. Standardmäßig ist dieses Item ein Netherstern mit individuellem Namen und Lore, damit es sich klar von normalen Items unterscheidet.
Funktionsweise
Das Plugin reagiert auf Spieler-Todes-Events und prüft, ob ein anderer Spieler der Killer war. Wenn das der Fall ist, wird das konfigurierte Währungs-Item direkt am Todesort gespawnt. Das Item enthält feste Metadaten wie Name und Lore, sodass der Token immer gleich aussieht und auf dem Server leicht zu erkennen ist.
Anti-Farming-System
Damit Spieler nicht miteinander Tokens farmen können, nutzt das Plugin ein paarweises Cooldown-System. Wenn Spieler A Spieler B tötet, wird für genau dieses Spielerpaar ein Cooldown von einer Minute gesetzt. Während dieser Zeit gilt:
- Wenn Spieler A erneut Spieler B tötet, droppt kein Token
- Wenn Spieler B erneut Spieler A tötet, droppt ebenfalls kein Token
So wird verhindert, dass Spieler sich gegenseitig Tokens farmen. Der Cooldown gilt nur für dieses konkrete Paar und beeinflusst keine anderen Kills. Wenn Spieler A zum Beispiel Spieler C tötet, droppt dort ganz normal wieder ein Token.
Währungs-Anpassung
Die Währung kann dynamisch mit folgendem Befehl geändert werden:
/killtoken set
Dabei wird das Item in der Main-Hand des Spielers als neue Währung festgelegt. Alle zukünftigen Token-Drops verwenden dann dieses Item anstelle des Standard-Nethersterns. Dadurch kann der Server die Währung frei anpassen, ohne den Code zu verändern.
评论 0
登录后参与评分
还没有评论,来抢沙发吧