Public:
- Added Chicken Mount - Added Turkey Morph Internal: - Changed the Morph system (Using UtilMorph)
This commit is contained in:
parent
d4c5f1f5c9
commit
8ab61b2b06
@ -5,19 +5,20 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.mojang.authlib.minecraft.InsecureTextureException;
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import net.minecraft.server.v1_8_R3.MinecraftServer;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.minecraft.InsecureTextureException;
|
||||
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
|
||||
public class SkinData
|
||||
{
|
||||
@ -57,10 +58,10 @@ public class SkinData
|
||||
public final static SkinData UNCLE_SAM = new SkinData("eyJ0aW1lc3RhbXAiOjE0NjYxODA0NjY4NTcsInByb2ZpbGVJZCI6IjlmY2FlZDhiMTRiNTRmN2ZhNjRjYjYwNDBlNzA1MjcyIiwicHJvZmlsZU5hbWUiOiJMQ2FzdHIxIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9jYzM1YWRmZTQ3ODBjNmU2NTk4YTJlYzk2ZjdhZGQ5ZDc4NjljMjBlZjRmYjEyNjk2NmJhOGFlMDRlOWRhIn19fQ==", "NmJ+hXmvwQlYFYY7YVQWRr11yBbA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s28Qyw5XMzwvvowy9W/b5cYC0OzQ8+GR7tDZoWc28tGqGBM8cmDJIFQgZdceBIIr2lXeAvEJfLbyrus46hPjk8YTiQW2DsBq88BhKIy6Igb1rGqJ1goVERF07b6+/yMdLKCaT8OZFzKLXfo5rY5gr6HLnvsQiNL9aTrl74agXn1GUcP+QVNe7/c9lYmv5vLCBst1YiIPq27NZASZ++Fwyv6+PRlaFZZYtMHVd4UZeYPl7ak1Cdi/1sUcRpkBbJM8AHIrqq0iuXxrLbc6ldQ2cYQKHg9ljIpW/EZanuf6Wgm/LK1JnxXne9GUb/xPzB1EnZ95i8/u9WJa+NixEcfc3pAzDPYncIR8lishFwyBRta6BCG76U3UY2lQr3YD/48AJ49r7+WVU0gOP/h2SDSdAZHEdvkpVJ0w/xA+SevJ7Y7xA5EJ655YMQ0F8f3WUFTf1pFklE5E+fwkMVCWOPw7UMy558IcRSpdWAPPyf8sc7CpDqRk37/vXWRDa+7YBfgskK6B2eXowrzThUOBx+AmDTF3Rv8ZSr1Un0FWGi+GQ5ny7W9dJBMomzyMUbzz9stsCml5XB+6xLP2MD+9lO1bHipKS6qkhtZChE=");
|
||||
|
||||
// Comments this out for now, so it doesn't load the player profile
|
||||
// A better way to do this would check for the properties when getting the skull or the skin
|
||||
|
@ -1,6 +1,5 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
@ -24,18 +23,19 @@ import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.disguise.disguises.DisguiseBat;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
|
||||
public class MorphBat extends MorphGadget implements IThrown
|
||||
{
|
||||
@ -60,9 +60,6 @@ public class MorphBat extends MorphGadget implements IThrown
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseBat disguise = new DisguiseBat(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -70,7 +67,6 @@ public class MorphBat extends MorphGadget implements IThrown
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
|
||||
player.setAllowFlight(false);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -12,12 +11,13 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
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.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseBlaze;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
@ -43,9 +43,6 @@ public class MorphBlaze extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseBlaze disguise = new DisguiseBlaze(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -53,7 +50,6 @@ public class MorphBlaze extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -4,21 +4,12 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.currency.GlobalCurrency;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseRabbit;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@ -30,6 +21,30 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.core.common.currency.GlobalCurrency;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
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.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseRabbit;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class MorphBunny extends MorphGadget
|
||||
{
|
||||
private HashSet<Player> _jumpCharge = new HashSet<Player>();
|
||||
@ -56,9 +71,6 @@ public class MorphBunny extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseRabbit disguise = new DisguiseRabbit(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
|
||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 999999999, 1));
|
||||
@ -70,7 +82,6 @@ public class MorphBunny extends MorphGadget
|
||||
{
|
||||
_jumpCharge.remove(player);
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
|
||||
player.removePotionEffect(PotionEffectType.SPEED);
|
||||
|
@ -1,6 +1,5 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -19,14 +18,15 @@ import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilBlock;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseChicken;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
|
||||
public class MorphChicken extends MorphGadget
|
||||
{
|
||||
@ -49,9 +49,6 @@ public class MorphChicken extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseChicken disguise = new DisguiseChicken(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -59,7 +56,6 @@ public class MorphChicken extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
|
||||
player.setAllowFlight(false);
|
||||
|
@ -1,21 +1,21 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseCow;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
|
||||
public class MorphCow extends MorphGadget
|
||||
{
|
||||
@ -37,9 +37,6 @@ public class MorphCow extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseCow disguise = new DisguiseCow(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -47,7 +44,6 @@ public class MorphCow extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
@ -17,17 +16,18 @@ import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
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.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilParticle.ParticleType;
|
||||
import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseCreeper;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
|
||||
public class MorphCreeper extends MorphGadget
|
||||
{
|
||||
@ -51,9 +51,6 @@ public class MorphCreeper extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseCreeper disguise = new DisguiseCreeper(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -61,7 +58,6 @@ public class MorphCreeper extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -23,6 +22,7 @@ import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseEnderman;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -48,9 +48,6 @@ public class MorphEnderman extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseEnderman disguise = new DisguiseEnderman(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -58,7 +55,6 @@ public class MorphEnderman extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
|
||||
player.setAllowFlight(false);
|
||||
|
@ -5,16 +5,6 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetSelectLocationEvent;
|
||||
import mineplex.core.gadget.gadgets.particle.unrelated.MetalManEffect;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.utils.UtilGameProfile;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -22,6 +12,24 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetSelectLocationEvent;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.gadgets.particle.unrelated.MetalManEffect;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.utils.UtilGameProfile;
|
||||
|
||||
public class MorphMetalMan extends MorphGadget
|
||||
{
|
||||
|
||||
@ -45,7 +53,7 @@ public class MorphMetalMan extends MorphGadget
|
||||
|
||||
DisguisePlayer disguisePlayer = new DisguisePlayer(player, gameProfile);
|
||||
disguisePlayer.showInTabList(true, 0);
|
||||
Manager.getDisguiseManager().disguise(disguisePlayer);
|
||||
UtilMorph.disguise(player, disguisePlayer, Manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,7 +61,7 @@ public class MorphMetalMan extends MorphGadget
|
||||
{
|
||||
removeArmor(player);
|
||||
|
||||
Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -2,12 +2,14 @@ package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
@ -16,16 +18,17 @@ import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguisePig;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
|
||||
public class MorphPig extends MorphGadget
|
||||
{
|
||||
@ -50,9 +53,6 @@ public class MorphPig extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguisePig disguise = new DisguisePig(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -60,7 +60,6 @@ public class MorphPig extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
@ -12,6 +11,7 @@ import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseSkeleton;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.visibility.VisibilityManager;
|
||||
|
||||
@ -38,10 +38,7 @@ public class MorphPumpkinKing extends MorphGadget
|
||||
|
||||
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
|
||||
disguise.showArmor();
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
disguise.SetSkeletonType(SkeletonType.WITHER);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
|
||||
player.getInventory().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
|
||||
@ -54,7 +51,6 @@ public class MorphPumpkinKing extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
player.getInventory().setHelmet(null);
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.achievement.AchievementManager;
|
||||
@ -14,12 +13,13 @@ import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseSlime;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
|
||||
public class MorphSlime extends MorphGadget
|
||||
{
|
||||
@ -49,8 +49,6 @@ public class MorphSlime extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseSlime disguise = new DisguiseSlime(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
|
||||
int size = 1 + (_achievementManager.getMineplexLevelNumber(player, _clientManager.Get(player).GetRank())) / 8;
|
||||
|
||||
@ -61,8 +59,7 @@ public class MorphSlime extends MorphGadget
|
||||
size = 12;
|
||||
|
||||
disguise.SetSize(size);
|
||||
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -70,7 +67,6 @@ public class MorphSlime extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,6 @@ package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -28,6 +27,7 @@ import mineplex.core.common.util.UtilParticle.ViewDist;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseSnowman;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.recharge.RechargeData;
|
||||
@ -60,9 +60,6 @@ public class MorphSnowman extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseSnowman disguise = new DisguiseSnowman(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -70,7 +67,6 @@ public class MorphSnowman extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -1,19 +1,5 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.disguise.disguises.DisguiseSquid;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.PlayerToggleSwimEvent;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.SwimManager;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.gadget.types.OutfitGadget;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@ -26,6 +12,26 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseSquid;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.PlayerToggleSwimEvent;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.SwimManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.gadget.types.OutfitGadget;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class MorphSquid extends MorphGadget implements IThrown
|
||||
{
|
||||
|
||||
@ -45,9 +51,6 @@ public class MorphSquid extends MorphGadget implements IThrown
|
||||
{
|
||||
applyArmor(player, message);
|
||||
DisguiseSquid disguiseSquid = new DisguiseSquid(player);
|
||||
//disguiseSquid.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
//disguiseSquid.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguiseSquid);
|
||||
UtilMorph.disguise(player, disguiseSquid, Manager);
|
||||
onToggleSwim(new PlayerToggleSwimEvent(player, SwimManager.isSwimming(player.getUniqueId())));
|
||||
}
|
||||
@ -56,7 +59,6 @@ public class MorphSquid extends MorphGadget implements IThrown
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,6 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
@ -25,17 +24,18 @@ import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilParticle;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
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.UtilServer;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseGuardian;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetSelectLocationEvent;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.recharge.RechargedEvent;
|
||||
@ -64,10 +64,7 @@ public class MorphTitan extends MorphGadget
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseGuardian disguise = new DisguiseGuardian(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
disguise.setElder(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -75,7 +72,6 @@ public class MorphTitan extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
|
||||
player.setAllowFlight(false);
|
||||
|
@ -0,0 +1,63 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerToggleSneakEvent;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.utils.UtilGameProfile;
|
||||
|
||||
public class MorphTurkey extends MorphGadget
|
||||
{
|
||||
|
||||
public MorphTurkey(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Turkey Morph", UtilText.splitLinesToArray(new String[]{"Placeholder"},
|
||||
LineFormat.LORE), 0, Material.GLASS, (byte) 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableCustom(Player player, boolean message)
|
||||
{
|
||||
applyArmor(player, message);
|
||||
|
||||
GameProfile profile = UtilGameProfile.getGameProfile(player);
|
||||
profile.getProperties().clear();
|
||||
profile.getProperties().put("textures", SkinData.TURKEY.getProperty());
|
||||
|
||||
DisguisePlayer disguisePlayer = new DisguisePlayer(player, profile);
|
||||
disguisePlayer.showInTabList(true, 0);
|
||||
UtilMorph.disguise(player, disguisePlayer, Manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
removeArmor(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onSneak(PlayerToggleSneakEvent event)
|
||||
{
|
||||
if (!isActive(event.getPlayer()))
|
||||
return;
|
||||
|
||||
if (!event.isSneaking())
|
||||
return;
|
||||
|
||||
Player player = event.getPlayer();
|
||||
player.getWorld().playSound(player.getLocation(), Sound.CHICKEN_IDLE, 1f, 1.25f);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,13 @@
|
||||
package mineplex.core.gadget.gadgets.morph;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import mineplex.core.common.skin.SkinData;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
@ -9,24 +16,13 @@ import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguisePlayer;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.utils.UtilGameProfile;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
public class MorphUncleSam extends MorphGadget
|
||||
{
|
||||
private Map<UUID, DisguisePlayer> _disguises = new HashMap<>();
|
||||
|
||||
public MorphUncleSam(GadgetManager manager)
|
||||
{
|
||||
@ -53,9 +49,7 @@ public class MorphUncleSam extends MorphGadget
|
||||
|
||||
DisguisePlayer disguisePlayer = new DisguisePlayer(player, profile);
|
||||
disguisePlayer.showInTabList(true, 0);
|
||||
Manager.getDisguiseManager().disguise(disguisePlayer);
|
||||
|
||||
this._disguises.put(player.getUniqueId(), disguisePlayer);
|
||||
UtilMorph.disguise(player, disguisePlayer, Manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -63,7 +57,7 @@ public class MorphUncleSam extends MorphGadget
|
||||
{
|
||||
this.removeArmor(player);
|
||||
|
||||
Manager.getDisguiseManager().undisguise(this._disguises.remove(player.getUniqueId()));
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@ -84,9 +78,4 @@ public class MorphUncleSam extends MorphGadget
|
||||
UtilFirework.playFreedomFirework(player.getLocation().clone().add(0, 2, 0));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void quit(PlayerQuitEvent event)
|
||||
{
|
||||
this._disguises.remove(event.getPlayer().getUniqueId());
|
||||
}
|
||||
}
|
||||
|
@ -3,18 +3,6 @@ package mineplex.core.gadget.gadgets.morph;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.currency.GlobalCurrency;
|
||||
import mineplex.core.common.util.*;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.disguise.disguises.DisguiseVillager;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Material;
|
||||
@ -28,6 +16,26 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.common.currency.GlobalCurrency;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseVillager;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.projectile.IThrown;
|
||||
import mineplex.core.projectile.ProjectileUser;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class MorphVillager extends MorphGadget implements IThrown
|
||||
{
|
||||
private HashSet<Item> _gems = new HashSet<Item>();
|
||||
@ -52,9 +60,6 @@ public class MorphVillager extends MorphGadget implements IThrown
|
||||
this.applyArmor(player, message);
|
||||
|
||||
DisguiseVillager disguise = new DisguiseVillager(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager);
|
||||
}
|
||||
|
||||
@ -62,7 +67,6 @@ public class MorphVillager extends MorphGadget implements IThrown
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@ import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseWitch;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.event.GadgetSelectLocationEvent;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
@ -35,9 +36,7 @@ public class MorphWitch extends MorphGadget
|
||||
{
|
||||
this.applyArmor(player, message);
|
||||
DisguiseWitch disguiseWitch = new DisguiseWitch(player);
|
||||
disguiseWitch.setName(player.getName(), Manager.getClientManager().Get(player).GetRank());
|
||||
disguiseWitch.setCustomNameVisible(true);
|
||||
Manager.getDisguiseManager().disguise(disguiseWitch);
|
||||
UtilMorph.disguise(player, disguiseWitch, Manager);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,7 +48,7 @@ public class MorphWitch extends MorphGadget
|
||||
{
|
||||
witchEffectManager.stop();
|
||||
}
|
||||
Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
}
|
||||
|
||||
public ItemStack getWitchItem()
|
||||
|
@ -4,31 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
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.UtilServer;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.inventory.ClientItem;
|
||||
import mineplex.core.inventory.data.Item;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -40,6 +15,31 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilEvent;
|
||||
import mineplex.core.common.util.UtilEvent.ActionType;
|
||||
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.UtilServer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseWither;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
|
||||
import mineplex.core.gadget.types.MorphGadget;
|
||||
import mineplex.core.inventory.ClientItem;
|
||||
import mineplex.core.inventory.data.Item;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class MorphWither extends MorphGadget
|
||||
{
|
||||
private ArrayList<WitherSkull> _skulls = new ArrayList<WitherSkull>();
|
||||
@ -65,9 +65,6 @@ public class MorphWither extends MorphGadget
|
||||
player.setHealth(300);
|
||||
|
||||
DisguiseWither disguise = new DisguiseWither(player);
|
||||
//disguise.setName(player.getName(), Manager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
//disguise.setCustomNameVisible(true);
|
||||
//Manager.getDisguiseManager().disguise(disguise);
|
||||
UtilMorph.disguise(player, disguise, Manager, true);
|
||||
|
||||
player.setMaxHealth(20);
|
||||
@ -78,7 +75,6 @@ public class MorphWither extends MorphGadget
|
||||
public void disableCustom(Player player, boolean message)
|
||||
{
|
||||
this.removeArmor(player);
|
||||
//Manager.getDisguiseManager().undisguise(player);
|
||||
UtilMorph.undisguise(player, Manager.getDisguiseManager());
|
||||
|
||||
player.setAllowFlight(false);
|
||||
|
@ -4,11 +4,12 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.disguise.disguises.DisguiseBase;
|
||||
import mineplex.core.disguise.disguises.DisguiseInsentient;
|
||||
import mineplex.core.gadget.GadgetManager;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class UtilMorph
|
||||
{
|
||||
@ -17,38 +18,54 @@ public class UtilMorph
|
||||
* UtilMorph helps disguising and undisguising players, avoiding the use of deprecated methods
|
||||
*/
|
||||
|
||||
private static Map<UUID, DisguiseInsentient> _disguises = new HashMap<>();
|
||||
private static Map<UUID, DisguiseBase> _disguises = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Disguises a player with custom name
|
||||
* @param player The player that will be disguised
|
||||
* @param disguiseInsentient The disguise that will be applied
|
||||
* @param disguiseBase The disguise that will be applied
|
||||
* @param gadgetManager The gadget manager
|
||||
*/
|
||||
public static void disguise(Player player, DisguiseInsentient disguiseInsentient, GadgetManager gadgetManager)
|
||||
public static void disguise(Player player, DisguiseBase disguiseBase, GadgetManager gadgetManager)
|
||||
{
|
||||
_disguises.put(player.getUniqueId(), disguiseInsentient);
|
||||
disguiseInsentient.setName(player.getName(), gadgetManager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
disguiseInsentient.setCustomNameVisible(true);
|
||||
gadgetManager.getDisguiseManager().disguise(disguiseInsentient);
|
||||
_disguises.put(player.getUniqueId(), disguiseBase);
|
||||
if (disguiseBase instanceof DisguiseInsentient)
|
||||
{
|
||||
DisguiseInsentient disguiseInsentient = (DisguiseInsentient) disguiseBase;
|
||||
disguiseInsentient.setName(player.getName(), gadgetManager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
disguiseInsentient.setCustomNameVisible(true);
|
||||
gadgetManager.getDisguiseManager().disguise(disguiseInsentient);
|
||||
}
|
||||
else
|
||||
{
|
||||
gadgetManager.getDisguiseManager().disguise(disguiseBase);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disguises a player with custom name (special case for the Wither Morph)
|
||||
* @param player The player that will be disguised
|
||||
* @param disguiseInsentient The disguise that will be applied
|
||||
* @param disguiseBase The disguise that will be applied
|
||||
* @param gadgetManager The gadget manager
|
||||
* @param wither
|
||||
*/
|
||||
public static void disguise(Player player, DisguiseInsentient disguiseInsentient, GadgetManager gadgetManager, boolean wither)
|
||||
public static void disguise(Player player, DisguiseBase disguiseBase, GadgetManager gadgetManager, boolean wither)
|
||||
{
|
||||
_disguises.put(player.getUniqueId(), disguiseInsentient);
|
||||
disguiseInsentient.setName(player.getName(), gadgetManager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
if (!wither)
|
||||
_disguises.put(player.getUniqueId(), disguiseBase);
|
||||
if (disguiseBase instanceof DisguiseInsentient)
|
||||
{
|
||||
disguiseInsentient.setCustomNameVisible(true);
|
||||
DisguiseInsentient disguiseInsentient = (DisguiseInsentient) disguiseBase;
|
||||
disguiseInsentient.setName(player.getName(), gadgetManager.getClientManager().Get(player).getRealOrDisguisedRank());
|
||||
if (!wither)
|
||||
{
|
||||
disguiseInsentient.setCustomNameVisible(true);
|
||||
}
|
||||
gadgetManager.getDisguiseManager().disguise(disguiseInsentient);
|
||||
}
|
||||
else
|
||||
{
|
||||
gadgetManager.getDisguiseManager().disguise(disguiseBase);
|
||||
}
|
||||
gadgetManager.getDisguiseManager().disguise(disguiseInsentient);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,84 @@
|
||||
package mineplex.core.mount.types;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Chicken;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.LineFormat;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilText;
|
||||
import mineplex.core.mount.Mount;
|
||||
import mineplex.core.mount.MountManager;
|
||||
import mineplex.core.mount.SingleEntityMountData;
|
||||
|
||||
public class MountChicken extends Mount<SingleEntityMountData<Chicken>>
|
||||
{
|
||||
|
||||
public MountChicken(MountManager manager)
|
||||
{
|
||||
super(manager, "Chicken Mount", Material.SLIME_BALL, (byte)0,
|
||||
UtilText.splitLineToArray(C.cGray + "Placeholder", LineFormat.LORE),
|
||||
15000);
|
||||
|
||||
KnownPackage = false;
|
||||
}
|
||||
|
||||
public void enableCustom(Player player)
|
||||
{
|
||||
player.leaveVehicle();
|
||||
player.eject();
|
||||
|
||||
//Remove other mounts
|
||||
Manager.DeregisterAll(player);
|
||||
|
||||
SingleEntityMountData<Chicken> mount = new SingleEntityMountData<>(player, player.getWorld().spawn(player.getLocation(), Chicken.class));
|
||||
mount.getEntity().setBaby();
|
||||
|
||||
mount.getEntity().setCustomName(player.getName() + "'s " + getName());
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Mount", "You spawned " + F.elem(getName()) + "."));
|
||||
|
||||
//Store
|
||||
_active.put(player, mount);
|
||||
}
|
||||
|
||||
public void disable(Player player)
|
||||
{
|
||||
SingleEntityMountData<Chicken> mount = _active.remove(player);
|
||||
if (mount != null)
|
||||
{
|
||||
mount.remove();
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, F.main("Mount", "You despawned " + F.elem(getName()) + "."));
|
||||
|
||||
Manager.removeActive(player);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void interactMount(PlayerInteractEntityEvent event)
|
||||
{
|
||||
if (event.getRightClicked() == null)
|
||||
return;
|
||||
|
||||
SingleEntityMountData<Chicken> data = getActive().get(event.getPlayer());
|
||||
|
||||
if(data == null) return;
|
||||
|
||||
if(!data.ownsMount(event.getPlayer())) return;
|
||||
|
||||
if(!data.isPartOfMount(event.getRightClicked())) return;
|
||||
|
||||
event.getPlayer().leaveVehicle();
|
||||
event.getPlayer().eject();
|
||||
|
||||
event.getRightClicked().setPassenger(event.getPlayer());
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user