diff --git a/pom.xml b/pom.xml
index 757e600..040f0cd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
pl.betoncraft.hordes
Hordes
- 1.0
+ 1.0.2
UTF-8
diff --git a/src/main/java/pl/betoncraft/hordes/WorldSettings.java b/src/main/java/pl/betoncraft/hordes/WorldSettings.java
index 9cdfd66..418d6d8 100644
--- a/src/main/java/pl/betoncraft/hordes/WorldSettings.java
+++ b/src/main/java/pl/betoncraft/hordes/WorldSettings.java
@@ -25,6 +25,7 @@
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
+import org.bukkit.entity.Tameable;
/**
* Contains all settings for the world.
@@ -65,7 +66,8 @@ public WorldSettings(Hordes plugin, String world) throws LoadingException {
/**
* Checks if the entity is withing range of the player or if it has custom
- * name. In other words, if it should be removed or left alone.
+ * name or if it is tamed. In other words, if it should be removed or left
+ * alone.
*
* @param entity
* entity to check
@@ -74,6 +76,10 @@ public WorldSettings(Hordes plugin, String world) throws LoadingException {
public boolean shouldExist(Entity entity) {
if (entity.getCustomName() != null) return true;
if (!entities.contains(entity.getType())) return true;
+ if (entity instanceof Tameable) {
+ Tameable t = (Tameable) entity;
+ if (t.isTamed()) return true;
+ }
for (Player player : Bukkit.getOnlinePlayers()) {
if (player.getGameMode() == GameMode.CREATIVE ||
player.getGameMode() == GameMode.SPECTATOR) continue;
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index 5f8ed24..5d91c94 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -2,7 +2,7 @@ name: Hordes
main: pl.betoncraft.hordes.Hordes
description: Increases amount of mobs near players while decreasing overall number of mobs.
authors: [Co0sh]
-version: 1.0
+version: 1.0.2
commands:
hordesreload:
description: Reloads the configuration