From 6017062ddb015ab9346f098e8c5f9910211cd5ee Mon Sep 17 00:00:00 2001 From: Jules Date: Fri, 21 Feb 2020 17:43:13 +0100 Subject: [PATCH] Changed regen cause so disable-regen does not impact MMOCore regen --- src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java b/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java index b9263aa3..7983906d 100644 --- a/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java +++ b/src/main/java/net/Indyuce/mmocore/listener/PlayerListener.java @@ -93,7 +93,7 @@ public class PlayerListener implements Listener { @EventHandler(priority = EventPriority.HIGH) public void g(PlayerRegenResourceEvent event) { if (event.getResource() == PlayerResource.HEALTH) { - EntityRegainHealthEvent bukkitEvent = new EntityRegainHealthEvent(event.getPlayer(), event.getAmount(), RegainReason.REGEN); + EntityRegainHealthEvent bukkitEvent = new EntityRegainHealthEvent(event.getPlayer(), event.getAmount(), RegainReason.CUSTOM); Bukkit.getPluginManager().callEvent(bukkitEvent); event.setCancelled(bukkitEvent.isCancelled()); event.setAmount(bukkitEvent.getAmount());