aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-plugin
diff options
context:
space:
mode:
authorHexedHero <[email protected]>2022-04-18 10:51:45 +0100
committerGitHub <[email protected]>2022-04-18 11:51:45 +0200
commitc66b0f99f230ac752840c1604fc886873b72467c (patch)
tree0710eddea94f51e4f5b995e044139e8955b80b5f /test-plugin
parent8bfb1d22f83921e6c26bae80530fef7f4d3ea8e6 (diff)
downloadPaper-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.java7
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());
+ }
}