From ab2405eaff64c3023ea3e7f6698fe10f6cdd4512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yi=C4=9Fit=20Duman?= Date: Sat, 14 Sep 2019 15:30:23 +0300 Subject: [PATCH] Fixed 1.11 & 1.12 entities don't work (#533) --- .../com/gamingmesh/jobs/nmsUtil/v1_11.java | 23 +++---------------- .../com/gamingmesh/jobs/nmsUtil/v1_12.java | 23 +++---------------- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_11.java b/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_11.java index af3b866d..318925a6 100644 --- a/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_11.java +++ b/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_11.java @@ -1,8 +1,6 @@ package com.gamingmesh.jobs.nmsUtil; -import java.util.ArrayList; -import java.util.List; - +import com.gamingmesh.jobs.NMS; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -10,7 +8,8 @@ import org.bukkit.entity.Player; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.inventory.ItemStack; -import com.gamingmesh.jobs.NMS; +import java.util.ArrayList; +import java.util.List; public class v1_11 implements NMS { @Override @@ -22,22 +21,6 @@ public class v1_11 implements NMS { @Override public String getRealType(Entity entity) { - switch (entity.getType().name()) { - case "WITHER_SKELETON": - return "skeletonwither"; - case "STRAY": - return "SkeletonStray"; - case "ZOMBIE_VILLAGER": - return "ZombieVillager"; - case "HUSK": - return "ZombieHusk"; - case "SKELETON_HORSE": - return "HorseSkeleton"; - case "ZOMBIE_HORSE": - return "HorseZombie"; - case "ELDER_GUARDIAN": - return "GuardianElder"; - } return entity.getType().name(); } diff --git a/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_12.java b/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_12.java index da2e6256..ab83093e 100644 --- a/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_12.java +++ b/src/main/java/com/gamingmesh/jobs/nmsUtil/v1_12.java @@ -1,8 +1,6 @@ package com.gamingmesh.jobs.nmsUtil; -import java.util.ArrayList; -import java.util.List; - +import com.gamingmesh.jobs.NMS; import org.bukkit.attribute.Attribute; import org.bukkit.block.Block; import org.bukkit.entity.Entity; @@ -11,7 +9,8 @@ import org.bukkit.entity.Player; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.inventory.ItemStack; -import com.gamingmesh.jobs.NMS; +import java.util.ArrayList; +import java.util.List; public class v1_12 implements NMS { @Override @@ -23,22 +22,6 @@ public class v1_12 implements NMS { @Override public String getRealType(Entity entity) { - switch (entity.getType().name()) { - case "WITHER_SKELETON": - return "skeletonwither"; - case "STRAY": - return "SkeletonStray"; - case "ZOMBIE_VILLAGER": - return "ZombieVillager"; - case "HUSK": - return "ZombieHusk"; - case "SKELETON_HORSE": - return "HorseSkeleton"; - case "ZOMBIE_HORSE": - return "HorseZombie"; - case "ELDER_GUARDIAN": - return "GuardianElder"; - } return entity.getType().name(); }