diff options
author | HexedHero <[email protected]> | 2022-04-18 10:51:45 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-04-18 11:51:45 +0200 |
commit | c66b0f99f230ac752840c1604fc886873b72467c (patch) | |
tree | 0710eddea94f51e4f5b995e044139e8955b80b5f /test-plugin | |
parent | 8bfb1d22f83921e6c26bae80530fef7f4d3ea8e6 (diff) | |
download | Paper-c66b0f99f230ac752840c1604fc886873b72467c.tar.gz Paper-c66b0f99f230ac752840c1604fc886873b72467c.zip |
Add pre-unbreaking amount to PlayerItemDamageEvent (#7724)
Diffstat (limited to 'test-plugin')
-rw-r--r-- | test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java b/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java index a0c78b9d68..45279181cc 100644 --- a/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java +++ b/test-plugin/src/main/java/io/papermc/paper/testplugin/TestPlugin.java @@ -1,6 +1,8 @@ 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 { @@ -8,4 +10,9 @@ public final class TestPlugin extends JavaPlugin implements Listener { public void onEnable() { this.getServer().getPluginManager().registerEvents(this, this); } + + @EventHandler + public void a(PlayerItemDamageEvent event) { + System.out.println(event.getOriginalDamage() + " to " + event.getDamage()); + } } |