Make a minecraft paper plugin 1.21+ support that when a user is died using the anchor Then the person is killed by whome placed anchor
KodariJan 10 at 1:26 pm 75 (v2)
AnchorPunishment
A Paper plugin for Minecraft 1.21+ that tracks Respawn Anchor placements and punishes the placer by killing them when their anchor causes a player's death through explosion. It listens for block placements to record anchor owners and monitors player deaths to enforce the penalty, ensuring accountability for dangerous anchor usage.
No I mean Make a minecraft paper plugin that when a user is died using the anchor Then the person is killed by whome placed anchor. I mean player deth event should be like this player is killed by anchor placer like that not punishment this for cpvp practice server
KodariJan 10 at 1:29 pm 267 (v2)
AnchorKillTracker
A Minecraft Paper plugin designed for CPvP practice servers that tracks Respawn Anchor placements and modifies death messages when players die from Respawn Anchor explosions, attributing the kill to the player who placed the anchor for accurate kill tracking.
Add a config file also and this deth should count as kill on all plugins so modify that event and give
KodariJan 10 at 1:31 pm 455 (v2)
The compilation failed with this error:
code
Validation failed for compilation: Compilation failed with 9 error(s):
ERROR in src/main/java/com/example/AnchorListener.java at line 27: incompatible types: Block cannot be converted to ItemStack
if (XMaterial.RESPAWN_ANCHOR.isSimilar(event.getBlock())) {
^
ERROR in src/main/java/com/example/AnchorListener.java at line 34: incompatible types: Block cannot be converted to ItemStack
if (event.getEntity() instanceof Player && event.getDamager() != null && XMaterial.RESPAWN_ANCHOR.isSimilar(event.getDamager()) && event.getCause() == org.bukkit.event.entity.EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) {
^
ERROR in src/main/java/com/example/AnchorListener.java at line 48: cannot find symbol
event.setKiller(killer);
^
symbol: method setKiller(Player)
location: variable event of type PlayerDeathEvent
ERROR in src/main/java/com/example/AnchorListener.java at line 27: incompatible types: Block cannot be converted to ItemStack
if (XMaterial.RESPAWN_ANCHOR.isSimilar(event.getBlock())) {
^
ERROR in src/main/java/com/example/AnchorListener.java at line 34: incompatible types: Block cannot be converted to ItemStack
if (event.getEntity() instanceof Player && event.getDamager() != null && XMaterial.RESPAWN_ANCHOR.isSimilar(event.getDamager()) && event.getCause() == org.bukkit.event.entity.EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) {
^
ERROR in src/main/java/com/example/AnchorListener.java at line 48: cannot find symbol
event.setKiller(killer);
^
symbol: method setKiller(Player)
location: variable event of type PlayerDeathEvent
ERROR in src/main/java/com/example/AnchorListener.java at line 27: incompatible types: Block cannot be converted to ItemStack
if (XMaterial.RESPAWN_ANCHOR.isSimilar(event.getBlock())) {
^
ERROR in src/main/java/com/example/AnchorListener.java at line 34: incompatible types: Block cannot be converted to ItemStack
if (event.getEntity() instanceof Player && event.getDamager() != null && XMaterial.RESPAWN_ANCHOR.isSimilar(event.getDamager()) && event.getCause() == org.bukkit.event.entity.EntityDamageEvent.DamageCause.BLOCK_EXPLOSION) {
^
ERROR in src/main/java/com/example/AnchorListener.java at line 48: cannot find symbol
event.setKiller(killer);
^
symbol: method setKiller(Player)
location: variable event of type PlayerDeathEvent
=== COMPILATION ERROR ANALYSIS ===
MISSING METHODS:
- setKiller(Player)
ACTION: Check method names and signatures
TYPE MISMATCHES:
- incompatible types: Block cannot be converted to ItemStack
- incompatible types: Block cannot be converted to ItemStack
- incompatible types: Block cannot be converted to ItemStack
- incompatible types: Block cannot be converted to ItemStack
- incompatible types: Block cannot be converted to ItemStack
- incompatible types: Block cannot be converted to ItemStack
ACTION: Fix variable types or casting
FILES TO INVESTIGATE:
- src/main/java/com/example/AnchorListener.java
- src/main/java/com/example/AnchorListener.java
exceeds maximum
Please fix this error by creating a new artifact with the corrected code.
KodariJan 10 at 1:32 pm 499 (v2)
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
5 89
src/main/java/com/example/AnchorKillTracker.java
package com.example;
import org.bukkit.plugin.java.JavaPlugin;
public class AnchorKillTracker extends JavaPlugin {
@Override
public void onEnable() {
saveDefaultConfig();
getServer().getPluginManager().registerEvents(new AnchorListener(this), this);
}
}