forked from Upstream/mmocore
!Removed DisableRegen option (use vanilla gamerule)
This commit is contained in:
parent
7fc5b56d59
commit
ed8426b02f
@ -59,7 +59,6 @@ import net.Indyuce.mmocore.listener.PlayerListener;
|
|||||||
import net.Indyuce.mmocore.listener.SpellCast;
|
import net.Indyuce.mmocore.listener.SpellCast;
|
||||||
import net.Indyuce.mmocore.listener.WaypointsListener;
|
import net.Indyuce.mmocore.listener.WaypointsListener;
|
||||||
import net.Indyuce.mmocore.listener.option.DeathExperienceLoss;
|
import net.Indyuce.mmocore.listener.option.DeathExperienceLoss;
|
||||||
import net.Indyuce.mmocore.listener.option.DisableRegeneration;
|
|
||||||
import net.Indyuce.mmocore.listener.option.HealthScale;
|
import net.Indyuce.mmocore.listener.option.HealthScale;
|
||||||
import net.Indyuce.mmocore.listener.option.NoSpawnerEXP;
|
import net.Indyuce.mmocore.listener.option.NoSpawnerEXP;
|
||||||
import net.Indyuce.mmocore.listener.option.VanillaExperienceOverride;
|
import net.Indyuce.mmocore.listener.option.VanillaExperienceOverride;
|
||||||
@ -274,9 +273,6 @@ public class MMOCore extends JavaPlugin {
|
|||||||
if (getConfig().getBoolean("death-exp-loss.enabled"))
|
if (getConfig().getBoolean("death-exp-loss.enabled"))
|
||||||
Bukkit.getPluginManager().registerEvents(new DeathExperienceLoss(), this);
|
Bukkit.getPluginManager().registerEvents(new DeathExperienceLoss(), this);
|
||||||
|
|
||||||
if (getConfig().getBoolean("disable-vanilla-regen"))
|
|
||||||
Bukkit.getPluginManager().registerEvents(new DisableRegeneration(), this);
|
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(new WaypointsListener(), this);
|
Bukkit.getPluginManager().registerEvents(new WaypointsListener(), this);
|
||||||
Bukkit.getPluginManager().registerEvents(new PlayerListener(), this);
|
Bukkit.getPluginManager().registerEvents(new PlayerListener(), this);
|
||||||
Bukkit.getPluginManager().registerEvents(new GoldPouchesListener(), this);
|
Bukkit.getPluginManager().registerEvents(new GoldPouchesListener(), this);
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
package net.Indyuce.mmocore.listener.option;
|
|
||||||
|
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent;
|
|
||||||
import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
|
||||||
|
|
||||||
public class DisableRegeneration implements Listener {
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
|
||||||
public void a(EntityRegainHealthEvent event) {
|
|
||||||
if (event.getEntityType() == EntityType.PLAYER)
|
|
||||||
if (event.getRegainReason() == RegainReason.SATIATED || event.getRegainReason() == RegainReason.REGEN || event.getRegainReason() == RegainReason.EATING)
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
}
|
|
@ -70,11 +70,6 @@ health-scale:
|
|||||||
enabled: true
|
enabled: true
|
||||||
scale: 20
|
scale: 20
|
||||||
|
|
||||||
# Disable player health regen due to saturation and eating
|
|
||||||
# to control health regen via MMOCore resource regen.
|
|
||||||
# Requires a SERVER reload when changed.
|
|
||||||
disable-vanilla-regen: false
|
|
||||||
|
|
||||||
# Allows to toggle exp hologram from gaining experiences
|
# Allows to toggle exp hologram from gaining experiences
|
||||||
game-indicators:
|
game-indicators:
|
||||||
exp:
|
exp:
|
||||||
|
Loading…
Reference in New Issue
Block a user