mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-26 11:07:59 +01:00
Add camel to horse types
This commit is contained in:
parent
b4b54dabdc
commit
5254f65945
@ -2,7 +2,7 @@ package net.citizensnpcs.trait;
|
||||
|
||||
import java.lang.invoke.MethodHandle;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.ChestedHorse;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Horse.Color;
|
||||
import org.bukkit.entity.Horse.Style;
|
||||
@ -113,9 +113,7 @@ public class HorseModifiers extends Trait {
|
||||
}
|
||||
if (CARRYING_CHEST_METHOD == null)
|
||||
return;
|
||||
EntityType type = npc.getEntity().getType();
|
||||
if (type.name().equals("LLAMA") || type.name().equals("TRADER_LLAMA") || type.name().equals("DONKEY")
|
||||
|| type.name().equals("MULE")) {
|
||||
if (npc.getEntity() instanceof ChestedHorse) {
|
||||
try {
|
||||
CARRYING_CHEST_METHOD.invoke(npc.getEntity(), carryingChest);
|
||||
} catch (Throwable e) {
|
||||
|
@ -240,7 +240,7 @@ public class Util {
|
||||
public static boolean isHorse(EntityType type) {
|
||||
String name = type.name();
|
||||
return type == EntityType.HORSE || name.contains("_HORSE") || name.equals("DONKEY") || name.equals("MULE")
|
||||
|| name.equals("LLAMA") || name.equals("TRADER_LLAMA");
|
||||
|| name.equals("LLAMA") || name.equals("TRADER_LLAMA") || name.equals("CAMEL");
|
||||
}
|
||||
|
||||
public static boolean isLoaded(Location location) {
|
||||
|
Loading…
Reference in New Issue
Block a user