diff --git a/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/AxolotlWatcher.java b/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/AxolotlWatcher.java index 19ec558d..9148d8a2 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/AxolotlWatcher.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/disguisetypes/watchers/AxolotlWatcher.java @@ -1,13 +1,20 @@ package me.libraryaddict.disguise.disguisetypes.watchers; +import me.libraryaddict.disguise.DisguiseConfig; import me.libraryaddict.disguise.disguisetypes.Disguise; import me.libraryaddict.disguise.disguisetypes.MetaIndex; +import me.libraryaddict.disguise.utilities.parser.RandomDefaultValue; +import me.libraryaddict.disguise.utilities.reflection.ReflectionManager; import me.libraryaddict.disguise.utilities.reflection.annotations.MethodDescription; import org.bukkit.entity.Axolotl; public class AxolotlWatcher extends AgeableWatcher { public AxolotlWatcher(Disguise disguise) { super(disguise); + + if (DisguiseConfig.isRandomDisguises()) { + setVariant(ReflectionManager.randomEnum(Axolotl.Variant.class)); + } } public boolean isPlayingDead() { @@ -23,6 +30,7 @@ public class AxolotlWatcher extends AgeableWatcher { return getData(MetaIndex.AXOLOTL_VARIANT); } + @RandomDefaultValue @MethodDescription("What variant of Axolotl is this?") public void setVariant(Axolotl.Variant variant) { sendData(MetaIndex.AXOLOTL_VARIANT, variant);