Reverted rename

This commit is contained in:
LCastr0 2017-03-31 01:07:00 -03:00
parent e8d6c321cd
commit 911d5d20d2
121 changed files with 380 additions and 387 deletions

View File

@ -13,8 +13,8 @@ public class GemFountainSalesPackage extends SalesPackageBase
{
super("Add " + gems + " Gems", Material.EMERALD, (byte) 0, new String[] {}, gems, 1);
_currencyCostMap.put(GlobalCurrency.GEM, gems);
_knownPackage = false;
_oneTimePurchaseOnly = false;
CurrencyCostMap.put(GlobalCurrency.GEM, gems);
KnownPackage = false;
OneTimePurchaseOnly = false;
}
}

View File

@ -1,8 +1,7 @@
package mineplex.core.gadget.gadgets;
import org.bukkit.Material;
import mineplex.core.shop.item.SalesPackageBase;
import org.bukkit.Material;
public class Ammo extends SalesPackageBase
{
@ -10,9 +9,8 @@ public class Ammo extends SalesPackageBase
{
super(name, material, displayData, description, coins, quantity);
_displayName = displayName;
_knownPackage = false;
_oneTimePurchaseOnly = false;
_free = coins == -5;
DisplayName = displayName;
KnownPackage = false;
OneTimePurchaseOnly = false;
}
}

View File

@ -58,7 +58,7 @@ public class ArrowTrailFreedom extends ArrowEffectGadget
@Override
public void doHitEffect(Arrow arrow)
{
BabyFireworkEffect babyFireworkEffect = new BabyFireworkEffect(arrow.getLocation(), _manager.getPlugin(), _color);
BabyFireworkEffect babyFireworkEffect = new BabyFireworkEffect(arrow.getLocation(), Manager.getPlugin(), _color);
babyFireworkEffect.start();
}

View File

@ -43,9 +43,9 @@ public class ArrowTrailTitan extends ArrowEffectGadget
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}
}

View File

@ -32,9 +32,9 @@ public class DeathTitan extends DeathEffectGadget
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}

View File

@ -37,9 +37,9 @@ public class DoubleJumpTitan extends DoubleJumpEffectGadget
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}
}

View File

@ -39,7 +39,7 @@ public class KitGameModifier extends GameModifierGadget
@Override
public void enableCustom(Player player, boolean message)
{
_manager.getGameModifiers(getGameType()).stream().filter(getKitFilter(_kitType)).forEach(g -> g.disable(player));
Manager.getGameModifiers(getGameType()).stream().filter(getKitFilter(_kitType)).forEach(g -> g.disable(player));
super.enableCustom(player, message);
}

View File

@ -86,7 +86,7 @@ public class GameModifierMineStrikeSkin extends GameModifierGadget
@Override
public void enableCustom(Player player, boolean message)
{
_manager.getGameModifiers(getGameType()).stream().filter(getWeaponFilter(_weapon)).forEach(g -> g.disable(player));
Manager.getGameModifiers(getGameType()).stream().filter(getWeaponFilter(_weapon)).forEach(g -> g.disable(player));
super.enableCustom(player, message);
}

View File

@ -1,16 +1,5 @@
package mineplex.core.gadget.gadgets.item;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.util.Vector;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.LineFormat;
@ -31,6 +20,16 @@ import mineplex.core.preferences.Preference;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Bat;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.util.Vector;
import java.util.ArrayList;
import java.util.HashMap;
public class ItemBatGun extends ItemGadget
{
@ -103,7 +102,7 @@ public class ItemBatGun extends ItemGadget
if (other.equals(cur))
continue;
if (!_manager.getPreferencesManager().get(other).isActive(Preference.HUB_GAMES) || !_manager.getPreferencesManager().get(other).isActive(Preference.SHOW_PLAYERS))
if (!Manager.getPreferencesManager().get(other).isActive(Preference.HUB_GAMES) || !Manager.getPreferencesManager().get(other).isActive(Preference.SHOW_PLAYERS))
continue;
if (!Recharge.Instance.usable(other, "Hit by Bat"))
@ -111,7 +110,7 @@ public class ItemBatGun extends ItemGadget
if (UtilEnt.hitBox(bat.getLocation(), other, 2, null))
{
if (_manager.collideEvent(cur, this, other))
if (Manager.collideEvent(cur, this, other))
continue;
//Damage Event

View File

@ -92,7 +92,7 @@ public class ItemBow extends ItemGadget
UtilText.splitLineToArray(C.cGray + "This symbol of love will live on with you forever! Mainly because we couldn't attach the cupid wings to it. I guess duct tape can't fix everything!", LineFormat.LORE),
-6, Material.BOW, (byte) 0, 1000, new Ammo("Cupid Arrow", "Cupid's Arrows", Material.ARROW, (byte) 0, UtilText.splitLineToArray(C.cGray + "Use these arrows to shoot love into people's hearts!", LineFormat.LORE), -6, 15));
_manager.getPacketManager().addPacketHandler(_packetHandler, PacketPlayOutSpawnEntity.class);
Manager.getPacketManager().addPacketHandler(_packetHandler, PacketPlayOutSpawnEntity.class);
}
@Override
@ -134,7 +134,7 @@ public class ItemBow extends ItemGadget
if (!_arrows.contains(arrow))
return;
Bukkit.getScheduler().runTaskLater(_manager.getPlugin(), new Runnable()
Bukkit.getScheduler().runTaskLater(Manager.getPlugin(), new Runnable()
{
@Override
public void run()

View File

@ -3,6 +3,7 @@ package mineplex.core.gadget.gadgets.item;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.block.Action;
@ -82,16 +83,16 @@ public class ItemCoal extends ItemGadget
int goal = -1;
//Coal Hat
if (!_manager.getHatGadget(HatType.COAL).ownsGadget(player))
if (!Manager.getHatGadget(HatType.COAL).ownsGadget(player))
{
goal = _hat;
if(_manager.getInventoryManager().Get(player).getItemCount(getName()) >= _hat)
if(Manager.getInventoryManager().Get(player).getItemCount(getName()) >= _hat)
{
Recharge.Instance.recharge(player, getName());
Recharge.Instance.use(player, getName(), 30000, true, true);
_manager.getInventoryManager().addItemToInventory(new Callback<Boolean>()
Manager.getInventoryManager().addItemToInventory(new Callback<Boolean>()
{
@Override
public void run(Boolean data)
@ -103,10 +104,10 @@ public class ItemCoal extends ItemGadget
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, player.getLocation(), 0.5f, 0.0f, 0.5f, 0, 100, ViewDist.LONG);
player.getWorld().playSound(player.getLocation(), Sound.WITHER_DEATH, 0.8f, 0);
_manager.getInventoryManager().addItemToInventory(player, getName(), -_hat);
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
Manager.getInventoryManager().addItemToInventory(player, getName(), -_hat);
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
_manager.getDonationManager().Get(player).addOwnedUnknownSalesPackage("Lump of Coal Hat");
Manager.getDonationManager().Get(player).addOwnedUnknownSalesPackage("Lump of Coal Hat");
UtilServer.CallEvent(new PlayerUseCoalEvent(player, PlayerUseCoalEvent.CoalReward.HAT, _particle));
}
@ -121,19 +122,19 @@ public class ItemCoal extends ItemGadget
}
//Coal Apparition
if (!_manager.getPetManager().Get(player).getPets().containsKey(PetType.PIG_ZOMBIE))
if (!Manager.getPetManager().Get(player).getPets().containsKey(PetType.PIG_ZOMBIE))
{
goal = _pet;
if(_manager.getInventoryManager().Get(player).getItemCount(getName()) >= _pet)
if(Manager.getInventoryManager().Get(player).getItemCount(getName()) >= _pet)
{
Recharge.Instance.recharge(player, getName());
Recharge.Instance.use(player, getName(), 30000, true, true);
PetReward reward = new PetReward(
_manager.getPetManager(),
_manager.getInventoryManager(),
_manager.getDonationManager(),
Manager.getPetManager(),
Manager.getInventoryManager(),
Manager.getDonationManager(),
"Coal Apparition", "Coal Apparition", PetType.PIG_ZOMBIE, RewardRarity.OTHER, 0, 0);
if (reward.canGiveReward(player))
@ -147,10 +148,10 @@ public class ItemCoal extends ItemGadget
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, player.getLocation(), 1f, 0.0f, 1f, 0, 250, ViewDist.LONG);
player.getWorld().playSound(player.getLocation(), Sound.WITHER_DEATH, 0.8f, 0);
_manager.getInventoryManager().addItemToInventory(player, getName(), -_pet);
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
Manager.getInventoryManager().addItemToInventory(player, getName(), -_pet);
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
_manager.getDonationManager().Get(player).addOwnedUnknownSalesPackage("Coal Apparition");
Manager.getDonationManager().Get(player).addOwnedUnknownSalesPackage("Coal Apparition");
UtilServer.CallEvent(new PlayerUseCoalEvent(player, PlayerUseCoalEvent.CoalReward.PET, _particle));
}
@ -161,16 +162,16 @@ public class ItemCoal extends ItemGadget
}
//Coal Particle
if (!_manager.getGadget(ParticleCoalFumes.class).ownsGadget(player))
if (!Manager.getGadget(ParticleCoalFumes.class).ownsGadget(player))
{
goal = _particle;
if(_manager.getInventoryManager().Get(player).getItemCount(getName()) >= _particle)
if(Manager.getInventoryManager().Get(player).getItemCount(getName()) >= _particle)
{
Recharge.Instance.recharge(player, getName());
Recharge.Instance.use(player, getName(), 30000, true, true);
_manager.getInventoryManager().addItemToInventory(new Callback<Boolean>()
Manager.getInventoryManager().addItemToInventory(new Callback<Boolean>()
{
@Override
public void run(Boolean data)
@ -182,10 +183,10 @@ public class ItemCoal extends ItemGadget
UtilParticle.PlayParticleToAll(ParticleType.LARGE_SMOKE, player.getLocation(), 1.5f, 0.0f, 1.5f, 0, 500, ViewDist.LONG);
player.getWorld().playSound(player.getLocation(), Sound.WITHER_DEATH, 0.8f, 0);
_manager.getInventoryManager().addItemToInventory(player, getName(), -_particle);
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
Manager.getInventoryManager().addItemToInventory(player, getName(), -_particle);
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
_manager.getDonationManager().Get(player).addOwnedUnknownSalesPackage("Coal Fumes");
Manager.getDonationManager().Get(player).addOwnedUnknownSalesPackage("Coal Fumes");
UtilServer.CallEvent(new PlayerUseCoalEvent(player, PlayerUseCoalEvent.CoalReward.PARTICLE, _particle));
}
@ -199,7 +200,7 @@ public class ItemCoal extends ItemGadget
}
}
goal -= _manager.getInventoryManager().Get(player).getItemCount(getName());
goal -= Manager.getInventoryManager().Get(player).getItemCount(getName());
if (goal > 0 && Math.random() > 0.95)
{
@ -238,7 +239,7 @@ public class ItemCoal extends ItemGadget
event.setCancelled(true);
//Stock
if (_manager.getInventoryManager().Get(player).getItemCount(getName()) <= 0)
if (Manager.getInventoryManager().Get(player).getItemCount(getName()) <= 0)
{
UtilPlayer.message(player, F.main("Gadget", "You do not have any " + getName() + " left."));
@ -256,7 +257,7 @@ public class ItemCoal extends ItemGadget
return;
}
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
ActivateCustom(event.getPlayer());
}

View File

@ -110,7 +110,7 @@ public class ItemCoinBomb extends ItemGadget
event.setCancelled(true);
event.getItem().remove();
_manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, event.getPlayer(), getName() + " Pickup", 4);
Manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, event.getPlayer(), getName() + " Pickup", 4);
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.ORB_PICKUP, 1f, 2f);

View File

@ -28,11 +28,11 @@ public class ItemDuelingSword extends ItemGadget
@Override
public void ApplyItem(Player player, boolean inform)
{
_manager.removeGadgetType(player, GadgetType.ITEM);
Manager.removeGadgetType(player, GadgetType.ITEM);
_active.add(player);
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD, (byte)0, 1, "PvP Sword"));
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(Material.GOLD_SWORD, (byte)0, 1, "PvP Sword"));
}
@Override

