mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-26 04:35:50 +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 java.lang.invoke.MethodHandle;
|
||||||
|
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.ChestedHorse;
|
||||||
import org.bukkit.entity.Horse;
|
import org.bukkit.entity.Horse;
|
||||||
import org.bukkit.entity.Horse.Color;
|
import org.bukkit.entity.Horse.Color;
|
||||||
import org.bukkit.entity.Horse.Style;
|
import org.bukkit.entity.Horse.Style;
|
||||||
@ -113,9 +113,7 @@ public class HorseModifiers extends Trait {
|
|||||||
}
|
}
|
||||||
if (CARRYING_CHEST_METHOD == null)
|
if (CARRYING_CHEST_METHOD == null)
|
||||||
return;
|
return;
|
||||||
EntityType type = npc.getEntity().getType();
|
if (npc.getEntity() instanceof ChestedHorse) {
|
||||||
if (type.name().equals("LLAMA") || type.name().equals("TRADER_LLAMA") || type.name().equals("DONKEY")
|
|
||||||
|| type.name().equals("MULE")) {
|
|
||||||
try {
|
try {
|
||||||
CARRYING_CHEST_METHOD.invoke(npc.getEntity(), carryingChest);
|
CARRYING_CHEST_METHOD.invoke(npc.getEntity(), carryingChest);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
@ -240,7 +240,7 @@ public class Util {
|
|||||||
public static boolean isHorse(EntityType type) {
|
public static boolean isHorse(EntityType type) {
|
||||||
String name = type.name();
|
String name = type.name();
|
||||||
return type == EntityType.HORSE || name.contains("_HORSE") || name.equals("DONKEY") || name.equals("MULE")
|
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) {
|
public static boolean isLoaded(Location location) {
|
||||||
|
Loading…
Reference in New Issue
Block a user