diff --git a/pom.xml b/pom.xml
index 5e8b769..84a0e37 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
xyz.etztech
QoL
- 1.12
+ 1.13
jar
diff --git a/src/main/java/xyz/etztech/qol/QoL.java b/src/main/java/xyz/etztech/qol/QoL.java
index e1ee728..e841f54 100644
--- a/src/main/java/xyz/etztech/qol/QoL.java
+++ b/src/main/java/xyz/etztech/qol/QoL.java
@@ -104,6 +104,7 @@ public class QoL extends JavaPlugin {
new BlockIgniteListener(this);
new CommandPreprocessListener(this);
new DeathListener(this);
+ new EntityChangeBlockListener(this);
// Add commands
new MainCommand(this);
diff --git a/src/main/java/xyz/etztech/qol/listeners/EntityChangeBlockListener.java b/src/main/java/xyz/etztech/qol/listeners/EntityChangeBlockListener.java
new file mode 100644
index 0000000..cd99c11
--- /dev/null
+++ b/src/main/java/xyz/etztech/qol/listeners/EntityChangeBlockListener.java
@@ -0,0 +1,26 @@
+package xyz.etztech.qol.listeners;
+
+import org.bukkit.entity.EntityType;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
+import org.bukkit.event.entity.EntityChangeBlockEvent;
+import xyz.etztech.qol.QoL;
+
+public class EntityChangeBlockListener implements Listener {
+ QoL plugin;
+
+ public EntityChangeBlockListener(QoL plugin) {
+ this.plugin = plugin;
+ plugin.getServer().getPluginManager().registerEvents(this, plugin);
+ }
+
+ @EventHandler
+ public void onEntityChangeBlock(EntityChangeBlockEvent e) {
+ if (e.getEntity().getType() == EntityType.ENDERMAN) {
+ if(plugin.getConfig().getBoolean("disable-mob-grief.enderman", false)){
+ e.setCancelled(true);
+ }
+ }
+
+ }
+}
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 102a360..4c297df 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -93,6 +93,9 @@ disable-fire:
ender_crystal: false
explosion: false
+disable-mob-grief:
+ enderman: false
+
# A list of commands to confirm before using if the user isn't in spectator mode
spec-confirm:
- "tp"