adding some mmoooo text
changed pig kit for baconbrawl
This commit is contained in:
parent
ed35d2a992
commit
59fce1cd88
@ -4,24 +4,20 @@ import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.block.BlockDamageEvent;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.disguise.disguises.DisguiseCow;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
@ -106,6 +102,21 @@ public class AprilFoolsManager extends MiniPlugin
|
||||
event.setMessage(out);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void updateText(UpdateEvent event)
|
||||
{
|
||||
if (!_enabled)
|
||||
return;
|
||||
|
||||
if (event.getType() != UpdateType.SLOW)
|
||||
return;
|
||||
|
||||
if (Math.random() <= 0.99)
|
||||
return;
|
||||
|
||||
UtilTextMiddle.display("Moo", null, 5, 20, 5);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void updateCow(UpdateEvent event)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
package nautilus.game.arcade.game.games.baconbrawl.kits;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Pig;
|
||||
@ -7,6 +8,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.disguise.disguises.DisguisePig;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
@ -15,6 +17,7 @@ import nautilus.game.arcade.kit.KitAvailability;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import nautilus.game.arcade.kit.perks.PerkBaconBlast;
|
||||
import nautilus.game.arcade.kit.perks.PerkSpeed;
|
||||
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityDestroy;
|
||||
|
||||
public class KitMamaPig extends Kit
|
||||
{
|
||||
@ -37,7 +40,7 @@ public class KitMamaPig extends Kit
|
||||
}
|
||||
|
||||
@Override
|
||||
public void GiveItems(Player player)
|
||||
public void GiveItems(final Player player)
|
||||
{
|
||||
player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE));
|
||||
|
||||
@ -48,12 +51,22 @@ public class KitMamaPig extends Kit
|
||||
Manager.GetDisguise().disguise(disguise);
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Pig pig = player.getWorld().spawn(player.getEyeLocation(), Pig.class);
|
||||
final Pig pig = player.getWorld().spawn(player.getEyeLocation(), Pig.class);
|
||||
pig.setBaby();
|
||||
pig.setAgeLock(true);
|
||||
pig.setCustomName(C.cYellow + player.getName());
|
||||
pig.setCustomNameVisible(true);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
player.setPassenger(pig);
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(Manager.getPlugin(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
UtilPlayer.sendPacket(player, new PacketPlayOutEntityDestroy(new int[] { pig.getEntityId() }));
|
||||
}
|
||||
}, 2);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user