View File

@ -44,7 +44,7 @@ public class ItemFleshHook extends ItemGadget implements IThrown
UtilAction.velocity(item, player.getLocation().getDirection(),
1.6, false, 0, 0.2, 10, false);
_manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
Sound.FIRE_IGNITE, 1.4f, 0.8f, ParticleType.CRIT, null, 0, UpdateType.TICK, 0.5f);
//Inform
@ -67,7 +67,7 @@ public class ItemFleshHook extends ItemGadget implements IThrown
if (target == null)
return;
if (_manager.collideEvent(player, this, target))
if (Manager.collideEvent(player, this, target))
return;
if (target instanceof ArmorStand)

View File

@ -61,7 +61,7 @@ public class ItemFreezeCannon extends ItemGadget implements IThrown
UtilAction.velocity(item, player.getLocation().getDirection(),
1, false, 0, 0.2, 10, false);
_manager.getProjectileManager().AddThrow(item, player, this, 5000, true, true, true, true,
Manager.getProjectileManager().AddThrow(item, player, this, 5000, true, true, true, true,
null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f);
//Inform
@ -81,11 +81,11 @@ public class ItemFreezeCannon extends ItemGadget implements IThrown
int ticks = 4 * 20;
if(isClear(p.getLocation()))
{
_manager.getBlockRestore().add(p.getLocation().getBlock(), Material.STAINED_GLASS.getId(), (byte)5, 0, (byte)0, ticks*50);
_manager.getBlockRestore().add(p.getLocation().getBlock().getRelative(BlockFace.UP), Material.STAINED_GLASS.getId(), (byte)5, 0, (byte)0, ticks*50);
Manager.getBlockRestore().add(p.getLocation().getBlock(), Material.STAINED_GLASS.getId(), (byte)5, 0, (byte)0, ticks*50);
Manager.getBlockRestore().add(p.getLocation().getBlock().getRelative(BlockFace.UP), Material.STAINED_GLASS.getId(), (byte)5, 0, (byte)0, ticks*50);
if(p.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() == Material.AIR)
{
_manager.getBlockRestore().add(p.getLocation().getBlock().getRelative(BlockFace.DOWN), Material.STAINED_GLASS.getId(), (byte)5, 0, (byte)0, ticks*50);
Manager.getBlockRestore().add(p.getLocation().getBlock().getRelative(BlockFace.DOWN), Material.STAINED_GLASS.getId(), (byte)5, 0, (byte)0, ticks*50);
}
p.setWalkSpeed(0);
_playerMap.put(p, System.currentTimeMillis() + (ticks * 50));

View File

@ -72,16 +72,16 @@ public class ItemLovePotion extends ItemGadget
@Override
public void ApplyItem(Player player, boolean inform)
{
_manager.removeGadgetType(player, GadgetType.ITEM);
Manager.removeGadgetType(player, GadgetType.ITEM);
_active.add(player);
List<String> itemLore = new ArrayList<String>();
itemLore.addAll(Arrays.asList(getDescription()));
itemLore.add(C.cBlack);
itemLore.add(C.cWhite + "Your Ammo : " + _manager.getInventoryManager().Get(player).getItemCount(getName()));
itemLore.add(C.cWhite + "Your Ammo : " + Manager.getInventoryManager().Get(player).getItemCount(getName()));
player.getInventory().setItem(_manager.getActiveItemSlot(), new ItemBuilder(getDisplayMaterial(), getDisplayData()).setTitle(F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())).setHideInfo(true).build());
player.getInventory().setItem(Manager.getActiveItemSlot(), new ItemBuilder(getDisplayMaterial(), getDisplayData()).setTitle(F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())).setHideInfo(true).build());
if (inform)
UtilPlayer.message(player, F.main("Gadget", "You equipped " + F.elem(getName()) + "."));
@ -130,12 +130,12 @@ public class ItemLovePotion extends ItemGadget
Recharge.Instance.use(player, getName(), getName(), _recharge, _recharge > 1000, true, false, true, "Cosmetics"); // Cooldown
_manager.getInventoryManager().addItemToInventory(player, getName(), -1);
Manager.getInventoryManager().addItemToInventory(player, getName(), -1);
ItemGadgetUseEvent itemGadgetUseEvent = new ItemGadgetUseEvent(player, this, 1);
UtilServer.CallEvent(itemGadgetUseEvent);
player.getInventory().setItem(_manager.getActiveItemSlot(), new ItemBuilder(getDisplayMaterial(), getDisplayData()).setTitle(F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())).setHideInfo(true).build());
player.getInventory().setItem(Manager.getActiveItemSlot(), new ItemBuilder(getDisplayMaterial(), getDisplayData()).setTitle(F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())).setHideInfo(true).build());
}
@EventHandler
@ -181,9 +181,9 @@ public class ItemLovePotion extends ItemGadget
String message = UtilMath.randomElement(DRINK_MESSAGES);
UtilPlayer.message(player, F.main("Potion", message));
_manager.getInventoryManager().addItemToInventory(player, getName(), -1);
Manager.getInventoryManager().addItemToInventory(player, getName(), -1);
player.getInventory().setItem(_manager.getActiveItemSlot(), new ItemBuilder(getDisplayMaterial(), getDisplayData()).setTitle(F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())).setHideInfo(true).build());
player.getInventory().setItem(Manager.getActiveItemSlot(), new ItemBuilder(getDisplayMaterial(), getDisplayData()).setTitle(F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())).setHideInfo(true).build());
ItemGadgetUseEvent itemGadgetUseEvent = new ItemGadgetUseEvent(player, this, 1);
UtilServer.CallEvent(itemGadgetUseEvent);

View File

@ -59,7 +59,7 @@ public class ItemMelonLauncher extends ItemGadget implements IThrown
UtilAction.velocity(item, player.getLocation().getDirection(),
1, false, 0, 0.2, 10, false);
_manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f);
//Inform

View File

@ -52,14 +52,14 @@ public class ItemPaintbrush extends ItemGadget
@Override
public void ApplyItem(Player player, boolean inform)
{
_manager.removeGadgetType(player, GadgetType.ITEM);
Manager.removeGadgetType(player, GadgetType.ITEM);
_active.add(player);
List<String> itemLore = new ArrayList<String>();
itemLore.addAll(Arrays.asList(getDescription()));
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, getName()));
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, getName()));
if (inform)
UtilPlayer.message(player, F.main("Gadget", "You equipped " + F.elem(getName()) + "."));
@ -161,7 +161,7 @@ public class ItemPaintbrush extends ItemGadget
continue;
//Color
_manager.getBlockRestore().add(block, 35, _brushColor.get(player.getName()), 30000);
Manager.getBlockRestore().add(block, 35, _brushColor.get(player.getName()), 30000);
//Join Dots
if (_brushPrevious.containsKey(player.getName()))
@ -175,7 +175,7 @@ public class ItemPaintbrush extends ItemGadget
if (fixBlock.getType() != Material.WOOL)
continue;
_manager.getBlockRestore().add(fixBlock, 35, _brushColor.get(player.getName()), 30000);
Manager.getBlockRestore().add(fixBlock, 35, _brushColor.get(player.getName()), 30000);
}
}

View File

@ -55,7 +55,7 @@ public class ItemSnowball extends ItemGadget
if(!_snowballs.containsKey(ball)) return;
if(_manager.collideEvent(_snowballs.remove(ball), this, event.getEntity())) return;
if(Manager.collideEvent(_snowballs.remove(ball), this, event.getEntity())) return;
if (event.getEntity() instanceof ArmorStand)
return;

View File

