Kill armor stands when removing

This commit is contained in:
Eric 2018-11-03 20:31:01 +01:00
parent e6637b546e
commit e359c3b21a

View File

@ -173,6 +173,8 @@ public class ArmorStandWrapper {
Method addEntityMethod = worldServerClass.getDeclaredMethod(Utils.getMajorVersion() == 8 ? "b" : "c", entityClass); Method addEntityMethod = worldServerClass.getDeclaredMethod(Utils.getMajorVersion() == 8 ? "b" : "c", entityClass);
addEntityMethod.setAccessible(true); addEntityMethod.setAccessible(true);
addEntityMethod.invoke(worldServerClass.cast(nmsWorld), entity); addEntityMethod.invoke(worldServerClass.cast(nmsWorld), entity);
entityClass.getMethod("die").invoke(entity);
} catch (ReflectiveOperationException e) { } catch (ReflectiveOperationException e) {
plugin.getLogger().severe("Could not remove hologram"); plugin.getLogger().severe("Could not remove hologram");
plugin.debug("Could not remove armor stand from entity lists"); plugin.debug("Could not remove armor stand from entity lists");