Merge remote-tracking branch 'refs/remotes/origin/develop' into update/uhc-moppletop
This commit is contained in:
commit
51c7801a9f
@ -9,16 +9,6 @@ import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import mineplex.core.common.DummyEntity;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.event.CustomTagEvent;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.packethandler.PacketHandler;
|
||||
import mineplex.core.packethandler.PacketVerifier;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher.WatchableObject;
|
||||
import net.minecraft.server.v1_8_R3.Entity;
|
||||
@ -42,10 +32,19 @@ import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.player.PlayerVelocityEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.common.DummyEntity;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.event.CustomTagEvent;
|
||||
import mineplex.core.packethandler.IPacketHandler;
|
||||
import mineplex.core.packethandler.PacketHandler;
|
||||
import mineplex.core.packethandler.PacketInfo;
|
||||
import mineplex.core.packethandler.PacketVerifier;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
{
|
||||
private Map<UUID, Map<Integer, Integer[]>> _entityMap = new HashMap<>();
|
||||
@ -524,9 +523,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
PacketPlayOutEntityMetadata entityMetadata = new PacketPlayOutEntityMetadata();
|
||||
entityMetadata.a = entityIds[0];
|
||||
entityMetadata.b = watcher.c();
|
||||
PacketPlayOutEntityMetadata entityMetadata = new PacketPlayOutEntityMetadata(entityIds[0], watcher, true);
|
||||
|
||||
packetList.bypassProcess(entityMetadata);
|
||||
}
|
||||
|
@ -1,5 +1,37 @@
|
||||
package mineplex.core.bonuses;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
import java.util.TimeZone;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreeper;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.impl.DSL;
|
||||
|
||||
import mineplex.core.MiniClientPlugin;
|
||||
import mineplex.core.account.CoreClient;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
@ -47,36 +79,6 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.youtube.YoutubeManager;
|
||||
import mineplex.database.Tables;
|
||||
import mineplex.serverdata.database.DBPool;
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreeper;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityDamageByEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.impl.DSL;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
import java.util.TimeZone;
|
||||
import java.util.UUID;
|
||||
|
||||
public class BonusManager extends MiniClientPlugin<BonusClientData> implements ILoginProcessor
|
||||
{
|
||||
@ -719,9 +721,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
watcher.a(0, (byte) 0, EntityCreeper.META_ENTITYDATA, (byte) 0);
|
||||
watcher.a(1, (short) 300, EntityCreeper.META_AIR, 0);
|
||||
watcher.a(17, (byte) 1, EntityCreeper.META_POWERED, true);
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata();
|
||||
packet.a = _carlNpc.getEntity().getEntityId();
|
||||
packet.b = watcher.c();
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(_carlNpc.getEntity().getEntityId(), watcher, true);
|
||||
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
@ -736,9 +736,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
|
||||
// Charged
|
||||
DataWatcher watcher = new DataWatcher(null);
|
||||
watcher.a(17, (byte) 0, EntityCreeper.META_POWERED, false);
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata();
|
||||
packet.a = _carlNpc.getEntity().getEntityId();
|
||||
packet.b = watcher.c();
|
||||
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(_carlNpc.getEntity().getEntityId(), watcher, true);
|
||||
|
||||
UtilPlayer.sendPacket(player, packet);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
|
||||
import org.bukkit.entity.Ageable;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Guardian;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
@ -164,6 +165,16 @@ public class MobCommand extends MultiCommandBase<Creature>
|
||||
argHandle.add(arg);
|
||||
}
|
||||
|
||||
else if (arg.equalsIgnoreCase("elder"))
|
||||
{
|
||||
for (Entity ent : entSet)
|
||||
if (ent instanceof Guardian)
|
||||
((Guardian)ent).setElder(true);
|
||||
|
||||
UtilPlayer.message(caller, F.desc("Elder", "True"));
|
||||
argHandle.add(arg);
|
||||
}
|
||||
|
||||
//Profession
|
||||
else if (arg.toLowerCase().charAt(0) == 'p')
|
||||
{
|
||||
|
@ -2,13 +2,13 @@ package mineplex.core.disguise.disguises;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityAgeable;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public abstract class DisguiseAgeable extends DisguiseCreature
|
||||
{
|
||||
public DisguiseAgeable(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseAgeable(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
|
||||
DataWatcher.a(12, new Byte((byte)0), EntityAgeable.META_BABY, false);
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ import org.bukkit.entity.EntityType;
|
||||
|
||||
public abstract class DisguiseAmbient extends DisguiseInsentient
|
||||
{
|
||||
public DisguiseAmbient(EntityType entityType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseAmbient(EntityType entityType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(entityType, entity);
|
||||
super(entityType, entity, clazz);
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public abstract class DisguiseAnimal extends DisguiseAgeable
|
||||
{
|
||||
public DisguiseAnimal(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseAnimal(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
}
|
||||
}
|
||||
|
@ -5,9 +5,9 @@ import org.bukkit.entity.EntityType;
|
||||
public class DisguiseAnimalBase extends DisguiseAnimal
|
||||
{
|
||||
|
||||
public DisguiseAnimalBase(EntityType entityType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseAnimalBase(EntityType entityType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(entityType, entity);
|
||||
super(entityType, entity, clazz);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class DisguiseArmorStand extends DisguiseInsentient
|
||||
{
|
||||
public DisguiseArmorStand(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.ARMOR_STAND, entity);
|
||||
super(EntityType.ARMOR_STAND, entity, EntityArmorStand.class);
|
||||
|
||||
DataWatcher.a(10, (byte) 0, EntityArmorStand.META_ARMOR_OPTION, (byte) 0);
|
||||
|
||||
|
@ -1,7 +1,13 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import mineplex.core.common.DummyEntity;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_8_R3.Entity;
|
||||
import net.minecraft.server.v1_8_R3.EntityPlayer;
|
||||
@ -12,18 +18,17 @@ import net.minecraft.server.v1_8_R3.Packet;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
|
||||
import net.minecraft.server.v1_8_R3.WorldServer;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftEntity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
|
||||
public abstract class DisguiseBase
|
||||
{
|
||||
private final Map<Class<? extends net.minecraft.server.v1_8_R3.Entity>,net.minecraft.server.v1_8_R3.Entity> dummyEntities = new HashMap<>();
|
||||
private WeakReference<Entity> _entity = new WeakReference<>(null);
|
||||
|
||||
protected DataWatcher DataWatcher;
|
||||
@ -37,7 +42,7 @@ public abstract class DisguiseBase
|
||||
*/
|
||||
private boolean _hideIfNotDisguised = false;
|
||||
|
||||
public DisguiseBase(EntityType entityType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseBase(EntityType entityType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> entityClazz)
|
||||
{
|
||||
if (entity == null)
|
||||
{
|
||||
@ -48,7 +53,18 @@ public abstract class DisguiseBase
|
||||
|
||||
setEntity(entity);
|
||||
|
||||
DataWatcher = new DataWatcher(new DummyEntity(null));
|
||||
DataWatcher = new DataWatcher(dummyEntities.computeIfAbsent(entityClazz, clazz ->
|
||||
{
|
||||
try
|
||||
{
|
||||
Constructor<? extends net.minecraft.server.v1_8_R3.Entity> constructor = clazz.getDeclaredConstructor(net.minecraft.server.v1_8_R3.World.class);
|
||||
return constructor.newInstance((net.minecraft.server.v1_8_R3.World)null);
|
||||
} catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
|
||||
DataWatcher.a(0, (byte) 0, net.minecraft.server.v1_8_R3.Entity.META_ENTITYDATA, (byte) 0);
|
||||
DataWatcher.a(1, (short) 300, net.minecraft.server.v1_8_R3.Entity.META_AIR, 300);
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseBat extends DisguiseCreature
|
||||
{
|
||||
public DisguiseBat(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.BAT, entity);
|
||||
super(EntityType.BAT, entity, EntityBat.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 0), EntityBat.META_UPSIDEDOWN, (byte) 0);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseBlaze extends DisguiseMonster
|
||||
{
|
||||
public DisguiseBlaze(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.BLAZE, entity);
|
||||
super(EntityType.BLAZE, entity, EntityBlaze.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 0), EntityBlaze.META_FIRE, (byte) 0);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package mineplex.core.disguise.disguises;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityFallingBlock;
|
||||
import net.minecraft.server.v1_8_R3.MathHelper;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntity;
|
||||
@ -16,7 +17,7 @@ public class DisguiseBlock extends DisguiseBase
|
||||
|
||||
public DisguiseBlock(org.bukkit.entity.Entity entity, int blockId, int blockData)
|
||||
{
|
||||
super(EntityType.FALLING_BLOCK, entity);
|
||||
super(EntityType.FALLING_BLOCK, entity, EntityFallingBlock.class);
|
||||
|
||||
_blockId = blockId;
|
||||
_blockData = blockData;
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseCat extends DisguiseTameableAnimal
|
||||
{
|
||||
public DisguiseCat(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.OCELOT, entity);
|
||||
super(EntityType.OCELOT, entity, EntityOcelot.class);
|
||||
|
||||
DataWatcher.a(18, Byte.valueOf((byte) 0), EntityOcelot.META_TYPE, 0);
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCaveSpider;
|
||||
import net.minecraft.server.v1_8_R3.EntitySpider;
|
||||
|
||||
public class DisguiseCaveSpider extends DisguiseMonster
|
||||
@ -9,7 +10,7 @@ public class DisguiseCaveSpider extends DisguiseMonster
|
||||
|
||||
public DisguiseCaveSpider(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.CAVE_SPIDER, entity);
|
||||
super(EntityType.CAVE_SPIDER, entity, EntityCaveSpider.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 0), EntitySpider.META_CLIMBING, (byte) 0);
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import net.minecraft.server.v1_8_R3.EntityChicken;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseChicken extends DisguiseAnimal
|
||||
{
|
||||
public DisguiseChicken(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.CHICKEN, entity);
|
||||
super(EntityType.CHICKEN, entity, EntityChicken.class);
|
||||
}
|
||||
|
||||
public String getHurtSound()
|
||||
|
@ -1,12 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import net.minecraft.server.v1_8_R3.EntityCow;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseCow extends DisguiseAnimal
|
||||
{
|
||||
public DisguiseCow(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.COW, entity);
|
||||
super(EntityType.COW, entity, EntityCow.class);
|
||||
}
|
||||
|
||||
public String getHurtSound()
|
||||
|
@ -3,13 +3,14 @@ package mineplex.core.disguise.disguises;
|
||||
import net.minecraft.server.v1_8_R3.MathHelper;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public abstract class DisguiseCreature extends DisguiseInsentient
|
||||
{
|
||||
public DisguiseCreature(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseCreature(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> entityClazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, entityClazz);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseCreeper extends DisguiseMonster
|
||||
{
|
||||
public DisguiseCreeper(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.CREEPER, entity);
|
||||
super(EntityType.CREEPER, entity, EntityCreeper.class);
|
||||
|
||||
DataWatcher.a(16, Byte.valueOf((byte) -1), EntityCreeper.META_FUSE_STATE, -1);
|
||||
DataWatcher.a(17, Byte.valueOf((byte) 0), EntityCreeper.META_POWERED, false);
|
||||
|
@ -19,7 +19,7 @@ public class DisguiseEnderman extends DisguiseMonster
|
||||
{
|
||||
public DisguiseEnderman(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.ENDERMAN, entity);
|
||||
super(EntityType.ENDERMAN, entity, EntityEnderman.class);
|
||||
|
||||
DataWatcher.a(16, new Short((short) 0), EntityEnderman.META_BLOCK, Optional.<IBlockData> absent());
|
||||
DataWatcher.a(17, new Byte((byte) 0), EntityEnderman.META_BLOCK, Optional.<IBlockData> absent());
|
||||
|
@ -1,11 +1,11 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public abstract class DisguiseGolem extends DisguiseCreature
|
||||
{
|
||||
public DisguiseGolem(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseGolem(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
}
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityGuardian;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseGuardian extends DisguiseCreature
|
||||
{
|
||||
public DisguiseGuardian(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.GUARDIAN, entity);
|
||||
super(EntityType.GUARDIAN, entity, EntityGuardian.class);
|
||||
DataWatcher.a(16, 0, EntityGuardian.META_ELDER, (byte) 0);
|
||||
DataWatcher.a(17, 0, EntityGuardian.META_TARGET, 0);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ public class DisguiseHorse extends DisguiseAnimal
|
||||
{
|
||||
public DisguiseHorse(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.HORSE, entity);
|
||||
super(EntityType.HORSE, entity, EntityHorse.class);
|
||||
|
||||
DataWatcher.a(16, Integer.valueOf(0), EntityHorse.META_HORSE_STATE, (byte) 0);
|
||||
DataWatcher.a(19, Byte.valueOf((byte) 0), EntityHorse.META_TYPE, 0);
|
||||
|
@ -3,11 +3,13 @@ package mineplex.core.disguise.disguises;
|
||||
import net.minecraft.server.v1_8_R3.EntityHuman;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import mineplex.core.common.DummyEntity;
|
||||
|
||||
public abstract class DisguiseHuman extends DisguiseLiving
|
||||
{
|
||||
public DisguiseHuman(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, DummyEntity.class);
|
||||
|
||||
byte skin = 0;
|
||||
skin |= (1 << 0); //Enable Cape
|
||||
|
@ -1,18 +1,19 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import mineplex.core.common.*;
|
||||
import net.minecraft.server.v1_8_R3.EntityInsentient;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
|
||||
public abstract class DisguiseInsentient extends DisguiseLiving
|
||||
{
|
||||
private boolean _showArmor;
|
||||
|
||||
public DisguiseInsentient(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseInsentient(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
|
||||
DataWatcher.a(3, Byte.valueOf((byte) 0), EntityInsentient.META_CUSTOMNAME_VISIBLE, false);
|
||||
DataWatcher.a(2, "", EntityInsentient.META_CUSTOMNAME, "");
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseIronGolem extends DisguiseGolem
|
||||
{
|
||||
public DisguiseIronGolem(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.IRON_GOLEM, entity);
|
||||
super(EntityType.IRON_GOLEM, entity, EntityIronGolem.class);
|
||||
|
||||
DataWatcher.a(16, Byte.valueOf((byte) 0), EntityIronGolem.META_PLAYER_CREATED, (byte) 0);
|
||||
}
|
||||
|
@ -3,24 +3,24 @@ package mineplex.core.disguise.disguises;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityLiving;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityEquipment;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityLiving;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityEquipment;
|
||||
|
||||
public abstract class DisguiseLiving extends DisguiseBase
|
||||
{
|
||||
private static Random _random = new Random();
|
||||
private boolean _invisible;
|
||||
private ItemStack[] _equipment = new ItemStack[5];
|
||||
|
||||
public DisguiseLiving(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseLiving(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
|
||||
DataWatcher.a(6, Float.valueOf(1.0F), EntityLiving.META_HEALTH, 1F);
|
||||
DataWatcher.a(7, Integer.valueOf(0), EntityLiving.META_POTION_COLOR, 0);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityMagmaCube;
|
||||
import net.minecraft.server.v1_8_R3.EntitySlime;
|
||||
import net.minecraft.server.v1_8_R3.MathHelper;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
@ -10,7 +11,7 @@ public class DisguiseMagmaCube extends DisguiseInsentient
|
||||
{
|
||||
public DisguiseMagmaCube(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.MAGMA_CUBE, entity);
|
||||
super(EntityType.MAGMA_CUBE, entity, EntityMagmaCube.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 1), EntitySlime.META_SIZE, 1);
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ import org.bukkit.entity.*;
|
||||
|
||||
public abstract class DisguiseMonster extends DisguiseCreature
|
||||
{
|
||||
public DisguiseMonster(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseMonster(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityMushroomCow;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
public class DisguiseMooshroom extends DisguiseAnimal
|
||||
{
|
||||
public DisguiseMooshroom(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.MUSHROOM_COW, entity);
|
||||
super(EntityType.MUSHROOM_COW, entity, EntityMushroomCow.class);
|
||||
}
|
||||
|
||||
public String getHurtSound()
|
||||
|
@ -1,12 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import net.minecraft.server.v1_8_R3.EntityPig;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguisePig extends DisguiseAnimal
|
||||
{
|
||||
public DisguisePig(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.PIG, entity);
|
||||
super(EntityType.PIG, entity, EntityPig.class);
|
||||
}
|
||||
|
||||
public String getHurtSound()
|
||||
|
@ -1,12 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityPigZombie;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
public class DisguisePigZombie extends DisguiseZombie
|
||||
{
|
||||
public DisguisePigZombie(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.PIG_ZOMBIE, entity);
|
||||
super(EntityType.PIG_ZOMBIE, entity, EntityPigZombie.class);
|
||||
}
|
||||
|
||||
protected String getHurtSound()
|
||||
|
@ -1,18 +1,18 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityRabbit;
|
||||
import net.minecraft.server.v1_8_R3.MathHelper;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseRabbit extends DisguiseAnimal
|
||||
{
|
||||
|
||||
public DisguiseRabbit(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.RABBIT, entity);
|
||||
super(EntityType.RABBIT, entity, EntityRabbit.class);
|
||||
|
||||
DataWatcher.a(18, Byte.valueOf((byte) 0), EntityRabbit.META_TYPE, 0);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ public class DisguiseSheep extends DisguiseAnimal
|
||||
{
|
||||
public DisguiseSheep(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.SHEEP, entity);
|
||||
super(EntityType.SHEEP, entity, EntitySheep.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 0), EntitySheep.META_WOOL_STATE, (byte) 0);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ public class DisguiseSkeleton extends DisguiseMonster
|
||||
{
|
||||
public DisguiseSkeleton(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.SKELETON, entity);
|
||||
super(EntityType.SKELETON, entity, EntitySkeleton.class);
|
||||
|
||||
DataWatcher.a(13, Byte.valueOf((byte) 0), EntitySkeleton.META_TYPE, 0);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ public class DisguiseSlime extends DisguiseInsentient
|
||||
{
|
||||
public DisguiseSlime(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.SLIME, entity);
|
||||
super(EntityType.SLIME, entity, EntitySlime.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 1), EntitySlime.META_SIZE, 1);
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import net.minecraft.server.v1_8_R3.EntitySnowman;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseSnowman extends DisguiseGolem
|
||||
{
|
||||
public DisguiseSnowman(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.SNOWMAN, entity);
|
||||
super(EntityType.SNOWMAN, entity, EntitySnowman.class);
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseSpider extends DisguiseMonster
|
||||
{
|
||||
public DisguiseSpider(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.SPIDER, entity);
|
||||
super(EntityType.SPIDER, entity, EntitySpider.class);
|
||||
|
||||
DataWatcher.a(16, new Byte((byte) 0), EntitySpider.META_CLIMBING, (byte) 0);
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import net.minecraft.server.v1_8_R3.EntitySquid;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseSquid extends DisguiseMonster
|
||||
{
|
||||
public DisguiseSquid(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.SQUID, entity);
|
||||
super(EntityType.SQUID, entity, EntitySquid.class);
|
||||
}
|
||||
|
||||
protected String getHurtSound()
|
||||
|
@ -10,9 +10,9 @@ import com.google.common.base.Optional;
|
||||
|
||||
public abstract class DisguiseTameableAnimal extends DisguiseAnimal
|
||||
{
|
||||
public DisguiseTameableAnimal(EntityType disguiseType, org.bukkit.entity.Entity entity)
|
||||
public DisguiseTameableAnimal(EntityType disguiseType, org.bukkit.entity.Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
|
||||
DataWatcher.a(16, Byte.valueOf((byte) 0), EntityTameableAnimal.META_SITTING_TAMED, (byte) 0);
|
||||
DataWatcher.a(17, "", EntityTameableAnimal.META_OWNER, Optional.<UUID> absent());
|
||||
|
@ -1,12 +1,15 @@
|
||||
package mineplex.core.disguise.disguises;
|
||||
|
||||
import org.bukkit.entity.*;
|
||||
import net.minecraft.server.v1_8_R3.EntityVillager;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
|
||||
public class DisguiseVillager extends DisguiseAgeable
|
||||
{
|
||||
public DisguiseVillager(Entity entity)
|
||||
{
|
||||
super(EntityType.VILLAGER, entity);
|
||||
super(EntityType.VILLAGER, entity, EntityVillager.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseWitch extends DisguiseMonster
|
||||
{
|
||||
public DisguiseWitch(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.WITCH, entity);
|
||||
super(EntityType.WITCH, entity, EntityWitch.class);
|
||||
|
||||
DataWatcher.a(21, Byte.valueOf((byte) 0), EntityWitch.META_AGGRESSIVE, false);
|
||||
}
|
||||
|
@ -3,15 +3,12 @@ package mineplex.core.disguise.disguises;
|
||||
import net.minecraft.server.v1_8_R3.EntityWither;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
|
||||
public class DisguiseWither extends DisguiseMonster
|
||||
{
|
||||
public DisguiseWither(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.WITHER, entity);
|
||||
super(EntityType.WITHER, entity, EntityWither.class);
|
||||
|
||||
DataWatcher.a(17, new Integer(0), EntityWither.META_INVUL_TIME, 0);
|
||||
DataWatcher.a(18, new Integer(0), EntityWither.META_TARGET_1, 0);
|
||||
|
@ -8,7 +8,7 @@ public class DisguiseWolf extends DisguiseTameableAnimal
|
||||
{
|
||||
public DisguiseWolf(org.bukkit.entity.Entity entity)
|
||||
{
|
||||
super(EntityType.WOLF, entity);
|
||||
super(EntityType.WOLF, entity, EntityWolf.class);
|
||||
|
||||
DataWatcher.a(18, new Float(20F), EntityWolf.META_WOLF_HEALTH, 20F);
|
||||
DataWatcher.a(19, new Byte((byte) 0), EntityWolf.META_BEGGING, false);
|
||||
|
@ -8,12 +8,12 @@ public class DisguiseZombie extends DisguiseMonster
|
||||
{
|
||||
public DisguiseZombie(Entity entity)
|
||||
{
|
||||
this(EntityType.ZOMBIE, entity);
|
||||
this(EntityType.ZOMBIE, entity, EntityZombie.class);
|
||||
}
|
||||
|
||||
public DisguiseZombie(EntityType disguiseType, Entity entity)
|
||||
public DisguiseZombie(EntityType disguiseType, Entity entity, Class<? extends net.minecraft.server.v1_8_R3.Entity> clazz)
|
||||
{
|
||||
super(disguiseType, entity);
|
||||
super(disguiseType, entity, clazz);
|
||||
|
||||
DataWatcher.a(12, Byte.valueOf((byte) 0), EntityZombie.META_CHILD, false);
|
||||
DataWatcher.a(13, Byte.valueOf((byte) 0), EntityZombie.META_VILLAGER, false);
|
||||
|
@ -3,16 +3,6 @@ package mineplex.core.gadget.gadgets.wineffect;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.common.util.particles.ColoredParticle;
|
||||
import mineplex.core.common.util.particles.DustSpellColor;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.particle.unrelated.BabyFireworkEffect;
|
||||
import mineplex.core.gadget.types.WinEffectGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -22,6 +12,26 @@ import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilShapes;
|
||||
import mineplex.core.common.util.UtilSkull;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.particles.ColoredParticle;
|
||||
import mineplex.core.common.util.particles.DustSpellColor;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.particle.unrelated.BabyFireworkEffect;
|
||||
import mineplex.core.gadget.types.WinEffectGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
public class WinEffectHalloween extends WinEffectGadget
|
||||
{
|
||||
|
||||
@ -119,10 +129,9 @@ public class WinEffectHalloween extends WinEffectGadget
|
||||
|
||||
private void spawnSkeleton()
|
||||
{
|
||||
Skeleton skeleton = getBaseLocation().getWorld().spawn(getBaseLocation(), Skeleton.class);
|
||||
Skeleton skeleton = UtilVariant.spawnWitherSkeleton(getBaseLocation());
|
||||
skeleton.setCustomName(getRank(_player) + _player.getName());
|
||||
skeleton.setCustomNameVisible(true);
|
||||
skeleton.setSkeletonType(Skeleton.SkeletonType.WITHER);
|
||||
skeleton.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
|
||||
UtilEnt.ghost(skeleton, true, false);
|
||||
UtilEnt.Vegetate(skeleton);
|
||||
|
@ -1,14 +1,12 @@
|
||||
package mineplex.core.hologram;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_8_R3.EntityArmorStand;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
@ -18,6 +16,14 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutEntityMetadata;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
|
||||
public class Hologram {
|
||||
|
||||
public enum HologramTarget {
|
||||
@ -481,12 +487,6 @@ public class Hologram {
|
||||
// Send update metadata packets
|
||||
Integer entityId = _entityIds.get(i);
|
||||
|
||||
PacketPlayOutEntityMetadata metadata1_8 = new PacketPlayOutEntityMetadata();
|
||||
PacketPlayOutEntityMetadata metadata1_9 = new PacketPlayOutEntityMetadata();
|
||||
|
||||
metadata1_8.a = entityId;
|
||||
metadata1_9.a = entityId;
|
||||
|
||||
DataWatcher watcher1_8 = new DataWatcher(null);
|
||||
DataWatcher watcher1_9 = new DataWatcher(null);
|
||||
|
||||
@ -504,11 +504,9 @@ public class Hologram {
|
||||
watcher1_9.a(10, (byte) 16, EntityArmorStand.META_ARMOR_OPTION, (byte) 16);
|
||||
}
|
||||
}
|
||||
metadata1_8.b = watcher1_8.c();
|
||||
metadata1_9.b = watcher1_9.c();
|
||||
|
||||
packets1_8.add(metadata1_8);
|
||||
packets1_9.add(metadata1_9);
|
||||
packets1_8.add(new PacketPlayOutEntityMetadata(entityId, watcher1_8, true));
|
||||
packets1_9.add(new PacketPlayOutEntityMetadata(entityId, watcher1_9, true));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
public class HorseMount extends Mount<SingleEntityMountData<Horse>>
|
||||
{
|
||||
@ -104,12 +105,11 @@ public class HorseMount extends Mount<SingleEntityMountData<Horse>>
|
||||
//Remove other mounts
|
||||
Manager.DeregisterAll(player);
|
||||
|
||||
Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
Horse horse = UtilVariant.spawnHorse(player.getLocation(), _variant);
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(_color);
|
||||
horse.setStyle(_style);
|
||||
horse.setVariant(_variant);
|
||||
horse.setOwner(player);
|
||||
horse.setMaxDomestication(1);
|
||||
horse.setJumpStrength(_jump);
|
||||
|
@ -28,6 +28,7 @@ import mineplex.core.mount.SingleEntityMountData;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
public class MountChicken extends HorseMount
|
||||
{
|
||||
@ -61,12 +62,11 @@ public class MountChicken extends HorseMount
|
||||
//Remove other mounts
|
||||
Manager.DeregisterAll(player);
|
||||
|
||||
Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
Horse horse = UtilVariant.spawnHorse(player.getLocation(), _variant);
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(_color);
|
||||
horse.setStyle(_style);
|
||||
horse.setVariant(_variant);
|
||||
horse.setOwner(player);
|
||||
horse.setMaxDomestication(1);
|
||||
horse.setJumpStrength(_jump);
|
||||
|
@ -35,6 +35,7 @@ import mineplex.core.mount.SingleEntityMountData;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
public class MountSpider extends HorseMount
|
||||
{
|
||||
@ -76,7 +77,7 @@ public class MountSpider extends HorseMount
|
||||
//Remove other mounts
|
||||
Manager.DeregisterAll(player);
|
||||
|
||||
Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
Horse horse = UtilVariant.spawnHorse(player.getLocation(), _variant);
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(_color);
|
||||
|
@ -0,0 +1,65 @@
|
||||
package mineplex.core.utils;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityGuardian;
|
||||
import net.minecraft.server.v1_8_R3.EntityHorse;
|
||||
import net.minecraft.server.v1_8_R3.EntitySkeleton;
|
||||
import net.minecraft.server.v1_8_R3.EntityZombie;
|
||||
import net.minecraft.server.v1_8_R3.World;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||
import org.bukkit.entity.Guardian;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
|
||||
public class UtilVariant
|
||||
{
|
||||
|
||||
public static Horse spawnHorse(Location location, Horse.Variant variant)
|
||||
{
|
||||
World world = ((CraftWorld) location.getWorld()).getHandle();
|
||||
|
||||
EntityHorse horse = new EntityHorse(world);
|
||||
horse.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
horse.setType(variant.ordinal());
|
||||
world.addEntity(horse, CreatureSpawnEvent.SpawnReason.CUSTOM);
|
||||
|
||||
return (Horse) horse.getBukkitEntity();
|
||||
}
|
||||
|
||||
public static Zombie spawnZombieVillager(Location location)
|
||||
{
|
||||
World world = ((CraftWorld) location.getWorld()).getHandle();
|
||||
|
||||
EntityZombie zombie = new EntityZombie(world);
|
||||
zombie.setVillager(true);
|
||||
world.addEntity(zombie, CreatureSpawnEvent.SpawnReason.CUSTOM);
|
||||
|
||||
return (Zombie) zombie.getBukkitEntity();
|
||||
}
|
||||
|
||||
public static Skeleton spawnWitherSkeleton(Location location)
|
||||
{
|
||||
World world = ((CraftWorld) location.getWorld()).getHandle();
|
||||
|
||||
EntitySkeleton skeleton = new EntitySkeleton(world);
|
||||
skeleton.setSkeletonType(1);
|
||||
world.addEntity(skeleton, CreatureSpawnEvent.SpawnReason.CUSTOM);
|
||||
|
||||
return (Skeleton) skeleton.getBukkitEntity();
|
||||
}
|
||||
|
||||
public static Guardian spawnElderGuardian(Location location)
|
||||
{
|
||||
World world = ((CraftWorld) location.getWorld()).getHandle();
|
||||
|
||||
EntityGuardian guardian = new EntityGuardian(world);
|
||||
guardian.setElder(true);
|
||||
world.addEntity(guardian, CreatureSpawnEvent.SpawnReason.CUSTOM);
|
||||
|
||||
return (Guardian) guardian.getBukkitEntity();
|
||||
|
||||
}
|
||||
}
|
@ -3,24 +3,25 @@ package mineplex.hub.modules;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.hub.HubManager;
|
||||
import mineplex.hub.commands.HorseSpawn;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Horse.Color;
|
||||
import org.bukkit.entity.Horse.Style;
|
||||
import org.bukkit.entity.Horse.Variant;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.hub.HubManager;
|
||||
import mineplex.hub.commands.HorseSpawn;
|
||||
|
||||
public class AdminMountManager extends MiniPlugin
|
||||
{
|
||||
private HubManager Manager;
|
||||
@ -291,12 +292,11 @@ public class AdminMountManager extends MiniPlugin
|
||||
Horse horse = _mounts.remove(caller);
|
||||
if (horse != null) horse.remove();
|
||||
|
||||
horse = caller.getWorld().spawn(caller.getLocation(), Horse.class);
|
||||
horse = UtilVariant.spawnHorse(caller.getLocation(), var);
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(Color.DARK_BROWN);
|
||||
horse.setStyle(Style.WHITE_DOTS);
|
||||
horse.setVariant(var);
|
||||
horse.setOwner(caller);
|
||||
horse.setMaxDomestication(1);
|
||||
horse.setJumpStrength(1);
|
||||
|
@ -20,7 +20,6 @@ import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Pig;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.Snowman;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@ -50,6 +49,7 @@ import mineplex.core.gadget.event.GadgetCollideEntityEvent;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.hub.HubManager;
|
||||
import mineplex.hub.HubType;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
@ -130,11 +130,14 @@ public class WorldManager extends MiniPlugin
|
||||
//Spawn
|
||||
if (Manager.Type == HubType.Halloween)
|
||||
{
|
||||
Skeleton ent = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
|
||||
final Skeleton ent;
|
||||
if (Math.random() > 0.5)
|
||||
{
|
||||
ent.setSkeletonType(SkeletonType.WITHER);
|
||||
ent = UtilVariant.spawnWitherSkeleton(loc);
|
||||
|
||||
} else
|
||||
{
|
||||
ent = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
}
|
||||
|
||||
ent.getEquipment().setHelmet(ItemStackFactory.Instance.CreateStack(Material.PUMPKIN));
|
||||
|
@ -2,13 +2,6 @@ package mineplex.minecraft.game.core.boss.snake;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import net.minecraft.server.v1_8_R3.DataWatcher;
|
||||
import net.minecraft.server.v1_8_R3.EntityArmorStand;
|
||||
import net.minecraft.server.v1_8_R3.Packet;
|
||||
@ -19,6 +12,14 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
|
||||
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityLiving;
|
||||
import net.minecraft.server.v1_8_R3.Vector3f;
|
||||
|
||||
import org.bukkit.craftbukkit.v1_8_R3.inventory.CraftItemStack;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
|
||||
public class SnakeSegment
|
||||
{
|
||||
private int _entityId = UtilEnt.getNewEntityId();
|
||||
@ -107,10 +108,7 @@ public class SnakeSegment
|
||||
watcher.a(15, new Vector3f(0, 0, 0), EntityArmorStand.META_LEFT_LEG_POSE, new Vector3f(0, 0, 0));
|
||||
watcher.a(16, new Vector3f(0, 0, 0), EntityArmorStand.META_RIGHT_LEG_POSE, new Vector3f(0, 0, 0));
|
||||
|
||||
PacketPlayOutEntityMetadata meta = new PacketPlayOutEntityMetadata();
|
||||
|
||||
meta.a = getId();
|
||||
meta.b = watcher.c();
|
||||
PacketPlayOutEntityMetadata meta = new PacketPlayOutEntityMetadata(getId(), watcher, true);
|
||||
|
||||
return new Packet[]
|
||||
{
|
||||
|
@ -1,5 +1,43 @@
|
||||
package nautilus.game.arcade.game.games.castlesiege;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Horse.Style;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
@ -18,6 +56,7 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
@ -38,44 +77,6 @@ import nautilus.game.arcade.stats.KingSlayerStatTracker;
|
||||
import nautilus.game.arcade.stats.TeamDeathsStatTracker;
|
||||
import nautilus.game.arcade.stats.TeamKillsStatTracker;
|
||||
import nautilus.game.arcade.stats.WinAsTeamStatTracker;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
import org.bukkit.entity.Horse;
|
||||
import org.bukkit.entity.Horse.Style;
|
||||
import org.bukkit.entity.Horse.Variant;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.entity.ProjectileHitEvent;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class CastleSiege extends TeamGame
|
||||
{
|
||||
@ -329,7 +330,6 @@ public class CastleSiege extends TeamGame
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(org.bukkit.entity.Horse.Color.BLACK);
|
||||
horse.setStyle(Style.BLACK_DOTS);
|
||||
horse.setVariant(Variant.HORSE);
|
||||
horse.setMaxDomestication(1);
|
||||
horse.getInventory().setSaddle(new ItemStack(Material.SADDLE));
|
||||
horse.getInventory().setArmor(new ItemStack(Material.IRON_BARDING));
|
||||
|
@ -2,30 +2,30 @@ package nautilus.game.arcade.game.games.christmas.content;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.TNTPrimed;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
import nautilus.game.arcade.game.games.christmas.parts.Part5;
|
||||
|
||||
public class PumpkinKing
|
||||
{
|
||||
private Part5 Host;
|
||||
@ -45,12 +45,11 @@ public class PumpkinKing
|
||||
_grid = grid;
|
||||
|
||||
Host.Host.CreatureAllowOverride = true;
|
||||
_ent = loc.getWorld().spawn(loc, Skeleton.class);
|
||||
_ent = UtilVariant.spawnWitherSkeleton(loc);
|
||||
Host.Host.CreatureAllowOverride = false;
|
||||
UtilEnt.Vegetate(_ent);
|
||||
UtilEnt.ghost(_ent, true, false);
|
||||
|
||||
_ent.setSkeletonType(SkeletonType.WITHER);
|
||||
_ent.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
|
||||
_ent.getEquipment().setItemInHand(new ItemStack(Material.TNT));
|
||||
|
||||
|
@ -23,6 +23,7 @@ import mineplex.core.hologram.Hologram;
|
||||
import mineplex.core.hologram.HologramManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.game.games.christmas.Christmas;
|
||||
import nautilus.game.arcade.game.games.christmas.ChristmasAudio;
|
||||
@ -180,14 +181,13 @@ public class Part4 extends Part
|
||||
Location loc = UtilAlg.Random(_mobSpawns);
|
||||
|
||||
Host.CreatureAllowOverride = true;
|
||||
Zombie ent = loc.getWorld().spawn(loc, Zombie.class);
|
||||
Zombie ent = UtilVariant.spawnZombieVillager(loc);
|
||||
Host.CreatureAllowOverride = false;
|
||||
|
||||
ent.getEquipment().setItemInHand(new ItemStack(Material.WOOD_PICKAXE));
|
||||
ent.getEquipment().setChestplate(new ItemStack(Material.LEATHER_CHESTPLATE));
|
||||
ent.getEquipment().setLeggings(new ItemStack(Material.LEATHER_LEGGINGS));
|
||||
ent.getEquipment().setBoots(new ItemStack(Material.LEATHER_BOOTS));
|
||||
ent.setVillager(true);
|
||||
|
||||
ent.setCustomName("Evil Elf " + UtilMath.randomElement(_evilElfNames));
|
||||
|
||||
|
@ -1,17 +1,8 @@
|
||||
package nautilus.game.arcade.game.games.minecraftleague.variation.wither.data;
|
||||
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.tracker.GrabSkullEvent;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.variation.wither.WitherVariation;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
@ -19,8 +10,10 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftSkeleton;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.Wither;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
@ -37,8 +30,31 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilItem;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTextMiddle;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.common.util.UtilTime.TimeUnit;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.tracker.GrabSkullEvent;
|
||||
import nautilus.game.arcade.game.games.minecraftleague.variation.wither.WitherVariation;
|
||||
|
||||
public class WitherMinionManager implements Listener
|
||||
{
|
||||
@ -105,9 +121,8 @@ public class WitherMinionManager implements Listener
|
||||
else
|
||||
chosen = _spawns.get(_lastUsed);
|
||||
_host.Host.CreatureAllowOverride = true;
|
||||
Entity e = _host.Manager.GetCreature().SpawnEntity(chosen, EntityType.SKELETON);
|
||||
_host.Host.CreatureAllowOverride = false;
|
||||
((Skeleton)e).setSkeletonType(SkeletonType.WITHER);
|
||||
Skeleton e = UtilVariant.spawnWitherSkeleton(chosen);
|
||||
_entity = (Skeleton)e;
|
||||
UtilEnt.ghost(e, true, false);
|
||||
UtilEnt.Vegetate(e);
|
||||
|
@ -14,6 +14,8 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.disguise.disguises.DisguiseHorse;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.games.smash.perks.PerkSmashStats;
|
||||
@ -110,9 +112,7 @@ public class KitSkeletalHorse extends SmashKit
|
||||
@Override
|
||||
public Entity SpawnEntity(Location loc)
|
||||
{
|
||||
Horse horse = (Horse) super.SpawnEntity(loc);
|
||||
|
||||
horse.setVariant(Variant.SKELETON_HORSE);
|
||||
Horse horse = UtilVariant.spawnHorse(loc, Variant.SKELETON_HORSE);
|
||||
|
||||
return horse;
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import org.bukkit.Sound;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
@ -29,7 +28,9 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
import nautilus.game.arcade.game.games.smash.perks.SmashPerk;
|
||||
|
||||
public class PerkWitherImage extends SmashPerk
|
||||
@ -91,10 +92,9 @@ public class PerkWitherImage extends SmashPerk
|
||||
|
||||
// Spawn
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Skeleton skel = player.getWorld().spawn(player.getEyeLocation().add(player.getLocation().getDirection()), Skeleton.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
skel.setSkeletonType(SkeletonType.WITHER);
|
||||
Skeleton skel = UtilVariant.spawnWitherSkeleton(player.getEyeLocation().add(player.getLocation().getDirection()));
|
||||
|
||||
skel.getEquipment().setItemInHand(player.getItemInHand());
|
||||
skel.setMaxHealth(20);
|
||||
|
@ -1,16 +1,8 @@
|
||||
package nautilus.game.arcade.kit.perks;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifier;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Entity;
|
||||
@ -25,8 +17,25 @@ import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifier;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
public class PerkHorsePet extends Perk
|
||||
{
|
||||
@ -53,39 +62,40 @@ public class PerkHorsePet extends Perk
|
||||
return;
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(Color.BROWN);
|
||||
horse.setStyle(Style.NONE);
|
||||
KitModifier kitModifier = getHorseType(player);
|
||||
final Horse.Variant variant;
|
||||
if (kitModifier != null)
|
||||
{
|
||||
switch (getHorseType(player))
|
||||
{
|
||||
case Survival_Games_Horseman_Mule:
|
||||
horse.setVariant(Variant.MULE);
|
||||
variant = Variant.MULE;
|
||||
break;
|
||||
case Survival_Games_Horseman_Skeleton_Horse:
|
||||
horse.setVariant(Variant.SKELETON_HORSE);
|
||||
variant = Variant.SKELETON_HORSE;
|
||||
break;
|
||||
case Survival_Games_Horseman_Zombie_Horse:
|
||||
horse.setVariant(Variant.UNDEAD_HORSE);
|
||||
variant = Variant.UNDEAD_HORSE;
|
||||
break;
|
||||
case Survival_Games_Horseman_Donkey:
|
||||
horse.setVariant(Variant.DONKEY);
|
||||
variant = Variant.DONKEY;
|
||||
break;
|
||||
default:
|
||||
horse.setVariant(Variant.HORSE);
|
||||
variant = Variant.HORSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
horse.setVariant(Variant.HORSE);
|
||||
variant = Variant.HORSE;
|
||||
}
|
||||
Horse horse = UtilVariant.spawnHorse(player.getLocation(), variant);
|
||||
horse.setAdult();
|
||||
horse.setAgeLock(true);
|
||||
horse.setColor(Color.BROWN);
|
||||
horse.setStyle(Style.NONE);
|
||||
horse.setOwner(player);
|
||||
horse.setMaxDomestication(1);
|
||||
horse.setJumpStrength(1);
|
||||
|
@ -1,18 +1,13 @@
|
||||
package nautilus.game.arcade.kit.perks;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.disguise.disguises.DisguiseZombie;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifier;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -30,10 +25,23 @@ import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.disguise.disguises.DisguiseZombie;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifier;
|
||||
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.utils.UtilVariant;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
public class PerkSkeletons extends Perk
|
||||
{
|
||||
@ -100,9 +108,47 @@ public class PerkSkeletons extends Perk
|
||||
Player killed = (Player) event.GetEvent().getEntity();
|
||||
|
||||
Manager.GetGame().CreatureAllowOverride = true;
|
||||
Skeleton skel = killer.getWorld().spawn(killed.getLocation(), Skeleton.class);
|
||||
Manager.GetGame().CreatureAllowOverride = false;
|
||||
|
||||
|
||||
KitModifier kitModifier = getSkeletonType(killer);
|
||||
final Skeleton.SkeletonType type;
|
||||
if (kitModifier != null)
|
||||
{
|
||||
switch (kitModifier)
|
||||
{
|
||||
case Survival_Games_Necromancer_Wither_Skeleton:
|
||||
type = Skeleton.SkeletonType.WITHER;
|
||||
break;
|
||||
case Survival_Games_Necromancer_Zombie:
|
||||
type = Skeleton.SkeletonType.NORMAL;
|
||||
break;
|
||||
default:
|
||||
type = Skeleton.SkeletonType.NORMAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
type = Skeleton.SkeletonType.NORMAL;
|
||||
}
|
||||
|
||||
final Skeleton skel;
|
||||
if (type == Skeleton.SkeletonType.NORMAL)
|
||||
{
|
||||
skel = killer.getWorld().spawn(killed.getLocation(), Skeleton.class);
|
||||
|
||||
} else
|
||||
{
|
||||
skel = UtilVariant.spawnWitherSkeleton(killed.getLocation());
|
||||
}
|
||||
|
||||
if (kitModifier != null && kitModifier == KitModifier.Survival_Games_Necromancer_Zombie)
|
||||
{
|
||||
DisguiseZombie disguiseZombie = new DisguiseZombie(skel);
|
||||
Manager.getCosmeticManager().getGadgetManager().getDisguiseManager().disguise(disguiseZombie);
|
||||
}
|
||||
|
||||
UtilEnt.removeGoalSelectors(skel);
|
||||
|
||||
skel.setMaxHealth(30);
|
||||
@ -126,29 +172,6 @@ public class PerkSkeletons extends Perk
|
||||
skel.getEquipment().setLeggingsDropChance(1f);
|
||||
skel.getEquipment().setBootsDropChance(1f);
|
||||
|
||||
KitModifier kitModifier = getSkeletonType(killer);
|
||||
if (kitModifier != null)
|
||||
{
|
||||
switch (kitModifier)
|
||||
{
|
||||
case Survival_Games_Necromancer_Wither_Skeleton:
|
||||
skel.setSkeletonType(Skeleton.SkeletonType.WITHER);
|
||||
break;
|
||||
case Survival_Games_Necromancer_Zombie:
|
||||
skel.setSkeletonType(Skeleton.SkeletonType.NORMAL);
|
||||
DisguiseZombie disguiseZombie = new DisguiseZombie(skel);
|
||||
Manager.getCosmeticManager().getGadgetManager().getDisguiseManager().disguise(disguiseZombie);
|
||||
break;
|
||||
default:
|
||||
skel.setSkeletonType(Skeleton.SkeletonType.NORMAL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skel.setSkeletonType(Skeleton.SkeletonType.NORMAL);
|
||||
}
|
||||
|
||||
if (_name)
|
||||
{
|
||||
skel.setCustomName("Skeletal " + UtilEnt.getName(event.GetEvent().getEntity()));
|
||||
|
@ -1,8 +1,43 @@
|
||||
package nautilus.game.arcade.kit.perks;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftWolf;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Wolf;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.disguise.disguises.DisguiseAnimalBase;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.SpigotUtil;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.disguise.disguises.DisguiseGuardian;
|
||||
import mineplex.core.disguise.disguises.DisguiseSquid;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
@ -12,28 +47,8 @@ import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
import net.minecraft.server.v1_8_R3.EntityCreature;
|
||||
import net.minecraft.server.v1_8_R3.NavigationAbstract;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftCreature;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftLivingEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftWolf;
|
||||
import org.bukkit.entity.*;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.entity.EntityTargetEvent;
|
||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
public class PerkWolfPet extends Perk
|
||||
{
|
||||
@ -382,8 +397,8 @@ public class PerkWolfPet extends Perk
|
||||
Manager.getCosmeticManager().getGadgetManager().getDisguiseManager().disguise(disguiseSquid);
|
||||
return;
|
||||
}
|
||||
DisguiseAnimalBase disguiseAnimal = new DisguiseAnimalBase(entityType, wolf);
|
||||
Manager.getCosmeticManager().getGadgetManager().getDisguiseManager().disguise(disguiseAnimal);
|
||||
/*DisguiseAnimalBase disguiseAnimal = new DisguiseAnimalBase(entityType, wolf); // TODO: what does this even do?
|
||||
Manager.getCosmeticManager().getGadgetManager().getDisguiseManager().disguise(disguiseAnimal);*/
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user