@ -65,7 +65,7 @@ public class ItemTNT extends ItemGadget
HashMap<Player, Double> players = UtilPlayer.getInRadius(event.getLocation(), 8);
for (Player player : players.keySet())
{
if (_manager.collideEvent(killer, this, player))
if (Manager.collideEvent(killer, this, player))
continue;
double mult = players.get(player);

View File

@ -69,7 +69,7 @@ public class BlockForm
_hiddenDisguise = new DisguiseSlime(player);
_hiddenDisguise.setInvisible(true);
_host._manager.getDisguiseManager().disguise(_hiddenDisguise);
_host.Manager.getDisguiseManager().disguise(_hiddenDisguise);
this._fallingBlock = _loc.getWorld().spawn(_loc, Slime.class);
this._fallingBlock.setSize(0);
@ -92,7 +92,7 @@ public class BlockForm
_disguiseBlockBase = new DisguiseSlime(_fallingBlockBase);
_disguiseBlockBase.SetSize(0);
_disguiseBlockBase.setInvisible(true);
_host._manager.getDisguiseManager().disguise(_disguiseBlockBase);
_host.Manager.getDisguiseManager().disguise(_disguiseBlockBase);
reset();
}
@ -103,7 +103,7 @@ public class BlockForm
_disguiseBlock = new DisguiseBlock(_fallingBlock, _blockMat.getId(), _blockData);
_disguiseBlock.setHideIfNotDisguised(true);
_host._manager.getDisguiseManager().disguise(_disguiseBlock);
_host.Manager.getDisguiseManager().disguise(_disguiseBlock);
_fallingBlockBase.setPassenger(_fallingBlock);
}
@ -112,7 +112,7 @@ public class BlockForm
{
if (_disguiseBlock != null)
{
_host._manager.getDisguiseManager().undisguise(_disguiseBlock);
_host.Manager.getDisguiseManager().undisguise(_disguiseBlock);
_disguiseBlock = null;
_fallingBlockBase.setPassenger(null);
}
@ -142,8 +142,8 @@ public class BlockForm
removeSolidBlock();
removeFallingBlock();
_host._manager.getDisguiseManager().undisguise(_hiddenDisguise);
_host._manager.getDisguiseManager().undisguise(_disguiseBlockBase);
_host.Manager.getDisguiseManager().undisguise(_hiddenDisguise);
_host.Manager.getDisguiseManager().undisguise(_disguiseBlockBase);
_fallingBlockBase.remove();
_fallingBlockBase = null;
_fallingBlock.remove();

View File

@ -60,14 +60,14 @@ public class MorphBat extends MorphGadget implements IThrown
this.applyArmor(player, message);
DisguiseBat disguise = new DisguiseBat(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.setAllowFlight(false);
player.setFlying(false);
@ -113,7 +113,7 @@ public class MorphBat extends MorphGadget implements IThrown
UtilAction.velocity(item, player.getLocation().getDirection(),
0.01, true, -0.3, 0, 10, false);
_manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f);
//Inform

View File

@ -43,14 +43,14 @@ public class MorphBlaze extends MorphGadget
this.applyArmor(player, message);
DisguiseBlaze disguise = new DisguiseBlaze(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -81,9 +81,9 @@ public class MorphBlaze extends MorphGadget
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}
}

View File

@ -71,7 +71,7 @@ public class MorphBunny extends MorphGadget
this.applyArmor(player, message);
DisguiseRabbit disguise = new DisguiseRabbit(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 999999999, 1));
player.addPotionEffect(new PotionEffect(PotionEffectType.JUMP, 999999999, 1));
@ -82,7 +82,7 @@ public class MorphBunny extends MorphGadget
{
_jumpCharge.remove(player);
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.removePotionEffect(PotionEffectType.SPEED);
player.removePotionEffect(PotionEffectType.JUMP);
@ -150,7 +150,7 @@ public class MorphBunny extends MorphGadget
if (!UtilEvent.isAction(event, ActionType.L))
return;
if (_manager.getDonationManager().Get(player).getBalance(GlobalCurrency.TREASURE_SHARD) < 500)
if (Manager.getDonationManager().Get(player).getBalance(GlobalCurrency.TREASURE_SHARD) < 500)
{
UtilPlayer.message(player, F.main("Gadget", "You do not have enough Shards."));
return;
@ -170,7 +170,7 @@ public class MorphBunny extends MorphGadget
UtilAction.velocity(egg, player.getLocation().getDirection(), 0.2, false, 0, 0.2, 1, false);
_manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, player, this.getName() + " Egg Hide", -500);
Manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, player, this.getName() + " Egg Hide", -500);
egg.setPickupDelay(40);
@ -197,7 +197,7 @@ public class MorphBunny extends MorphGadget
event.setCancelled(true);
event.getItem().remove();
_manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, event.getPlayer(), getName() + " Egg Pickup", 450);
Manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, event.getPlayer(), getName() + " Egg Pickup", 450);
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.ORB_PICKUP, 1.5f, 0.75f);
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.ORB_PICKUP, 1.5f, 1.25f);

View File

@ -49,14 +49,14 @@ public class MorphChicken extends MorphGadget
this.applyArmor(player, message);
DisguiseChicken disguise = new DisguiseChicken(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.setAllowFlight(false);
player.setFlying(false);

View File

@ -66,7 +66,7 @@ public class MorphChristmasKing extends MorphGadget
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
disguise.showArmor();
disguise.SetSkeletonType(SkeletonType.WITHER);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
player.getInventory().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
@ -78,7 +78,7 @@ public class MorphChristmasKing extends MorphGadget
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.getInventory().setHelmet(null);
}
@ -119,7 +119,7 @@ public class MorphChristmasKing extends MorphGadget
{
for (Player player : getActive())
{
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
continue;
}
@ -163,7 +163,7 @@ public class MorphChristmasKing extends MorphGadget
if (!_snowball.containsKey(proj))
return;
if (_manager.collideEvent(_snowball.remove(proj), this, event.getEntity()))
if (Manager.collideEvent(_snowball.remove(proj), this, event.getEntity()))
return;
UtilAction.velocity(event.getEntity(), proj.getVelocity().multiply(0.15).add(new Vector(0, 0.15, 0)));

View File

@ -37,14 +37,14 @@ public class MorphCow extends MorphGadget
this.applyArmor(player, message);
DisguiseCow disguise = new DisguiseCow(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler

View File

@ -51,14 +51,14 @@ public class MorphCreeper extends MorphGadget
this.applyArmor(player, message);
DisguiseCreeper disguise = new DisguiseCreeper(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -111,7 +111,7 @@ public class MorphCreeper extends MorphGadget
if (other.equals(player))
continue;
if (_manager.collideEvent(player, this, other))
if (Manager.collideEvent(player, this, other))
continue;
double mult = players.get(other);
@ -127,7 +127,7 @@ public class MorphCreeper extends MorphGadget
public DisguiseCreeper GetDisguise(Player player)
{
DisguiseBase disguise = _manager.getDisguiseManager().getDisguise(player);
DisguiseBase disguise = Manager.getDisguiseManager().getDisguise(player);
if (disguise == null)
return null;
@ -152,7 +152,7 @@ public class MorphCreeper extends MorphGadget
creeper.a(-1);
_manager.getDisguiseManager().updateDisguise(creeper);
Manager.getDisguiseManager().updateDisguise(creeper);
}
public void IncreaseSize(Player player)
@ -162,15 +162,15 @@ public class MorphCreeper extends MorphGadget
creeper.a(1);
_manager.getDisguiseManager().updateDisguise(creeper);
Manager.getDisguiseManager().updateDisguise(creeper);
}
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.HERO))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}

View File

@ -10,6 +10,7 @@ import java.util.UUID;
import net.minecraft.server.v1_8_R3.DataWatcher;
import net.minecraft.server.v1_8_R3.EntityArmorStand;
import net.minecraft.server.v1_8_R3.EntitySlime;
import net.minecraft.server.v1_8_R3.MathHelper;
import net.minecraft.server.v1_8_R3.PacketPlayOutAttachEntity;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
@ -32,6 +33,7 @@ import mineplex.core.Managers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.DummyEntity;
import mineplex.core.common.Rank;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilEnt;
@ -90,7 +92,7 @@ public class MorphDinnerbone extends MorphGadget implements IPacketHandler
disguisePlayer.setSendSkinDataToSelf(false);
disguisePlayer.setReplaceOriginalName(false, 10);
disguisePlayer.showInTabList(true, 0);
UtilMorph.disguise(player, disguisePlayer, _manager);
UtilMorph.disguise(player, disguisePlayer, Manager);
}
@Override
@ -98,7 +100,7 @@ public class MorphDinnerbone extends MorphGadget implements IPacketHandler
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@Override
@ -118,7 +120,7 @@ public class MorphDinnerbone extends MorphGadget implements IPacketHandler
}
Player owner = (Player) entity;
if (_manager.getActive(owner, GadgetType.MORPH) == this)
if (Manager.getActive(owner, GadgetType.MORPH) == this)
{
summonForEntity(packetInfo.getPlayer(), owner);
}

View File

@ -48,14 +48,14 @@ public class MorphEnderman extends MorphGadget
this.applyArmor(player, message);
DisguiseEnderman disguise = new DisguiseEnderman(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.setAllowFlight(false);
player.setFlying(false);

View File

@ -47,10 +47,10 @@ public class MorphGoldPot extends MorphGadget
{
applyArmor(player, message);
_helpers.put(player, new GoldPotHelper(player, _manager, this));
_helpers.put(player, new GoldPotHelper(player, Manager, this));
DisguiseBlock disguiseBlock = new DisguiseBlock(player, Material.CAULDRON, (byte) 0);
UtilMorph.disguise(player, disguiseBlock, _manager);
UtilMorph.disguise(player, disguiseBlock, Manager);
}
@Override
@ -65,7 +65,7 @@ public class MorphGoldPot extends MorphGadget
_helpers.remove(player);
}
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler

View File

@ -98,7 +98,7 @@ public class MorphGrimReaper extends MorphGadget
skeleton.setChestplate(blackChest);
skeleton.setLeggings(blackPants);
skeleton.setBoots(blackBoots);
UtilMorph.disguise(player, skeleton, _manager.getDisguiseManager());
UtilMorph.disguise(player, skeleton, Manager.getDisguiseManager());
}
@Override
@ -110,7 +110,7 @@ public class MorphGrimReaper extends MorphGadget
_flying.remove(player);
_flyReady.remove(player);
_soulManager.resetSouls(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.getInventory().setItem(2, new ItemStack(Material.AIR));
}

View File

@ -47,7 +47,7 @@ public class MorphLoveDoctor extends MorphGadget
DisguisePlayer disguisePlayer = new DisguisePlayer(player, gameProfile);
disguisePlayer.showInTabList(true, 0);
UtilMorph.disguise(player, disguisePlayer, _manager);
UtilMorph.disguise(player, disguisePlayer, Manager);
}
@Override
@ -55,7 +55,7 @@ public class MorphLoveDoctor extends MorphGadget
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler

View File

@ -72,7 +72,7 @@ public class MorphMetalMan extends MorphGadget
DisguisePlayer disguisePlayer = new DisguisePlayer(player, gameProfile);
disguisePlayer.showInTabList(true, 0);
UtilMorph.disguise(player, disguisePlayer, _manager);
UtilMorph.disguise(player, disguisePlayer, Manager);
player.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, Integer.MAX_VALUE, 1, true, false));
}
@ -82,7 +82,7 @@ public class MorphMetalMan extends MorphGadget
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
if (_playerColors.containsKey(player.getUniqueId()))
{

View File

@ -53,14 +53,14 @@ public class MorphPig extends MorphGadget
this.applyArmor(player, message);
DisguisePig disguise = new DisguisePig(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -84,9 +84,9 @@ public class MorphPig extends MorphGadget
@EventHandler
public void HeroOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.ULTRA))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.ULTRA))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}
@ -136,7 +136,7 @@ public class MorphPig extends MorphGadget
if (UtilMath.offset(player, other) > range)
continue;
if (_manager.collideEvent(player, this, other))
if (Manager.collideEvent(player, this, other))
continue;
//Cooldown

