Paper/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java

19 lines
559 B
Java

package io.papermc.paper.testplugin;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerItemDamageEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class TestPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void a(PlayerItemDamageEvent event) {
System.out.println(event.getOriginalDamage() + " to " + event.getDamage());
}
}