Color wolf collars based on team
This commit is contained in:
parent
428713d56c
commit
cc3ed60adc
@ -37,6 +37,7 @@ import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.events.PlayerStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
@ -99,12 +100,19 @@ public class PerkWolfPet extends Perk
|
||||
Wolf wolf = cur.getWorld().spawn(cur.getLocation(), Wolf.class);
|
||||
SpigotUtil.setOldOwner_RemoveMeWhenSpigotFixesThis(wolf, cur);
|
||||
wolf.setOwner(cur);
|
||||
wolf.setCollarColor(DyeColor.GREEN);
|
||||
wolf.playEffect(EntityEffect.WOLF_HEARTS);
|
||||
wolf.setAngry(true);
|
||||
wolf.setMaxHealth(14);
|
||||
wolf.setHealth(wolf.getMaxHealth());
|
||||
|
||||
GameTeam team = Manager.GetGame().GetTeam(cur);
|
||||
|
||||
if (team != null) {
|
||||
wolf.setCollarColor(DyeColor.getByColor(team.GetColorBase()));
|
||||
} else {
|
||||
wolf.setCollarColor(DyeColor.GREEN);
|
||||
}
|
||||
|
||||
if (_baby)
|
||||
wolf.setBaby();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user