View File

@ -67,7 +67,7 @@ public class MorphPumpkinKing extends MorphGadget
DisguiseSkeleton disguise = new DisguiseSkeleton(player);
disguise.showArmor();
disguise.SetSkeletonType(SkeletonType.WITHER);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
player.getInventory().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
@ -79,7 +79,7 @@ public class MorphPumpkinKing extends MorphGadget
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.getInventory().setHelmet(null);
}
@ -106,7 +106,7 @@ public class MorphPumpkinKing extends MorphGadget
{
for (Player player : getActive())
{
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
continue;
}
@ -140,7 +140,7 @@ public class MorphPumpkinKing extends MorphGadget
_ent = spawnLocation.getWorld().dropItem(spawnLocation, new ItemBuilder(Material.APPLE).setTitle(new Random().nextDouble() + "").build());
_ent.setPickupDelay(Integer.MAX_VALUE);
_disguise = new DisguiseBlock(_ent, Material.JACK_O_LANTERN.getId(), 0);
_manager.getDisguiseManager().disguise(_disguise);
Manager.getDisguiseManager().disguise(_disguise);
_detonation = System.currentTimeMillis() + 7000;
_done = false;
}
@ -157,7 +157,7 @@ public class MorphPumpkinKing extends MorphGadget
Map<Player, Double> players = UtilPlayer.getInRadius(_ent.getLocation(), 8);
for (Player player : players.keySet())
{
if (_manager.collideEvent(_user, MorphPumpkinKing.this, player))
if (Manager.collideEvent(_user, MorphPumpkinKing.this, player))
continue;
double mult = players.get(player);
@ -165,7 +165,7 @@ public class MorphPumpkinKing extends MorphGadget
//Knockback
UtilAction.velocity(player, UtilAlg.getTrajectory(_ent.getLocation(), player.getLocation()), 1 * mult, false, 0, 0.5 + 0.5 * mult, 10, true);
}
_manager.getDisguiseManager().undisguise(_disguise);
Manager.getDisguiseManager().undisguise(_disguise);
_ent.remove();
_done = true;
}

View File

@ -67,7 +67,7 @@ public class MorphSanta extends MorphGadget
DisguisePlayer disguisePlayer = new DisguisePlayer(player, profile);
disguisePlayer.showInTabList(true, 0);
UtilMorph.disguise(player, disguisePlayer, _manager);
UtilMorph.disguise(player, disguisePlayer, Manager);
}
@Override
@ -75,7 +75,7 @@ public class MorphSanta extends MorphGadget
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -103,7 +103,7 @@ public class MorphSanta extends MorphGadget
{
int shards = UtilMath.rRange(250, 500);
if (_manager.getDonationManager().Get(player).getBalance(GlobalCurrency.TREASURE_SHARD) < shards + SHARD_CHARGE)
if (Manager.getDonationManager().Get(player).getBalance(GlobalCurrency.TREASURE_SHARD) < shards + SHARD_CHARGE)
{
UtilPlayer.message(player, F.main("Gadget", "You do not have enough Shards."));
return;
@ -116,7 +116,7 @@ public class MorphSanta extends MorphGadget
SkinData.PRESENT.getSkull("Hidden Present " + System.currentTimeMillis(), new ArrayList<>()));
UtilAction.velocity(present, player.getLocation().getDirection(), 0.2, false, 0, 0.2, 1, false);
_manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, player, this.getName() + " Present Hide", -(shards + SHARD_CHARGE));
Manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, player, this.getName() + " Present Hide", -(shards + SHARD_CHARGE));
present.setPickupDelay(40);
@ -189,7 +189,7 @@ public class MorphSanta extends MorphGadget
if (santaPresent.getPresentType().equals(SantaPresent.PresentType.PRESENT))
{
_manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, event.getPlayer(), getName() + " Present Pickup", santaPresent.getAmmo());
Manager.getDonationManager().rewardCurrency(GlobalCurrency.TREASURE_SHARD, event.getPlayer(), getName() + " Present Pickup", santaPresent.getAmmo());
//Announce
Bukkit.broadcastMessage(C.cGold + C.Bold + event.getPlayer().getName() +
@ -200,7 +200,7 @@ public class MorphSanta extends MorphGadget
else if (santaPresent.getPresentType().equals(SantaPresent.PresentType.COAL))
{
// Gives coals
_manager.getInventoryManager().addItemToInventory(event.getPlayer(), "Coal", santaPresent.getAmmo());
Manager.getInventoryManager().addItemToInventory(event.getPlayer(), "Coal", santaPresent.getAmmo());
//Announce
Bukkit.broadcastMessage(C.cGold + C.Bold + event.getPlayer().getName() +

View File

@ -60,14 +60,14 @@ public class MorphSlime extends MorphGadget
disguise.SetSize(size);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler

View File

@ -60,14 +60,14 @@ public class MorphSnowman extends MorphGadget
this.applyArmor(player, message);
DisguiseSnowman disguise = new DisguiseSnowman(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -141,7 +141,7 @@ public class MorphSnowman extends MorphGadget
if (!_snowball.containsKey(proj))
return;
if(_manager.collideEvent(_snowball.remove(proj), this, event.getEntity())) return;
if(Manager.collideEvent(_snowball.remove(proj), this, event.getEntity())) return;
UtilAction.velocity(event.getEntity(), proj.getVelocity().multiply(0.15).add(new Vector(0, 0.15, 0)));
}

View File

@ -54,7 +54,7 @@ public class MorphSquid extends MorphGadget implements IThrown
{
applyArmor(player, message);
DisguiseSquid disguiseSquid = new DisguiseSquid(player);
UtilMorph.disguise(player, disguiseSquid, _manager);
UtilMorph.disguise(player, disguiseSquid, Manager);
onToggleSwim(new PlayerToggleSwimEvent(player, SwimManager.isSwimming(player.getUniqueId()), SwimManager.isInLava(player.getUniqueId())));
}
@ -62,7 +62,7 @@ public class MorphSquid extends MorphGadget implements IThrown
public void disableCustom(Player player, boolean message)
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -89,7 +89,7 @@ public class MorphSquid extends MorphGadget implements IThrown
if (event.isSwimming())
{
// Removes any costume player could be wearing
_manager.removeOutfit(event.getPlayer(), OutfitGadget.ArmorSlot.BOOTS);
Manager.removeOutfit(event.getPlayer(), OutfitGadget.ArmorSlot.BOOTS);
// Adds enchanted boot
ItemStack enchantedBoot = new ItemStack(Material.DIAMOND_BOOTS, 1);
@ -126,7 +126,7 @@ public class MorphSquid extends MorphGadget implements IThrown
UtilAction.velocity(item, player.getLocation().getDirection(),
0.01, true, -0.3, 1.5, 10, false);
_manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
Manager.getProjectileManager().AddThrow(item, player, this, -1, true, true, true, true,
null, 1f, 1f, null, null, 0, UpdateType.TICK, 0.5f);
}

View File

@ -49,7 +49,7 @@ public class MorphStray extends MorphGadget
// TODO CHECK IF LOBBY IS 1.9+
applyArmor(player, message);
DisguiseSquid disguiseSquid = new DisguiseSquid(player);
UtilMorph.disguise(player, disguiseSquid, _manager);
UtilMorph.disguise(player, disguiseSquid, Manager);
// Gives bow and arrow
ItemStack bow = ItemStackFactory.Instance.CreateStack(Material.BOW, (byte) 0, 1, C.cGreen + "Stray Bow", UtilText.splitLinesToArray(new String[]{"Placeholder"}, LineFormat.LORE));
@ -61,7 +61,7 @@ public class MorphStray extends MorphGadget
public void disableCustom(Player player, boolean message)
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
// Removes bow and arrow
player.getInventory().setItem(2, new ItemStack(Material.AIR));
@ -84,7 +84,7 @@ public class MorphStray extends MorphGadget
_strayArrows.add((Arrow) event.getProjectile());
Bukkit.getScheduler().scheduleSyncDelayedTask(_manager.getPlugin(), new Runnable()
Bukkit.getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable()
{
@Override
public void run()

View File

@ -65,14 +65,14 @@ public class MorphTitan extends MorphGadget
DisguiseGuardian disguise = new DisguiseGuardian(player);
disguise.setElder(true);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.setAllowFlight(false);
player.setFlying(false);
@ -96,7 +96,7 @@ public class MorphTitan extends MorphGadget
if (!Recharge.Instance.use(player, "Guardians Laser", 6000, true, false, "Cosmetics"))
return;
DisguiseBase base = _manager.getDisguiseManager().getDisguise(player);
DisguiseBase base = Manager.getDisguiseManager().getDisguise(player);
if (base == null || !(base instanceof DisguiseGuardian))
return;
@ -130,7 +130,7 @@ public class MorphTitan extends MorphGadget
disguise.setTarget(stand.getEntityId());
_manager.getDisguiseManager().updateDisguise(disguise);
Manager.getDisguiseManager().updateDisguise(disguise);
//Fake Head
UtilEnt.setFakeHead(player, true);
@ -154,7 +154,7 @@ public class MorphTitan extends MorphGadget
for (Player ent : players.keySet())
{
if (ent instanceof Player)
if (_manager.collideEvent(event.GetPlayer(), this, (Player)ent))
if (Manager.collideEvent(event.GetPlayer(), this, (Player)ent))
continue;
double mult = players.get(ent);
@ -170,14 +170,14 @@ public class MorphTitan extends MorphGadget
}
//Disguise
DisguiseBase base = _manager.getDisguiseManager().getDisguise(event.GetPlayer());
DisguiseBase base = Manager.getDisguiseManager().getDisguise(event.GetPlayer());
if (base == null || !(base instanceof DisguiseGuardian))
return;
DisguiseGuardian disguise = (DisguiseGuardian)base;
disguise.setTarget(0);
_manager.getDisguiseManager().updateDisguise(disguise);
Manager.getDisguiseManager().updateDisguise(disguise);
}
}
@ -225,9 +225,9 @@ public class MorphTitan extends MorphGadget
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}

View File

@ -46,14 +46,14 @@ public class MorphTurkey extends MorphGadget
DisguisePlayer disguisePlayer = new DisguisePlayer(player, profile);
disguisePlayer.showInTabList(true, 0);
UtilMorph.disguise(player, disguisePlayer, _manager);
UtilMorph.disguise(player, disguisePlayer, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler

View File

@ -49,7 +49,7 @@ public class MorphUncleSam extends MorphGadget
DisguisePlayer disguisePlayer = new DisguisePlayer(player, profile);
disguisePlayer.showInTabList(true, 0);
UtilMorph.disguise(player, disguisePlayer, _manager);
UtilMorph.disguise(player, disguisePlayer, Manager);
}
@Override
@ -57,7 +57,7 @@ public class MorphUncleSam extends MorphGadget
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler

View File

@ -60,14 +60,14 @@ public class MorphVillager extends MorphGadget implements IThrown
this.applyArmor(player, message);
DisguiseVillager disguise = new DisguiseVillager(player);
UtilMorph.disguise(player, disguise, _manager);
UtilMorph.disguise(player, disguise, Manager);
}
@Override
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
@EventHandler
@ -81,7 +81,7 @@ public class MorphVillager extends MorphGadget implements IThrown
if (!UtilEvent.isAction(event, ActionType.L))
return;
if (_manager.getDonationManager().Get(player).getBalance(GlobalCurrency.GEM) < 20)
if (Manager.getDonationManager().Get(player).getBalance(GlobalCurrency.GEM) < 20)
{
UtilPlayer.message(player, F.main("Gadget", "You do not have enough Gems."));
return;
@ -97,10 +97,10 @@ public class MorphVillager extends MorphGadget implements IThrown
UtilAction.velocity(gem, player.getLocation().getDirection(), 1, false, 0, 0.2, 1, false);
//Throw
_manager.getProjectileManager().AddThrow(gem, player, this, -1, true, true, true, true,
Manager.getProjectileManager().AddThrow(gem, player, this, -1, true, true, true, true,
null, 1.4f, 0.8f, null, null, 0, UpdateType.TICK, 0.5f);
_manager.getDonationManager().rewardCurrency(GlobalCurrency.GEM, player, this.getName() + " Throw", -20);
Manager.getDonationManager().rewardCurrency(GlobalCurrency.GEM, player, this.getName() + " Throw", -20);
gem.setPickupDelay(40);
@ -114,7 +114,7 @@ public class MorphVillager extends MorphGadget implements IThrown
return;
if (target instanceof Player)
if (_manager.collideEvent((Player) data.getThrower(), this, (Player) target))
if (Manager.collideEvent((Player) data.getThrower(), this, (Player) target))
return;
//Pull
@ -150,7 +150,7 @@ public class MorphVillager extends MorphGadget implements IThrown
event.setCancelled(true);
event.getItem().remove();
_manager.getDonationManager().rewardCurrency(GlobalCurrency.GEM, event.getPlayer(), getName() + " Pickup", 16);
Manager.getDonationManager().rewardCurrency(GlobalCurrency.GEM, event.getPlayer(), getName() + " Pickup", 16);
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.ORB_PICKUP, 1f, 2f);
}

View File

@ -42,7 +42,7 @@ public class MorphWitch extends MorphGadget
{
this.applyArmor(player, message);
DisguiseWitch disguiseWitch = new DisguiseWitch(player);
UtilMorph.disguise(player, disguiseWitch, _manager);
UtilMorph.disguise(player, disguiseWitch, Manager);
}
@Override
@ -54,7 +54,7 @@ public class MorphWitch extends MorphGadget
{
witchEffectManager.stop();
}
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
}
public ItemStack getWitchItem()
@ -100,14 +100,14 @@ public class MorphWitch extends MorphGadget
}
// Checks if player is opening a treasure chest/close to a treasure area
if (_manager.getTreasureManager() != null)
if (Manager.getTreasureManager() != null)
{
if (_manager.getTreasureManager().isOpening(event.getPlayer()))
if (Manager.getTreasureManager().isOpening(event.getPlayer()))
{
UtilPlayer.message(event.getPlayer(), F.main("Witch Morph", "You can't place the cauldron there!"));
return;
}
for (Location blockLocation : _manager.getTreasureManager().getBlockLocations())
for (Location blockLocation : Manager.getTreasureManager().getBlockLocations())
{
if (blockLocation.distanceSquared(cauldronLocation) <= 25)
{

View File

@ -65,7 +65,7 @@ public class MorphWither extends MorphGadget
player.setHealth(300);
DisguiseWither disguise = new DisguiseWither(player);
UtilMorph.disguise(player, disguise, _manager, true);
UtilMorph.disguise(player, disguise, Manager, true);
player.setMaxHealth(20);
player.setHealth(20);
@ -75,7 +75,7 @@ public class MorphWither extends MorphGadget
public void disableCustom(Player player, boolean message)
{
this.removeArmor(player);
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
player.setAllowFlight(false);
player.setFlying(false);
@ -127,7 +127,7 @@ public class MorphWither extends MorphGadget
HashMap<Player, Double> players = UtilPlayer.getInRadius(event.getLocation(), 6);
for (Player player : players.keySet())
{
if (_manager.collideEvent((Player) skull.getShooter(), this, player))
if (Manager.collideEvent((Player) skull.getShooter(), this, player))
continue;
double mult = players.get(player);
@ -181,9 +181,9 @@ public class MorphWither extends MorphGadget
public void legendOwner(PlayerJoinEvent event)
{
// TODO HARDCODED Wither Morph Database Item Id - 550
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.LEGEND))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.LEGEND))
{
_manager.getInventoryManager().Get(event.getPlayer()).addItem(new ClientItem(new Item(550, getName()), 1));
Manager.getInventoryManager().Get(event.getPlayer()).addItem(new ClientItem(new Item(550, getName()), 1));
}
}
@ -195,7 +195,7 @@ public class MorphWither extends MorphGadget
{
Player player = activeIterator.next();
DisguiseBase disguise = _manager.getDisguiseManager().getDisguise(player);
DisguiseBase disguise = Manager.getDisguiseManager().getDisguise(player);
if (disguise == null || !(disguise instanceof DisguiseWither))
{
@ -206,7 +206,7 @@ public class MorphWither extends MorphGadget
((DisguiseWither)disguise).setName(text);
((DisguiseWither)disguise).setHealth((float) (healthPercent * 300));
_manager.getDisguiseManager().updateDisguise(disguise);
Manager.getDisguiseManager().updateDisguise(disguise);
}
}
}

