1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Fixed 1.11 & 1.12 entities don't work (#533)

This commit is contained in:
Yiğit Duman 2019-09-14 15:30:23 +03:00 committed by montlikadani
parent 648c6f412a
commit ab2405eaff
2 changed files with 6 additions and 40 deletions

View File

@ -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();
}

View File

@ -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();
}