mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-28 03:57:35 +01:00
Check for ID mapping null
This commit is contained in:
parent
fbbfd8ef6a
commit
e91261355d
@ -118,10 +118,6 @@ public class NMS {
|
||||
}
|
||||
}
|
||||
|
||||
public static void openHorseScreen(Horse horse, Player equipper) {
|
||||
((EntityHorse) getHandle(horse)).f((EntityHuman) NMS.getHandle(equipper));
|
||||
}
|
||||
|
||||
private static Constructor<?> getCustomEntityConstructor(Class<?> clazz, EntityType type) throws SecurityException,
|
||||
NoSuchMethodException {
|
||||
Constructor<?> constructor = ENTITY_CONSTRUCTOR_CACHE.get(clazz);
|
||||
@ -215,8 +211,12 @@ public class NMS {
|
||||
NMS.getHandle(passenger).mount(NMS.getHandle(entity));
|
||||
}
|
||||
|
||||
public static void openHorseScreen(Horse horse, Player equipper) {
|
||||
((EntityHorse) getHandle(horse)).f((EntityHuman) NMS.getHandle(equipper));
|
||||
}
|
||||
|
||||
public static void registerEntityClass(Class<?> clazz) {
|
||||
if (ENTITY_CLASS_TO_INT.containsKey(clazz))
|
||||
if (ENTITY_CLASS_TO_INT == null || ENTITY_CLASS_TO_INT.containsKey(clazz))
|
||||
return;
|
||||
Class<?> search = clazz;
|
||||
while ((search = search.getSuperclass()) != null && Entity.class.isAssignableFrom(search)) {
|
||||
|
Loading…
Reference in New Issue
Block a user