mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-06 19:09:27 +01:00
Randomize Axolotl variant
This commit is contained in:
parent
da4da54d3a
commit
746e1ddb62
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user