View File

@ -50,16 +50,16 @@ public class OutfitTeam extends OutfitGadget
}
enableCustom(player, true);
_manager.setActive(player, this);
Manager.setActive(player, this);
Bukkit.getServer().getPluginManager().callEvent(new GadgetAppliedEvent(player, this));
}
@Override
public void applyArmor(Player player, boolean message)
{
_manager.removeGadgetType(player, GadgetType.MORPH);
Manager.removeGadgetType(player, GadgetType.MORPH);
_manager.removeOutfit(player, _slot);
Manager.removeOutfit(player, _slot);
_active.add(player);

View File

@ -130,13 +130,13 @@ public class OutfitFreezeSuit extends OutfitGadget
for (Block block : blocks.keySet())
{
if (_manager.getTreasureManager() != null)
if (Manager.getTreasureManager() != null)
{
if (_manager.getTreasureManager().isOpening(player))
if (Manager.getTreasureManager().isOpening(player))
{
forceBreak= true;
}
for (Location blockLocation : _manager.getTreasureManager().getBlockLocations())
for (Location blockLocation : Manager.getTreasureManager().getBlockLocations())
{
if (blockLocation.distanceSquared(block.getLocation()) <= 25)
{
@ -150,7 +150,7 @@ public class OutfitFreezeSuit extends OutfitGadget
if (!setBlocks)
continue;
_manager.getBlockRestore().snow(block, (byte) 1, (byte) 1, (int) (DURATION * (1 + blocks.get(block))), 250, 0);
Manager.getBlockRestore().snow(block, (byte) 1, (byte) 1, (int) (DURATION * (1 + blocks.get(block))), 250, 0);
}
}
}
@ -180,7 +180,7 @@ public class OutfitFreezeSuit extends OutfitGadget
else
{
block.getWorld().playEffect(block.getLocation(), Effect.STEP_SOUND, 79);
_manager.getBlockRestore().add(block, 79, (byte) 0, MELT_TIME);
Manager.getBlockRestore().add(block, 79, (byte) 0, MELT_TIME);
}
}
}

View File

@ -38,7 +38,7 @@ public class ParticleChristmasTree extends ParticleGadget
{
if (!_effects.containsKey(player.getUniqueId()))
{
ChristmasTreeEffect christmasTreeEffect = new ChristmasTreeEffect(_manager.getPlugin(), player, _manager);
ChristmasTreeEffect christmasTreeEffect = new ChristmasTreeEffect(Manager.getPlugin(), player, Manager);
christmasTreeEffect.start();
_effects.put(player.getUniqueId(), christmasTreeEffect);
}

View File

@ -33,7 +33,7 @@ public class ParticleCoalFumes extends ParticleGadget
int amount = 5;
ParticleType type = ParticleType.LARGE_SMOKE;
if(_manager.isMoving(player))
if(Manager.isMoving(player))
{
xz = 0.4f;
amount = 2;

View File

@ -31,7 +31,7 @@ public class ParticleFireRings extends ParticleGadget
{
if (event.getType() != UpdateType.TICK) return;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.PlayParticle(ParticleType.FLAME, player.getLocation().add(0, 1f, 0), 0.2f, 0.2f, 0.2f, 0, 1, ViewDist.NORMAL,
UtilServer.getPlayers());

View File

@ -47,16 +47,16 @@ public class ParticleKronos extends ParticleGadget
if (!_glass.containsKey(player))
_glass.put(player, new ParticleKronosData(player));
_glass.get(player).update(_manager.isMoving(player));
_glass.get(player).update(Manager.isMoving(player));
}
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
/*Until it becomes purchasable*/if (_manager.getClientManager().Get(event.getPlayer()).GetRank().equals(Rank.TITAN))
/*Until it becomes purchasable*/if (Manager.getClientManager().Get(event.getPlayer()).GetRank().equals(Rank.TITAN))
//if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}

View File

@ -40,9 +40,9 @@ public class ParticleLegend extends ParticleGadget
public void legendOwner(PlayerJoinEvent event)
{
// TODO HARDCODED Legendary Aura Database Item Id - 552
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.LEGEND))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.LEGEND))
{
_manager.getInventoryManager().Get(event.getPlayer()).addItem(new ClientItem(new Item(552, getName()), 1));
Manager.getInventoryManager().Get(event.getPlayer()).addItem(new ClientItem(new Item(552, getName()), 1));
}
}
}

