mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-07 19:18:01 +01:00
Randomize Axolotl variant
This commit is contained in:
parent
da4da54d3a
commit
746e1ddb62
@ -1,13 +1,20 @@
|
|||||||
package me.libraryaddict.disguise.disguisetypes.watchers;
|
package me.libraryaddict.disguise.disguisetypes.watchers;
|
||||||
|
|
||||||
|
import me.libraryaddict.disguise.DisguiseConfig;
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
import me.libraryaddict.disguise.disguisetypes.MetaIndex;
|
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 me.libraryaddict.disguise.utilities.reflection.annotations.MethodDescription;
|
||||||
import org.bukkit.entity.Axolotl;
|
import org.bukkit.entity.Axolotl;
|
||||||
|
|
||||||
public class AxolotlWatcher extends AgeableWatcher {
|
public class AxolotlWatcher extends AgeableWatcher {
|
||||||
public AxolotlWatcher(Disguise disguise) {
|
public AxolotlWatcher(Disguise disguise) {
|
||||||
super(disguise);
|
super(disguise);
|
||||||
|
|
||||||
|
if (DisguiseConfig.isRandomDisguises()) {
|
||||||
|
setVariant(ReflectionManager.randomEnum(Axolotl.Variant.class));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPlayingDead() {
|
public boolean isPlayingDead() {
|
||||||
@ -23,6 +30,7 @@ public class AxolotlWatcher extends AgeableWatcher {
|
|||||||
return getData(MetaIndex.AXOLOTL_VARIANT);
|
return getData(MetaIndex.AXOLOTL_VARIANT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RandomDefaultValue
|
||||||
@MethodDescription("What variant of Axolotl is this?")
|
@MethodDescription("What variant of Axolotl is this?")
|
||||||
public void setVariant(Axolotl.Variant variant) {
|
public void setVariant(Axolotl.Variant variant) {
|
||||||
sendData(MetaIndex.AXOLOTL_VARIANT, variant);
|
sendData(MetaIndex.AXOLOTL_VARIANT, variant);
|
||||||
|
Loading…
Reference in New Issue
Block a user