From aa9195696793d5f956cc5947a5330a4001b9104c Mon Sep 17 00:00:00 2001 From: ulumulu1510 Date: Tue, 4 Jul 2017 22:38:26 +0200 Subject: [PATCH] Add TypeVariant (Parrot variants) from 1.12. --- .../massivecore/command/type/RegistryType.java | 10 ++++++++++ .../command/type/enumeration/TypeVariant.java | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/com/massivecraft/massivecore/command/type/enumeration/TypeVariant.java diff --git a/src/com/massivecraft/massivecore/command/type/RegistryType.java b/src/com/massivecraft/massivecore/command/type/RegistryType.java index 340069fc..8e145cc9 100644 --- a/src/com/massivecraft/massivecore/command/type/RegistryType.java +++ b/src/com/massivecraft/massivecore/command/type/RegistryType.java @@ -38,6 +38,7 @@ import com.massivecraft.massivecore.command.type.enumeration.TypeRabbitType; import com.massivecraft.massivecore.command.type.enumeration.TypeSkeletonType; import com.massivecraft.massivecore.command.type.enumeration.TypeSound; import com.massivecraft.massivecore.command.type.enumeration.TypeSpawnReason; +import com.massivecraft.massivecore.command.type.enumeration.TypeVariant; import com.massivecraft.massivecore.command.type.enumeration.TypeVillagerProfession; import com.massivecraft.massivecore.command.type.enumeration.TypeWorldType; import com.massivecraft.massivecore.command.type.primitive.TypeBooleanTrue; @@ -347,6 +348,15 @@ public class RegistryType } + try + { + register(TypeVariant.get()); + } + catch (Throwable t) + { + + } + register(TypeSkeletonType.get()); register(TypeSound.get()); register(TypeVillagerProfession.get()); diff --git a/src/com/massivecraft/massivecore/command/type/enumeration/TypeVariant.java b/src/com/massivecraft/massivecore/command/type/enumeration/TypeVariant.java new file mode 100644 index 00000000..d38d9aea --- /dev/null +++ b/src/com/massivecraft/massivecore/command/type/enumeration/TypeVariant.java @@ -0,0 +1,18 @@ +package com.massivecraft.massivecore.command.type.enumeration; + +import org.bukkit.entity.Parrot; + +public class TypeVariant extends TypeEnum +{ + // -------------------------------------------- // + // INSTANCE & CONSTRUCT + // -------------------------------------------- // + + private static TypeVariant i = new TypeVariant(); + public static TypeVariant get() { return i; } + public TypeVariant() + { + super(Parrot.Variant.class); + } + +}