View File

@ -32,7 +32,7 @@ public class ParticleWingsAngel extends ParticleGadget
public void playParticle(Player player, UpdateEvent event)
{
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
if (event.getType() == UpdateType.TICK)
{

View File

@ -34,7 +34,7 @@ public class ParticleWingsDemons extends ParticleGadget
public void playParticle(Player player, UpdateEvent event)
{
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
if (event.getType() == UpdateType.FASTEST)
UtilParticle.playParticleFor(player, ParticleType.SMOKE, loc, 0.3f, 0.2f, 0.3f, 0, 10, ViewDist.NORMAL);

View File

@ -32,7 +32,7 @@ public class ParticleWingsInfernal extends ParticleGadget
public void playParticle(Player player, UpdateEvent event)
{
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
if (event.getType() == UpdateType.TICK)
{

View File

@ -38,7 +38,7 @@ public class ParticleWingsLove extends ParticleGadget
public void playParticle(Player player, UpdateEvent event)
{
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
if (event.getType() == UpdateType.TICK)
{

View File

@ -32,7 +32,7 @@ public class ParticleWingsPixie extends ParticleGadget
{
Location loc = player.getLocation().add(0, 1.2, 0).add(player.getLocation().getDirection().multiply(-0.2));
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
if (event.getType() == UpdateType.TICK)
{

View File

@ -47,7 +47,7 @@ public class ParticleYinYang extends ParticleGadget
RechargeData r = Recharge.Instance.Get(player).get("Yin and Yang Move");
if(_manager.isMoving(player))
if(Manager.isMoving(player))
{
long time = 50;
if(r != null)

View File

@ -35,7 +35,7 @@ public class ParticleCandyCane extends ParticleGadget
{
if (event.getType() != UpdateType.TICK) return;
boolean moving = _manager.isMoving(player);
boolean moving = Manager.isMoving(player);
Location loc = player.getLocation();
float y = moving ? 0.2f : 0.15f;
double yadd = getY(player);

View File

@ -33,7 +33,7 @@ public class ParticleHeart extends ParticleGadget
{
if (event.getType() != UpdateType.FASTEST) return;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
if(getSet() == null || !getSet().isActive(player)) return;

View File

@ -40,7 +40,7 @@ public class ParticleEmerald extends ParticleGadget
if(getSet() == null || !getSet().isActive(player)) return;
if(_manager.isMoving(player))
if(Manager.isMoving(player))
{
UtilParticle.PlayParticle(ParticleType.HAPPY_VILLAGER, player.getLocation().add(0, 0.2, 0), 0.3f, 0f, 0.3f, 0, 2, ViewDist.NORMAL,
UtilServer.getPlayers());

View File

@ -38,7 +38,7 @@ public class ParticleFreedom extends ParticleGadget
@Override
public void startEffect(Player player)
{
_effects.put(player.getUniqueId(), new FreedomFireworkEffect(player, _manager.getPlugin(), true));
_effects.put(player.getUniqueId(), new FreedomFireworkEffect(player, Manager.getPlugin(), true));
_effects.get(player.getUniqueId()).start();
}

View File

@ -30,7 +30,7 @@ public class ParticleFrostLord extends ParticleGadget
{
if (event.getType() != UpdateType.TICK) return;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.PlayParticle(ParticleType.SNOW_SHOVEL, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4, ViewDist.NORMAL,
UtilServer.getPlayers());

View File

@ -35,7 +35,7 @@ public class ParticleRain extends ParticleGadget
{
if (event.getType() != UpdateType.TICK) return;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.playParticleFor(player, ParticleType.SPLASH, player.getLocation(), 0.2f, 0, 0.2f, 0, 6, ViewDist.NORMAL);
}

View File

@ -29,7 +29,7 @@ public class ParticleMusic extends ParticleGadget
@Override
public void playParticle(Player player, UpdateEvent event)
{
boolean moving = _manager.isMoving(player);
boolean moving = Manager.isMoving(player);
UpdateType type = moving? UpdateType.FASTER : UpdateType.FAST;
if (event.getType() != type) return;
@ -76,7 +76,7 @@ public class ParticleMusic extends ParticleGadget
if(red == 0) red = 0.00001;
double step2 = Math.PI/12;
if(_manager.isMoving(player)) step2 = Math.PI/2;
if(Manager.isMoving(player)) step2 = Math.PI/2;
for(double rad2 = 0; rad2 < Math.PI*2; rad2 += step2)
{

View File

@ -57,7 +57,7 @@ public class ParticlePartyTime extends ParticleGadget
for (int i = 0; i < 1; i++)
{
String particle = ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, list.get(i));
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.playParticleFor(player, particle, player.getLocation().add(0, 1, 0), null, 0.08f, 1, ViewDist.NORMAL);
}
@ -82,7 +82,7 @@ public class ParticlePartyTime extends ParticleGadget
_hiddenDrops.computeIfAbsent(player, key -> new HashSet<>()).add(item);
DisguiseArmorStand stand = new DisguiseArmorStand(item);
stand.setInvisible(true);
_manager.getDisguiseManager().disguise(stand);
Manager.getDisguiseManager().disguise(stand);
String particle = ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, data);
UtilParticle.playParticleFor(player, particle, spawnLoc, null, 0.08f, 30, ViewDist.NORMAL);

View File

@ -4,8 +4,10 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map.Entry;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -48,7 +50,7 @@ public class ParticleFoot extends ParticleGadget
_foot = !_foot;
if (!_manager.isMoving(player)) return;
if (!Manager.isMoving(player)) return;
if (!UtilEnt.isGrounded(player)) return;

View File

@ -49,7 +49,7 @@ public class ParticleTitan extends ParticleGadget
double r = 3;
boolean redstone = false;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.playParticleFor(player, ParticleType.FLAME, player.getLocation().add(0, 0.1, 0), 0.2f, 0.1f, 0.2f, 0.015f, 3, ViewDist.NORMAL);
return;
@ -94,9 +94,9 @@ public class ParticleTitan extends ParticleGadget
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}
}

View File

@ -30,7 +30,7 @@ public class ParticleBlood extends ParticleGadget
{
if (event.getType() != UpdateType.TICK) return;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.playParticleFor(player, ParticleType.RED_DUST, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 2, ViewDist.NORMAL);
}

View File

@ -31,7 +31,7 @@ public class ParticleEnchant extends ParticleGadget
{
if (event.getType() != UpdateType.TICK) return;
if (_manager.isMoving(player))
if (Manager.isMoving(player))
{
UtilParticle.PlayParticle(ParticleType.ENCHANTMENT_TABLE, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0, 4, ViewDist.NORMAL,
UtilServer.getPlayers());

View File

@ -68,7 +68,7 @@ public class EternalTaunt extends TauntGadget
Bukkit.broadcastMessage(F.main("Taunt", F.name(player.getName()) + " waited so long they turned to bones."));
DisguiseSkeleton disguiseSkeleton = new DisguiseSkeleton(player);
UtilMorph.disguise(player, disguiseSkeleton, _manager);
UtilMorph.disguise(player, disguiseSkeleton, Manager);
}
@Override
@ -113,7 +113,7 @@ public class EternalTaunt extends TauntGadget
@Override
public void onFinish(Player player)
{
UtilMorph.undisguise(player, _manager.getDisguiseManager());
UtilMorph.undisguise(player, Manager.getDisguiseManager());
if (_clocks.containsKey(player.getUniqueId()))
{
_clocks.get(player.getUniqueId()).forEach(c -> c.remove());
@ -125,9 +125,9 @@ public class EternalTaunt extends TauntGadget
@EventHandler
public void titanOwner(PlayerJoinEvent event)
{
if (_manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.ETERNAL))
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.ETERNAL))
{
_manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
Manager.getDonationManager().Get(event.getPlayer()).addOwnedUnknownSalesPackage(getName());
}
}

View File

@ -48,7 +48,7 @@ public class RainbowTaunt extends TauntGadget
Location start = player.getLocation().clone().add(sideA.multiply(4).toLocation(player.getWorld()));
Location end = player.getLocation().clone().add(sideB.multiply(4).toLocation(player.getWorld()));
RainbowTauntEffect rainbowTauntEffect = new RainbowTauntEffect(start, _manager.getPlugin());
RainbowTauntEffect rainbowTauntEffect = new RainbowTauntEffect(start, Manager.getPlugin());
rainbowTauntEffect.setTargetLocation(new EffectLocation(end));
rainbowTauntEffect.start();
}

View File

@ -125,7 +125,7 @@ public class WinEffectBabyChicken extends WinEffectGadget
{
_chicken.getWorld().playSound(_chicken.getLocation(), Sound.CHICKEN_IDLE, 1, (float) (1 + Math.random()*0.6));
Hologram hologram = new Hologram(_manager.getHologramManager(), _chicken.getEyeLocation(), C.Italics + "BAWK");
Hologram hologram = new Hologram(Manager.getHologramManager(), _chicken.getEyeLocation(), C.Italics + "BAWK");
_text.put(hologram, Vector.getRandom().subtract(Vector.getRandom()).normalize().multiply(0.4).setY(0.6));
hologram.start();
}

View File

@ -45,7 +45,7 @@ public class WinEffectFireworks extends WinEffectGadget
start.setDirection(new Vector(1, 0, 0));
_npc = getNPC(_player, start);
AnimatorEntity animator = new AnimatorEntity(_manager.getPlugin(), _npc.getEntity().getBukkitEntity());
AnimatorEntity animator = new AnimatorEntity(Manager.getPlugin(), _npc.getEntity().getBukkitEntity());
for(double rad = 0; rad < Math.PI*2; rad+= Math.PI/points)

View File

@ -49,7 +49,7 @@ public class WinEffectFlames extends WinEffectGadget
start.setDirection(new Vector(1, 0, 0));
_npc = getNPC(_player, start);
AnimatorEntity animator = new AnimatorEntity(_manager.getPlugin(), _npc.getEntity().getBukkitEntity());
AnimatorEntity animator = new AnimatorEntity(Manager.getPlugin(), _npc.getEntity().getBukkitEntity());
for(double rad = 0; rad < Math.PI*2; rad+= Math.PI/points)

View File

@ -173,11 +173,11 @@ public class WinEffectHalloween extends WinEffectGadget
BabyFireworkEffect babyFireworkEffect;
if (i %2 == 0)
{
babyFireworkEffect = new BabyFireworkEffect((randomLoc) ? randLocation : entityLocation, _manager.getPlugin(), color);
babyFireworkEffect = new BabyFireworkEffect((randomLoc) ? randLocation : entityLocation, Manager.getPlugin(), color);
}
else
{
babyFireworkEffect = new BabyFireworkEffect((randomLoc) ? randLocation : entityLocation, _manager.getPlugin(), Color.ORANGE, Color.BLACK);
babyFireworkEffect = new BabyFireworkEffect((randomLoc) ? randLocation : entityLocation, Manager.getPlugin(), Color.ORANGE, Color.BLACK);
}
// Starts without the firework trail
babyFireworkEffect.setCount(6);

View File

@ -29,7 +29,7 @@ public class WinEffectLightningStrike extends WinEffectGadget
public void play()
{
final DisguisePlayer player = getNPC(this._player, getBaseLocation());
Bukkit.getScheduler().runTaskLater(_manager.getPlugin(),
Bukkit.getScheduler().runTaskLater(Manager.getPlugin(),
new Runnable()
{
public void run()

View File

@ -50,7 +50,7 @@ public class WinEffectLoveIsABattlefield extends WinEffectGadget
{
_npc = getNPC(this._player, getBaseLocation());
AnimatorEntity animator = new AnimatorEntity(_manager.getPlugin(), _npc.getEntity().getBukkitEntity());
AnimatorEntity animator = new AnimatorEntity(Manager.getPlugin(), _npc.getEntity().getBukkitEntity());
animator.addPoint(new AnimationPoint(20, new Vector(0,0,0), new Vector(-1, 0.5, 0)));
animator.addPoint(new AnimationPoint(40, new Vector(0,0,0), new Vector( 0, 0.5,-1)));
@ -103,7 +103,7 @@ public class WinEffectLoveIsABattlefield extends WinEffectGadget
@Override
public void finish()
{
_manager.getDisguiseManager().undisguise(_npc);
Manager.getDisguiseManager().undisguise(_npc);
_npc = null;
}

View File

@ -32,7 +32,7 @@ public class WinEffectPodium extends WinEffectGadget
{
_npc = getNPC(this._player, getBaseLocation());
AnimatorEntity animator = new AnimatorEntity(_manager.getPlugin(), _npc.getEntity().getBukkitEntity());
AnimatorEntity animator = new AnimatorEntity(Manager.getPlugin(), _npc.getEntity().getBukkitEntity());
animator.addPoint(new AnimationPoint( 20, new Vector(0,0,0), new Vector(-1, 0.5, 0)));
animator.addPoint(new AnimationPoint( 40, new Vector(0,0,0), new Vector( 0, 0.5,-1)));
@ -78,7 +78,7 @@ public class WinEffectPodium extends WinEffectGadget
@Override
public void finish()
{
_manager.getDisguiseManager().undisguise(_npc);
Manager.getDisguiseManager().undisguise(_npc);
_npc = null;
}

View File

@ -62,7 +62,7 @@ public class WinEffectRiseOfTheElderGuardian extends WinEffectGadget
stand.setGravity(false);
DisguiseGuardian g = new DisguiseGuardian(stand);
_manager.getDisguiseManager().disguise(g);
Manager.getDisguiseManager().disguise(g);
_guardians.add(g);
}
@ -91,7 +91,7 @@ public class WinEffectRiseOfTheElderGuardian extends WinEffectGadget
for(DisguiseGuardian g : _guardians)
{
g.setTarget(_npcPlayer.getEntityId());
_manager.getDisguiseManager().updateDisguise(g);
Manager.getDisguiseManager().updateDisguise(g);
}
}
@ -113,17 +113,17 @@ public class WinEffectRiseOfTheElderGuardian extends WinEffectGadget
for(DisguiseGuardian g : _guardians)
{
g.setTarget(0);
_manager.getDisguiseManager().updateDisguise(g);
Manager.getDisguiseManager().updateDisguise(g);
}
ArmorStand stand = (ArmorStand) _npcPlayer.getEntity().getBukkitEntity();
_manager.getDisguiseManager().undisguise(stand);
Manager.getDisguiseManager().undisguise(stand);
_npcGuardian = new DisguiseGuardian(stand);
_npcGuardian.setElder(true);
_manager.getDisguiseManager().disguise(_npcGuardian);
Manager.getDisguiseManager().disguise(_npcGuardian);
}
_tick++;

View File

@ -48,7 +48,7 @@ public class WinEffectSnowTrails extends WinEffectGadget
start.setDirection(new Vector(1, 0, 0));
_npc = getNPC(_player, start);
AnimatorEntity animator = new AnimatorEntity(_manager.getPlugin(), _npc.getEntity().getBukkitEntity());
AnimatorEntity animator = new AnimatorEntity(Manager.getPlugin(), _npc.getEntity().getBukkitEntity());
for(double rad = 0; rad < Math.PI*2; rad+= Math.PI/points)

View File

@ -76,7 +76,7 @@ public class WinEffectWinterWarfare extends WinEffectGadget
@Override
public void finish()
{
_manager.getDisguiseManager().undisguise(_npc);
Manager.getDisguiseManager().undisguise(_npc);
_npc = null;
}

View File

@ -29,7 +29,7 @@ public abstract class ArrowEffectGadget extends Gadget
if (UtilPlayer.isSpectator(player))
return false;
if (_manager.hideParticles())
if (Manager.hideParticles())
return false;
return true;
@ -38,7 +38,7 @@ public abstract class ArrowEffectGadget extends Gadget
@EventHandler
public void arrowLaunch(ProjectileLaunchEvent event)
{
if (_manager.hideParticles())
if (Manager.hideParticles())
return;
if (event.getEntity() instanceof Arrow)

View File

@ -49,7 +49,7 @@ public abstract class BalloonGadget extends Gadget
}
else
{
_manager.removeActive(player, this);
Manager.removeActive(player, this);
UtilPlayer.message(player, F.main("Gadget", "You cannot have more than " + F.count("10") + " balloons!"));
}
}
@ -152,7 +152,7 @@ public abstract class BalloonGadget extends Gadget
if (event.getFrom().getY() > 0)
return;
for (BalloonGadget balloonGadget : _manager.getActiveBalloons(event.getPlayer()))
for (BalloonGadget balloonGadget : Manager.getActiveBalloons(event.getPlayer()))
{
balloonGadget.disable(event.getPlayer(), false);
}

View File

@ -20,7 +20,7 @@ public abstract class DeathEffectGadget extends Gadget
if (UtilPlayer.isSpectator(player))
return false;
if (_manager.hideParticles())
if (Manager.hideParticles())
return false;
return true;

View File

@ -20,7 +20,7 @@ public abstract class DoubleJumpEffectGadget extends Gadget
if (UtilPlayer.isSpectator(player))
return false;
if (_manager.hideParticles())
if (Manager.hideParticles())
return false;
return true;

View File

@ -22,16 +22,20 @@ import mineplex.core.shop.item.SalesPackageBase;
public abstract class Gadget extends SalesPackageBase implements Listener
{
public GadgetManager _manager;
public GadgetManager Manager;
private GadgetType _gadgetType;
protected HashSet<Player> _active = new HashSet<>();
protected GadgetSet _set = null;
private String[] _alternativePackageNames;
private boolean _freeGadget;
private boolean _free;
private YearMonth _yearMonth = null;
private ItemStack _displayItem = null;
public Gadget(GadgetManager manager, GadgetType gadgetType, String name, String[] desc, int cost, Material mat, byte data)
@ -49,15 +53,15 @@ public abstract class Gadget extends SalesPackageBase implements Listener
super(name, mat, data, desc, cost, quantity);
_gadgetType = gadgetType;
_knownPackage = false;
_freeGadget = false;
KnownPackage = false;
_free = false;
_alternativePackageNames = alternativesalepackageNames;
if(_alternativePackageNames == null) { _alternativePackageNames = new String[0]; }
_manager = manager;
Manager = manager;
_manager.getPlugin().getServer().getPluginManager().registerEvents(this, _manager.getPlugin());
Manager.getPlugin().getServer().getPluginManager().registerEvents(this, Manager.getPlugin());
}
public Gadget(GadgetManager manager, GadgetType gadgetType, String name, String[] desc, int cost, Material mat, byte data, YearMonth yearMonth, int quantity, String... alternativesalepackageNames)
@ -65,32 +69,32 @@ public abstract class Gadget extends SalesPackageBase implements Listener
super(name, mat, data, desc, cost, quantity);
_gadgetType = gadgetType;
_knownPackage = false;
_freeGadget = false;
KnownPackage = false;
_free = false;
_yearMonth = yearMonth;
_alternativePackageNames = alternativesalepackageNames;
if(_alternativePackageNames == null) { _alternativePackageNames = new String[0]; }
_manager = manager;
Manager = manager;
_manager.getPlugin().getServer().getPluginManager().registerEvents(this, _manager.getPlugin());
Manager.getPlugin().getServer().getPluginManager().registerEvents(this, Manager.getPlugin());
}
public Gadget(GadgetManager manager, GadgetType gadgetType, String name, String[] desc, int cost, Material mat, byte data, int quantity, boolean freeGadget, String... alternativesalepackageNames)
public Gadget(GadgetManager manager, GadgetType gadgetType, String name, String[] desc, int cost, Material mat, byte data, int quantity, boolean free, String... alternativesalepackageNames)
{
super(name, mat, data, desc, cost, quantity);
_gadgetType = gadgetType;
_knownPackage = false;
_freeGadget = freeGadget;
KnownPackage = false;
_free = free;
_alternativePackageNames = alternativesalepackageNames;
if(_alternativePackageNames == null) { _alternativePackageNames = new String[0]; }
_manager = manager;
Manager = manager;
_manager.getPlugin().getServer().getPluginManager().registerEvents(this, _manager.getPlugin());
Manager.getPlugin().getServer().getPluginManager().registerEvents(this, Manager.getPlugin());
}
public GadgetType getGadgetType()
@ -137,7 +141,7 @@ public abstract class Gadget extends SalesPackageBase implements Listener
return;
}
_manager.setActive(player, this);
Manager.setActive(player, this);
enableCustom(player, message);
Bukkit.getServer().getPluginManager().callEvent(new GadgetAppliedEvent(player, this));
}
@ -157,7 +161,7 @@ public abstract class Gadget extends SalesPackageBase implements Listener
{
if (isActive(player))
{
_manager.removeActive(player, this);
Manager.removeActive(player, this);
GadgetDisableEvent event = new GadgetDisableEvent(player, this);
Bukkit.getServer().getPluginManager().callEvent(event);
disableCustom(player, message);
@ -166,7 +170,7 @@ public abstract class Gadget extends SalesPackageBase implements Listener
public void enableCustom(Player player, boolean message)
{
_manager.removeGadgetType(player, _gadgetType, this);
Manager.removeGadgetType(player, _gadgetType, this);
_active.add(player);
if (message)
UtilPlayer.message(player, F.main("Gadget", "You enabled " + F.elem(getName()) + "."));
@ -180,14 +184,14 @@ public abstract class Gadget extends SalesPackageBase implements Listener
public boolean ownsGadget(Player player)
{
if(isFree() || _freeGadget) { return true; }
if(_manager.getDonationManager().Get(player).ownsUnknownSalesPackage(getName())) { return true; }
if(_manager.getInventoryManager().Get(player).getItemCount(getName()) > 0) { return true; }
if(isFree() || _free) { return true; }
if(Manager.getDonationManager().Get(player).ownsUnknownSalesPackage(getName())) { return true; }
if(Manager.getInventoryManager().Get(player).getItemCount(getName()) > 0) { return true; }
for(String alt : _alternativePackageNames)
{
if(_manager.getDonationManager().Get(player).ownsUnknownSalesPackage(alt)) { return true; }
if(_manager.getInventoryManager().Get(player).getItemCount(alt) > 0) { return true; }
if(Manager.getDonationManager().Get(player).ownsUnknownSalesPackage(alt)) { return true; }
if(Manager.getInventoryManager().Get(player).getItemCount(alt) > 0) { return true; }
}
return false;

View File

@ -46,9 +46,9 @@ public abstract class HatGadget extends OutfitGadget
public void applyArmor(Player player, boolean message)
{
_manager.removeGadgetType(player, GadgetType.MORPH, this);
Manager.removeGadgetType(player, GadgetType.MORPH, this);
_manager.removeOutfit(player, _slot);
Manager.removeOutfit(player, _slot);
_active.add(player);

View File

@ -1,6 +1,5 @@
package mineplex.core.gadget.types;
import java.time.YearMonth;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
@ -41,17 +40,7 @@ public abstract class ItemGadget extends Gadget
_ammo = ammo;
_recharge = recharge;
this._free = true;
}
public ItemGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data,
long recharge, Ammo ammo, YearMonth yearMonth)
{
super(manager, GadgetType.ITEM, name, desc, cost, mat, data, yearMonth);
_ammo = ammo;
_recharge = recharge;
this._free = true;
Free = true;
}
public ItemGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data,
@ -86,16 +75,16 @@ public abstract class ItemGadget extends Gadget
public void ApplyItem(Player player, boolean inform)
{
_manager.removeGadgetType(player, GadgetType.ITEM, this);
Manager.removeGadgetType(player, GadgetType.ITEM, this);
_active.add(player);
List<String> itemLore = new ArrayList<String>();
itemLore.addAll(Arrays.asList(getDescription()));
itemLore.add(C.cBlack);
itemLore.add(C.cWhite + "Your Ammo : " + _manager.getInventoryManager().Get(player).getItemCount(getName()));
itemLore.add(C.cWhite + "Your Ammo : " + Manager.getInventoryManager().Get(player).getItemCount(getName()));
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
if (inform)
UtilPlayer.message(player, F.main("Gadget", "You equipped " + F.elem(getName()) + "."));
@ -111,14 +100,14 @@ public abstract class ItemGadget extends Gadget
final Player player = event.getPlayer();
Bukkit.getScheduler().scheduleSyncDelayedTask(_manager.getPlugin(), new Runnable()
Bukkit.getScheduler().scheduleSyncDelayedTask(Manager.getPlugin(), new Runnable()
{
public void run()
{
if (player.isOnline())
{
player.getInventory().remove(getDisplayMaterial());
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
UtilInv.Update(player);
}
}
@ -130,7 +119,7 @@ public abstract class ItemGadget extends Gadget
{
if (_active.remove(player))
{
player.getInventory().setItem(_manager.getActiveItemSlot(), null);
player.getInventory().setItem(Manager.getActiveItemSlot(), null);
if (message)
UtilPlayer.message(player, F.main("Gadget", "You unequipped " + F.elem(getName()) + "."));
@ -167,7 +156,7 @@ public abstract class ItemGadget extends Gadget
event.setCancelled(true);
//Stock
if (!hasAmmo(player) && !_ammo.isFree())
if (!hasAmmo(player))
{
UtilPlayer.message(player, F.main("Gadget", "You do not have any " + getName() + " left."));
@ -194,17 +183,16 @@ public abstract class ItemGadget extends Gadget
return;
}
if (!_ammo.isFree())
_manager.getInventoryManager().addItemToInventory(player, getName(), -1);
Manager.getInventoryManager().addItemToInventory(player, getName(), -1);
player.getInventory().setItem(_manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(_manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
player.getInventory().setItem(Manager.getActiveItemSlot(), ItemStackFactory.Instance.CreateStack(getDisplayMaterial(), getDisplayData(), 1, F.item(Manager.getInventoryManager().Get(player).getItemCount(getName()) + " " + getName())));
ActivateCustom(event.getPlayer());
}
public boolean hasAmmo(Player player)
{
return _manager.getInventoryManager().Get(player).getItemCount(getName()) > 0;
return Manager.getInventoryManager().Get(player).getItemCount(getName()) > 0;
}
public abstract void ActivateCustom(Player player);

View File

@ -25,7 +25,7 @@ public abstract class MorphGadget extends Gadget
public void applyArmor(Player player, boolean message)
{
_manager.removeGadgetType(player, GadgetType.MORPH, this);
Manager.removeGadgetType(player, GadgetType.MORPH, this);
_active.add(player);

View File

@ -51,7 +51,7 @@ public class MusicGadget extends Gadget
return;
}
if (!_manager.canPlaySongAt(player.getLocation()))
if (!Manager.canPlaySongAt(player.getLocation()))
{
UtilPlayer.message(player, F.main("Music", "There is already a song playing."));
return;

View File

@ -59,9 +59,9 @@ public abstract class OutfitGadget extends Gadget
public void applyArmor(Player player, boolean message)
{
_manager.removeGadgetType(player, GadgetType.MORPH, this);
Manager.removeGadgetType(player, GadgetType.MORPH, this);
_manager.removeOutfit(player, _slot);
Manager.removeOutfit(player, _slot);
_active.add(player);

View File

@ -40,7 +40,7 @@ public abstract class ParticleGadget extends Gadget
@Override
public void enableCustom(Player player, boolean message)
{
_manager.removeGadgetType(player, GadgetType.PARTICLE, this);
Manager.removeGadgetType(player, GadgetType.PARTICLE, this);
_active.add(player);
startEffect(player);
if (message)
@ -62,7 +62,7 @@ public abstract class ParticleGadget extends Gadget
if (UtilPlayer.isSpectator(player))
return false;
if (_manager.hideParticles())
if (Manager.hideParticles())
return false;
return true;

View File

@ -124,7 +124,7 @@ public abstract class WinEffectGadget extends Gadget
// Loads gadgets back when players are teleported to the arcade hub, after the win effect
for (Player player : UtilServer.getPlayers())
{
_manager.getUserGadgetPersistence().load(player);
Manager.getUserGadgetPersistence().load(player);
}
}
}
@ -311,7 +311,7 @@ public abstract class WinEffectGadget extends Gadget
profile.getProperties().putAll(((CraftPlayer) player).getHandle().getProfile().getProperties());
DisguisePlayer disguise = new DisguisePlayer(stand, profile);
_manager.getDisguiseManager().disguise(disguise);
Manager.getDisguiseManager().disguise(disguise);
return disguise;
}
@ -335,7 +335,7 @@ public abstract class WinEffectGadget extends Gadget
profile.getProperties().put("textures", skinData.getProperty());
DisguisePlayer disguise = new DisguisePlayer(stand, profile);
_manager.getDisguiseManager().disguise(disguise);
Manager.getDisguiseManager().disguise(disguise);
return disguise;
}
@ -466,7 +466,7 @@ public abstract class WinEffectGadget extends Gadget
*/
protected String getRank(Player player)
{
return _manager.getClientManager().Get(player).getRealOrDisguisedRank().getTag(true, true) + " " + C.Reset;
return Manager.getClientManager().Get(player).getRealOrDisguisedRank().getTag(true, true) + " " + C.Reset;
}
public int getGameTime()

View File

@ -12,7 +12,7 @@ public class DragonMount extends Mount<DragonData>
{
super (manager, name, displayMaterial, displayData, desc, cost);
_knownPackage = false;
KnownPackage = false;
}
@Override

View File

@ -36,7 +36,7 @@ public class HorseMount extends Mount<SingleEntityMountData<Horse>>
public HorseMount(MountManager manager, String name, String[] desc, Material displayMaterial, byte displayData, int cost, Color color, Style style, Variant variant, double jump, Material armor)
{
super (manager, name, displayMaterial, displayData, desc, cost);
_knownPackage = false;
KnownPackage = false;
_color = color;
_style = style;
@ -48,7 +48,7 @@ public class HorseMount extends Mount<SingleEntityMountData<Horse>>
public HorseMount(MountManager manager, String name, String[] desc, Material displayMaterial, byte displayData, int cost, Color color, Style style, Variant variant, double jump, Material armor, YearMonth yearMonth)
{
super (manager, name, displayMaterial, displayData, desc, cost, yearMonth);
_knownPackage = false;
KnownPackage = false;
_color = color;
_style = style;

View File

@ -33,7 +33,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
UtilText.splitLineToArray(C.cGray + "Cruise around town in your shiny new Minecart RX Turbo!", LineFormat.LORE),
15000);
_knownPackage = false;
KnownPackage = false;
}
public void enableCustom(Player player)

View File

@ -34,7 +34,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
UtilText.splitLineToArray(C.cGray + "Bounce around on your very own slime friend!", LineFormat.LORE),
15000);
_knownPackage = false;
KnownPackage = false;
}
public void enableCustom(Player player)

Some files were not shown because too many files have changed in this diff Show More