Revert freedom chest cosmetics

This commit is contained in:
cnr 2017-06-28 23:43:30 -07:00
parent ed67a44fef
commit dfe2a61b8f
129 changed files with 416 additions and 1905 deletions

View File

@ -6,7 +6,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Random; import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
@ -14,8 +13,6 @@ import org.bukkit.util.Vector;
public class UtilMath public class UtilMath
{ {
public static final double TAU = Math.PI * 2D;
public static double trim(int degree, double d) public static double trim(int degree, double d)
{ {
String format = "#.#"; String format = "#.#";
@ -335,119 +332,4 @@ public class UtilMath
return min; return min;
} }
/**
* Creates an array of points, arranged in a circle normal to a vector.
*
* @param center The center of the circle.
* @param normal A vector normal to the circle.
* @param radius The radius of the circle.
* @param points How many points to make up the circle.
*
* @return An array of points of the form <code>double[point #][x=0, y=1, z=3]</code>.
*/
public static double[][] normalCircle(Location center, Vector normal, double radius, int points)
{
return normalCircle(center.toVector(), normal, radius, points);
}
/**
* Creates an array of points, arranged in a circle normal to a vector.
*
* @param center The center of the circle.
* @param normal A vector normal to the circle.
* @param radius The radius of the circle.
* @param points How many points to make up the circle.
*
* @return An array of points of the form <code>double[point #][x=0, y=1, z=3]</code>.
*/
public static double[][] normalCircle(Vector center, Vector normal, double radius, int points)
{
Vector n = normal.clone().normalize();
Vector a = n.clone().add(new Vector(1, 1, 1)).crossProduct(n).normalize();
Vector b = n.getCrossProduct(a).normalize();
double[][] data = new double[points][3];
double interval = TAU / points;
double theta = 0;
for (int i = 0; i < points; i++)
{
data[i][0] = center.getX() + (radius * ((Math.cos(theta) * a.getX()) + (Math.sin(theta) * b.getX())));
data[i][1] = center.getY() + (radius * ((Math.cos(theta) * a.getY()) + (Math.sin(theta) * b.getY())));
data[i][2] = center.getZ() + (radius * ((Math.cos(theta) * a.getZ()) + (Math.sin(theta) * b.getZ())));
theta += interval;
}
return data;
}
/**
* Slightly randomize a location with a standard deviation of one.
*
* @param location The location to randomize.
*
* @return The original location, now gaussian-randomized.
*/
public static Location gauss(Location location)
{
return gauss(location, 1, 1, 1);
}
/**
* Slightly randomize a vector with a standard deviation of one.
*
* @param vector The location to randomize.
*
* @return The randomized vector, now gaussian-randomized.
*/
public static Vector gauss(Vector vector)
{
return gauss(vector, 1, 1, 1);
}
/**
* Slightly randomize a location with a standard deviation of one. <br>
*
* <b>This method only accepts positive values for all of its arguments.</b> <br>
*
* A good parameter set for small offsets is (loc, 10, 10, 10).
*
* @param location The location to randomize.
* @param x A granularity control for the x-axis, higher numbers = less randomness
* @param y A granularity control for the y-axis, higher numbers = less randomness
* @param z A granularity control for the z-axis, higher numbers = less randomness
*
* @return The original location, now gaussian-randomized
*/
public static Location gauss(Location location, double x, double y, double z)
{
return location.clone().add(
x <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / x),
y <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / y),
z <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / z));
}
/**
* Slightly randomize a vector with a standard deviation of one. <br>
*
* <b>This method only accepts positive values for all of its arguments.</b> <br>
*
* A good parameter set for small offsets is (loc, 10, 10, 10).
*
* @param vector The location to randomize.
* @param x A granularity control for the x-axis, higher numbers = less randomness
* @param y A granularity control for the y-axis, higher numbers = less randomness
* @param z A granularity control for the z-axis, higher numbers = less randomness
*
* @return The randomized vector, now gaussian-randomized
*/
public static Vector gauss(Vector vector, double x, double y, double z)
{
return vector.clone().add(new Vector(
x <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / x),
y <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / y),
z <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / z)));
}
} }

View File

@ -166,40 +166,7 @@ public class ShapeWings extends ShapeGrid implements CosmeticShape
"0$#######$0", "0$#######$0",
"$#########$" "$#########$"
}; };
public static final String[] MAPLE_LEAF = new String[]
{
"000000000000000000000000000$000000000000000000000000000",
"00000000000000000000000000$$$00000000000000000000000000",
"0000000000000000000000000$$#$$0000000000000000000000000",
"000000000000000000000000$$###$$000000000000000000000000",
"00000000000000000000000$$#####$$00000000000000000000000",
"0000000000000000$$$000$$#######$$000$$$0000000000000000",
"0000000000000000$#$$$$$#########$$$$$#$0000000000000000",
"0000000000000000$$###################$$0000000000000000",
"00000000000000000$###################$00000000000000000",
"00000000000$$0000$$#################$$0000$$00000000000",
"0$$$000000$$$$$000$#################$000$$$$$000000$$$0",
"00$$$$$$$$$###$$$0$$###############$$0$$$###$$$$$$$$$00",
"00$$############$$$$###############$$$$############$$00",
"000$$#############$$###############$$#############$$000",
"0000$$###########################################$$0000",
"00$$$#############################################$$$00",
"$$$#################################################$$$",
"00$$$$###########################################$$$$00",
"00000$$$#######################################$$$00000",
"00000000$$$$###############################$$$$00000000",
"00000000000$$$###########################$$$00000000000",
"0000000000000$$#########################$$0000000000000",
"0000000000000$$#########################$$0000000000000",
"0000000000000$##$$$$$$$$$$$#$$$$$$$$$$$##$0000000000000",
"000000000000$$$$$000000000$#$000000000$$$$$000000000000",
"00000000000000000000000000$#$00000000000000000000000000",
"00000000000000000000000000$#$00000000000000000000000000",
"00000000000000000000000000$#$00000000000000000000000000",
"00000000000000000000000000$#$00000000000000000000000000",
"00000000000000000000000000$$$00000000000000000000000000"
};
/** /**
* Default rotation to give the wings a little tilt when displayed on players for instance * Default rotation to give the wings a little tilt when displayed on players for instance

View File

@ -78,8 +78,6 @@ public class SkinData
public static final SkinData LARISSA = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTc0NjE0MTUxMzQsInByb2ZpbGVJZCI6Ijg1MmE4YWNmNzMzNzQwZDc5OWVjYjA4ZmQ5OTY1MGI1IiwicHJvZmlsZU5hbWUiOiJLaW5nQ3JhenlfIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0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c5YzI0NTFkOTk3MTdjZmVjNTdkYWQifX19","oRo6DIuhOTaXDkFsgwJ488LWqx5d1QpwtglwG1SdEvkbX1aCMGdZyDm9YIopQRjfBg0uYKQFetOZ1ZkdMmc/aKC5/dm0+Ema7g8AUzjwf4OaSLH1r4C1UJ4ruaNG5diBxNTkYnMa7yT8zvyEr22CA7lUOIgTh8ymBfSGK35RPhsn8jM0hDjdhjemBAlxKpiioByfmAQbwokNBOrXfh/PnKq+iJYg4WpMSZ1zo5Rr0CzLXwu+/T3dvrb6mg7qry7J3Lj5/qn6iIdBcjJBeyvy1sCo45jQ3Rzc6oL/84Vu5Dpn395EqUK8Sa7mdpVpATTcj56TCjkNNtDapXNqyO/IIQuzU4wnBKNQmZefaxRl6LV0DhZ8n8YQaPj6hH/mr2oDsd23+jejjqu6Y95ReTyukp06mIGqgekmrdZV2etML2oMAOTv9ieVvqtfo5gEomYs+NFAL7rMmzjAlhd17VOgqNRMpmJazAHWOYKl8KdOH99wGDe5XcyKHysh+qyHKMvhPJztIeAEaosynF/aGHghH2PM354KCuUVNmdR5G7UZUoG9ZA5ZU3EzZ854jeqxcqw3jzb6qL7A83QNuFqOsb87ugL/jO3QEDdQ9drdf3WAQauQGkU3nYBrls5wxoMrQ+Ceth+FtZw9a1v7dc+DEWOeJKCtOAIskb29pv6OcRe0Wk=");
// Comments this out for now, so it doesn't load the player profile // 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 // A better way to do this would check for the properties when getting the skull or the skin

View File

@ -418,22 +418,4 @@ public class UtilParticle
PlayParticleToAll(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist); PlayParticleToAll(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist);
} }
public static void playColoredParticle(java.awt.Color color, ParticleType particleType, Location location, int count, ViewDist dist, Player... players)
{
if (particleType != ParticleType.RED_DUST
&& particleType != ParticleType.MOB_SPELL_AMBIENT)
return;
PlayParticle(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist, players);
}
public static void playColoredParticleToAll(java.awt.Color color, ParticleType particleType, Location location, int count, ViewDist dist)
{
if (particleType != ParticleType.RED_DUST && particleType != ParticleType.MOB_SPELL_AMBIENT)
{
return;
}
PlayParticleToAll(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist);
}
} }

View File

@ -1,30 +1,17 @@
package mineplex.core.common.util.banner; package mineplex.core.common.util.banner;
import org.bukkit.DyeColor; import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.block.banner.Pattern; import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType; import org.bukkit.block.banner.PatternType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
import static org.bukkit.DyeColor.*;
import static org.bukkit.block.banner.PatternType.*;
public enum CountryFlag public enum CountryFlag
{ {
// Vetted
MINEPLEX("Mineplex", "Mineplexian", BLACK, new Pattern(ORANGE, TRIANGLE_TOP), new Pattern(BLACK, TRIANGLES_TOP),
new Pattern(ORANGE, STRIPE_LEFT), new Pattern(ORANGE, STRIPE_RIGHT), new Pattern(BLACK, BORDER),
new Pattern(BLACK, STRIPE_BOTTOM)),
USA("The United States of America", "American", RED, new Pattern(WHITE, STRIPE_SMALL), new Pattern(BLUE, SQUARE_TOP_RIGHT),
new Pattern(BLUE, SQUARE_TOP_RIGHT), new Pattern(BLUE, SQUARE_TOP_RIGHT)),
CANADA("Canada", "Canadian", WHITE, new Pattern(RED, CROSS), new Pattern(WHITE, STRIPE_LEFT), new Pattern(RED, STRIPE_MIDDLE),
new Pattern(WHITE, BORDER), new Pattern(RED, STRIPE_TOP), new Pattern(RED, STRIPE_BOTTOM)),
// Not Vetted
BRAZIL(DyeColor.GREEN, new Pattern(DyeColor.YELLOW, PatternType.RHOMBUS_MIDDLE), new Pattern(DyeColor.BLUE, PatternType.CIRCLE_MIDDLE)), BRAZIL(DyeColor.GREEN, new Pattern(DyeColor.YELLOW, PatternType.RHOMBUS_MIDDLE), new Pattern(DyeColor.BLUE, PatternType.CIRCLE_MIDDLE)),
USA(DyeColor.RED, new Pattern(DyeColor.WHITE, PatternType.STRIPE_SMALL), new Pattern(DyeColor.BLUE, PatternType.SQUARE_TOP_RIGHT)),
CANADA(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.STRIPE_TOP), new Pattern(DyeColor.RED, PatternType.STRIPE_BOTTOM),
new Pattern(DyeColor.RED, PatternType.CIRCLE_MIDDLE)),
UK(DyeColor.BLUE, new Pattern(DyeColor.WHITE, PatternType.STRIPE_DOWNLEFT), new Pattern(DyeColor.WHITE, PatternType.STRIPE_DOWNRIGHT), UK(DyeColor.BLUE, new Pattern(DyeColor.WHITE, PatternType.STRIPE_DOWNLEFT), new Pattern(DyeColor.WHITE, PatternType.STRIPE_DOWNRIGHT),
new Pattern(DyeColor.RED, PatternType.STRAIGHT_CROSS), new Pattern(DyeColor.RED, PatternType.CROSS)), new Pattern(DyeColor.RED, PatternType.STRAIGHT_CROSS), new Pattern(DyeColor.RED, PatternType.CROSS)),
IRELAND(DyeColor.WHITE, new Pattern(DyeColor.LIME, PatternType.STRIPE_TOP), new Pattern(DyeColor.ORANGE, PatternType.STRIPE_BOTTOM)), IRELAND(DyeColor.WHITE, new Pattern(DyeColor.LIME, PatternType.STRIPE_TOP), new Pattern(DyeColor.ORANGE, PatternType.STRIPE_BOTTOM)),
@ -67,47 +54,17 @@ public enum CountryFlag
new Pattern(DyeColor.GREEN, PatternType.STRIPE_CENTER), new Pattern(DyeColor.BLACK, PatternType.TRIANGLE_BOTTOM)), new Pattern(DyeColor.GREEN, PatternType.STRIPE_CENTER), new Pattern(DyeColor.BLACK, PatternType.TRIANGLE_BOTTOM)),
POLAND(DyeColor.RED, new Pattern(DyeColor.WHITE, PatternType.HALF_VERTICAL_MIRROR)); POLAND(DyeColor.RED, new Pattern(DyeColor.WHITE, PatternType.HALF_VERTICAL_MIRROR));
private final String _country; private DyeColor _baseColor;
private final String _adjective; private Pattern[] _patterns;
private final DyeColor _baseColor;
private final Pattern[] _patterns;
CountryFlag(String country, String adjective, DyeColor baseColor, Pattern... patterns) CountryFlag(DyeColor baseColor, Pattern... patterns){
{
_country = country;
_adjective = adjective;
_baseColor = baseColor; _baseColor = baseColor;
_patterns = patterns; _patterns = patterns;
} }
CountryFlag(DyeColor baseColor, Pattern... patterns)
{
this("", "", baseColor, patterns);
}
public ItemStack getBanner() public ItemStack getBanner()
{ {
ItemStack banner = new ItemStack(Material.BANNER); return UtilBanner.createBanner(_baseColor, _patterns);
BannerMeta bannerMeta = (BannerMeta) banner.getItemMeta();
bannerMeta.setBaseColor(_baseColor);
for (Pattern pattern : _patterns)
{
bannerMeta.addPattern(pattern);
}
banner.setItemMeta(bannerMeta);
return banner;
}
public String getCountryName()
{
return _country;
}
public String getCountryAdjective()
{
return _adjective;
} }
} }

View File

@ -1,6 +1,5 @@
package mineplex.core.cosmetic; package mineplex.core.cosmetic;
import mineplex.core.punish.Punish;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
@ -42,23 +41,19 @@ import mineplex.core.twofactor.TwoFactorAuth;
public class CosmeticManager extends MiniPlugin public class CosmeticManager extends MiniPlugin
{ {
private final TwoFactorAuth _twofactor = Managers.require(TwoFactorAuth.class); private final TwoFactorAuth _twofactor = Managers.require(TwoFactorAuth.class);
private final InventoryManager _inventoryManager; private InventoryManager _inventoryManager;
private final GadgetManager _gadgetManager; private GadgetManager _gadgetManager;
private final MountManager _mountManager; private MountManager _mountManager;
private final PetManager _petManager; private PetManager _petManager;
private final TreasureManager _treasureManager; private TreasureManager _treasureManager;
private final BoosterManager _boosterManager; private BoosterManager _boosterManager;
private final Punish _punish;
private CosmeticShop _shop; private CosmeticShop _shop;
private boolean _showInterface = true; private boolean _showInterface = true;
private int _interfaceSlot = 4; private int _interfaceSlot = 4;
public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager, PetManager petManager, TreasureManager treasureManager, BoosterManager boosterManager)
InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager,
PetManager petManager, TreasureManager treasureManager, BoosterManager boosterManager,
Punish punish)
{ {
super("Cosmetic Manager", plugin); super("Cosmetic Manager", plugin);
@ -68,7 +63,6 @@ public class CosmeticManager extends MiniPlugin
_petManager = petManager; _petManager = petManager;
_treasureManager = treasureManager; _treasureManager = treasureManager;
_boosterManager = boosterManager; _boosterManager = boosterManager;
_punish = punish;
_shop = new CosmeticShop(this, clientManager, donationManager, _moduleName); _shop = new CosmeticShop(this, clientManager, donationManager, _moduleName);
} }
@ -248,11 +242,6 @@ public class CosmeticManager extends MiniPlugin
{ {
return _boosterManager; return _boosterManager;
} }
public Punish getPunishManager()
{
return _punish;
}
public void displayUI(Player player) public void displayUI(Player player)
{ {

View File

@ -1,25 +0,0 @@
package mineplex.core.cosmetic.ui.button.open;
import mineplex.core.cosmetic.ui.page.FlagPage;
import mineplex.core.cosmetic.ui.page.HatPage;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.gadget.types.Gadget;
import org.bukkit.entity.Player;
/**
* @author J Teissler
* @date 6/26/17
*/
public class OpenFlags extends OpenPageButton
{
public OpenFlags(Menu menu, Gadget active)
{
super(menu, active);
}
@Override
protected void leftClick(Player player)
{
getMenu().getShop().openPageForPlayer(player, new FlagPage(getMenu().getPlugin(), getMenu().getShop(), getMenu().getClientManager(), getMenu().getDonationManager(), "Flags", player));
}
}

View File

@ -33,16 +33,12 @@ public class ArrowTrailPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.ARROW_TRAIL) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.ARROW_TRAIL) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -32,16 +32,12 @@ public class BalloonsPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (gadget.isActive(getPlayer())) if (gadget.isActive(getPlayer()))
{
addGlow(slot); addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26)
{
slot += 2; slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -22,6 +22,9 @@ import mineplex.core.gadget.types.OutfitGadget;
import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.ShopItem;
/**
* Created by shaun on 14-09-15.
*/
public class CostumePage extends GadgetPage public class CostumePage extends GadgetPage
{ {
public CostumePage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player) public CostumePage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player)

View File

@ -33,16 +33,12 @@ public class DeathEffectPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.DEATH) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.DEATH) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -33,16 +33,12 @@ public class DoubleJumpPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.DOUBLE_JUMP) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.DOUBLE_JUMP) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -1,58 +0,0 @@
package mineplex.core.cosmetic.ui.page;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import java.util.List;
public class FlagPage extends GadgetPage
{
public FlagPage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name,
Player player)
{
super(plugin, shop, clientManager, donationManager, name, player);
}
@Override
protected void buildPage()
{
int slot = 10;
List<Gadget> list = getPlugin().getGadgetManager().getGadgets(GadgetType.FLAG);
if(list != null)
for (Gadget gadget : list)
{
addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.FLAG) == gadget)
{
addGlow(slot);
}
slot++;
if (slot % 9 == 8)
{
slot += 2;
}
}
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()
{
public void onClick(Player player, ClickType clickType)
{
getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
}
});
}
}

View File

@ -12,6 +12,7 @@ import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
@ -20,6 +21,7 @@ import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilText; import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.button.GadgetButton; import mineplex.core.cosmetic.ui.button.GadgetButton;
@ -58,16 +60,12 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getInventoryManager().Get(getPlayer()).getItemCount(gadget.getDisplayName()) > 0) if (getPlugin().getInventoryManager().Get(getPlayer()).getItemCount(gadget.getDisplayName()) > 0)
{
addGlow(slot); addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26)
{
slot += 2; slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()
@ -368,6 +366,19 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
meta.setLore(itemLore); meta.setLore(itemLore);
gadgetItemStack.setItemMeta(meta); gadgetItemStack.setItemMeta(meta);
if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH
|| gadget.getGadgetType() == GadgetType.PARTICLE || gadget.getGadgetType() == GadgetType.DOUBLE_JUMP)
{
if (gadget.getCost(GlobalCurrency.TREASURE_SHARD) == -8)
{
gadgetItemStack = CountryFlag.USA.getBanner();
BannerMeta bannerMeta = (BannerMeta) gadgetItemStack.getItemMeta();
bannerMeta.setDisplayName(C.cGreen + C.Bold + gadget.getName());
bannerMeta.setLore(meta.getLore());
gadgetItemStack.setItemMeta(bannerMeta);
}
}
addButton(slot, new ShopItem(gadgetItemStack, false, false).hideInfo(), new DeactivateGadgetButton(gadget, this)); addButton(slot, new ShopItem(gadgetItemStack, false, false).hideInfo(), new DeactivateGadgetButton(gadget, this));
} }
else else
@ -378,6 +389,19 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
meta.setLore(itemLore); meta.setLore(itemLore);
gadgetItemStack.setItemMeta(meta); gadgetItemStack.setItemMeta(meta);
if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH
|| gadget.getGadgetType() == GadgetType.PARTICLE || gadget.getGadgetType() == GadgetType.DOUBLE_JUMP)
{
if (gadget.getCost(GlobalCurrency.TREASURE_SHARD) == -8)
{
gadgetItemStack = CountryFlag.USA.getBanner();
BannerMeta bannerMeta = (BannerMeta) gadgetItemStack.getItemMeta();
bannerMeta.setDisplayName(C.cGreen + C.Bold + gadget.getName());
bannerMeta.setLore(meta.getLore());
gadgetItemStack.setItemMeta(bannerMeta);
}
}
/*if (gadget instanceof MorphStray) /*if (gadget instanceof MorphStray)
{ {
gadgetItemStack = UtilItem.getVersionSpecificItem(_player, UtilPlayer.PlayerVersion._1_9, gadgetItemStack); gadgetItemStack = UtilItem.getVersionSpecificItem(_player, UtilPlayer.PlayerVersion._1_9, gadgetItemStack);

View File

@ -38,16 +38,12 @@ public class HatPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.HAT) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.HAT) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -31,16 +31,12 @@ public class KitSelectorPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.KIT_SELECTOR) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.KIT_SELECTOR) == gadget)
{
addGlow(slot); addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26 || slot == 35)
{
slot += 2; slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -5,9 +5,6 @@ import java.util.EnumMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.cosmetic.ui.button.open.OpenFlags;
import mineplex.core.itemstack.ItemBuilder;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -17,6 +14,7 @@ import mineplex.core.common.currency.GlobalCurrency;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText; import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.UtilUI;
import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.button.open.OpenArrowTrails; import mineplex.core.cosmetic.ui.button.open.OpenArrowTrails;
@ -42,9 +40,6 @@ import mineplex.core.mount.Mount;
import mineplex.core.pet.PetType; import mineplex.core.pet.PetType;
import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.ShopItem;
import mineplex.core.shop.page.ShopPageBase; import mineplex.core.shop.page.ShopPageBase;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop> public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
{ {
@ -69,46 +64,35 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
List<String> shardLore = new ArrayList<String>(); List<String> shardLore = new ArrayList<String>();
shardLore.add(" "); shardLore.add(" ");
shardLore.add(C.cGray + "These seem like they might come in"); shardLore.add(C.cGray + "This seems like it might come in");
shardLore.add(C.cGray + "handy. Maybe I should collect more!"); shardLore.add(C.cGray + "handy. Maybe I can collect more!");
ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false); ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false);
int deathSlot = 19; // Cosmetic Items
int jumpSlot = 28; int[] slots = UtilUI.getIndicesFor(15, 0, 5, 1);
int particleSlot = 1; /*int particleSlot = 9;//slots[0];
int winEffectSlot = 13; int arrowSlot = 11;//slots[1];
int shardSlot = 22; int jumpSlot = 13;//slots[2];
int arrowSlot = 10; int deathSlot = 15;//slots[3];
int tauntSlot = 31; int gadgetSlot = 27;//slots[4];
int gameModifierSlot = 21; int morphSlot = 29;//slots[5];
int kitSelectorSlot = 23; int mountSlot = 31;//slots[6];
int musicSlot = 48; int petSlot = 33;//slots[7];
int mountSlot = 50; int hatSlot = 35;//slots[8];
int balloonsSlot = 47; int costumeSlot = 45;//slots[9];
int petSlot = 51; int musicSlot = 47;//slots[10];
int gadgetSlot = 49; int tauntSlot = 49;//slots[11];
int hatSlot = 7; int winEffectSlot = 51;
int flagSlot = 34; int gameModifierSlot = 53;*/
int morphSlot = 25; int particleSlot = slots[0], arrowSlot = slots[1], jumpSlot = slots[2],
int costumeSlot = 16; deathSlot = slots[3], gadgetSlot = slots[4], morphSlot = slots[5],
mountSlot = slots[6], petSlot = slots[7], hatSlot = slots[8],
addItem(shardSlot, shards); costumeSlot = slots[9], musicSlot = slots[10], tauntSlot = slots[11],
winEffectSlot = slots[12], gameModifierSlot = slots[13], balloonsSlot = slots[14],
ItemStack pane = new ItemBuilder(Material.STAINED_GLASS_PANE).setData((byte)15).setTitle(C.cBlack).build(); kitSelectorSlot = balloonsSlot + 4;
for (int i = 0; i <= 45; i += 9) addItem(i, pane.clone());
for (int i = 8; i <= 53; i += 9) addItem(i, pane.clone());
for (int i = 37; i <= 43; ++i) addItem(i, pane.clone());
for (int i = 2; i <= 6; ++i) addItem(i, pane.clone());
for (int i = 11; i <= 29; i += 9) addItem(i, pane.clone());
for (int i = 15; i <= 33; i += 9) addItem(i, pane.clone());
addItem(12, pane.clone());
addItem(14, pane.clone());
addItem(30, pane.clone());
addItem(32, pane.clone());
addItem(46, pane.clone());
addItem(52, pane.clone());
addItem(kitSelectorSlot + 2, shards);
EnumMap<GadgetType, Integer> ownedCount = new EnumMap<>(GadgetType.class); EnumMap<GadgetType, Integer> ownedCount = new EnumMap<>(GadgetType.class);
EnumMap<GadgetType, Integer> maxCount = new EnumMap<>(GadgetType.class); EnumMap<GadgetType, Integer> maxCount = new EnumMap<>(GadgetType.class);
@ -203,7 +187,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
if (petActive != null) addGlow(petSlot); if (petActive != null) addGlow(petSlot);
type = GadgetType.HAT; type = GadgetType.HAT;
lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the others.", VISIBILITY_HUB, enabled.get(type)); lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the ladies.", VISIBILITY_HUB, enabled.get(type));
addButton(hatSlot, new ShopItem(Material.GOLD_HELMET, "Hats", lore, 1, false), new OpenHats(this, enabled.get(type))); addButton(hatSlot, new ShopItem(Material.GOLD_HELMET, "Hats", lore, 1, false), new OpenHats(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(hatSlot); if (enabled.containsKey(type)) addGlow(hatSlot);
@ -243,19 +227,6 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
lore = getLore(ownedCount.get(type), maxCount.get(type), "Click here to select different particles to indicate which kit you have selected!", VISIBILITY_GAME_HUB, enabled.get(type)); lore = getLore(ownedCount.get(type), maxCount.get(type), "Click here to select different particles to indicate which kit you have selected!", VISIBILITY_GAME_HUB, enabled.get(type));
addButton(kitSelectorSlot, new ShopItem(Material.LEVER, "Kit Selector Particles", lore, 1, false), new OpenKitSelector(this, enabled.get(type))); addButton(kitSelectorSlot, new ShopItem(Material.LEVER, "Kit Selector Particles", lore, 1, false), new OpenKitSelector(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(kitSelectorSlot); if (enabled.containsKey(type)) addGlow(kitSelectorSlot);
type = GadgetType.FLAG;
lore = getLore(ownedCount.get(type), maxCount.get(type), "Show off your country's flag!", VISIBILITY_HUB, enabled.get(type));
addButton(flagSlot, new ShopItem(Material.BANNER, "Flags", lore, 1, false), new OpenFlags(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(flagSlot);
// Copy over banner design
BannerMeta banner = (BannerMeta) CountryFlag.MINEPLEX.getBanner().getItemMeta();
BannerMeta meta = ((BannerMeta) getItem(flagSlot).getItemMeta());
meta.setBaseColor(banner.getBaseColor());
meta.setPatterns(banner.getPatterns());
meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS);
getItem(flagSlot).setItemMeta(meta);
} }
private String[] getLore(int ownedCount, int maxCount, String info, String visibility, Gadget enabled) private String[] getLore(int ownedCount, int maxCount, String info, String visibility, Gadget enabled)

View File

@ -32,19 +32,13 @@ public class MorphPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.MORPH) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.MORPH) == gadget)
{ if (!(gadget instanceof MorphBlock))
if (!(gadget instanceof MorphBlock)) addGlow(slot);
{
addGlow(slot);
}
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26 || slot == 35)
{
slot += 2; slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -46,10 +46,8 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
addMount(mount, slot); addMount(mount, slot);
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26)
{
slot += 2; slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -14,6 +14,9 @@ import mineplex.core.gadget.types.GadgetType;
import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.ShopItem;
import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.IButton;
/**
* Created by shaun on 14-09-15.
*/
public class MusicPage extends GadgetPage public class MusicPage extends GadgetPage
{ {
public MusicPage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player) public MusicPage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player)
@ -31,10 +34,8 @@ public class MusicPage extends GadgetPage
slot++; slot++;
if (slot % 9 == 8) if (slot == 17)
{
slot += 2; slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -31,16 +31,12 @@ public class ParticlePage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.PARTICLE) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.PARTICLE) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26 || slot == 35)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -231,23 +231,16 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26)
{
slot += 2; slot += 2;
}
} }
slot = 49; slot = 49;
for (PetExtra petExtra : PetExtra.values()) for (PetExtra petExtra : PetExtra.values())
{ {
List<String> itemLore = new ArrayList<String>(); List<String> itemLore = new ArrayList<String>();
if (getPlugin().getPunishManager().GetClient(_player.getName()).IsMuted()) if (!getPlugin().getPetManager().hasActivePet(getPlayer().getName()))
{
itemLore.add(C.cRed + "You may not rename pets while muted!");
getInventory().setItem(slot, new ShopItem(petExtra.getMaterial(), (byte)0, C.cRed + petExtra.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).getHandle());
}
else if (!getPlugin().getPetManager().hasActivePet(getPlayer().getName()))
{ {
itemLore.add(C.cWhite + "You must have an active pet to use this!"); itemLore.add(C.cWhite + "You must have an active pet to use this!");
getInventory().setItem(slot, new ShopItem(petExtra.getMaterial(), (byte)0, C.cRed + petExtra.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).getHandle()); getInventory().setItem(slot, new ShopItem(petExtra.getMaterial(), (byte)0, C.cRed + petExtra.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).getHandle());

View File

@ -38,16 +38,12 @@ public class TauntPage extends GadgetPage
addGadget(gadget, slot); addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.TAUNT) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.TAUNT) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 26)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -49,16 +49,12 @@ public class WinEffectPage extends GadgetPage
} }
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.WIN_EFFECT) == gadget) if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.WIN_EFFECT) == gadget)
{ addGlow(slot);
addGlow(slot);
}
slot++; slot++;
if (slot % 9 == 8) if (slot == 17 || slot == 26)
{ slot += 2;
slot += 2;
}
} }
addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton()

View File

@ -1,14 +1,9 @@
package mineplex.core.cosmetic.ui.page.custompet.name; package mineplex.core.cosmetic.ui.page.custompet.name;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilItem;
import mineplex.core.itemstack.ItemBuilder;
import mineplex.core.punish.PunishClient;
import net.minecraft.server.v1_8_R3.ItemStack; import net.minecraft.server.v1_8_R3.ItemStack;
import net.minecraft.server.v1_8_R3.Items; import net.minecraft.server.v1_8_R3.Items;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
@ -39,7 +34,6 @@ public class CustomPetTagPage extends ShopPageBase<CosmeticManager, CosmeticShop
getButtonMap().put(0, new CloseCustomPetButton()); getButtonMap().put(0, new CloseCustomPetButton());
getButtonMap().put(1, new CloseCustomPetButton()); getButtonMap().put(1, new CloseCustomPetButton());
getButtonMap().put(2, new SelectCustomPetTagButton(this)); getButtonMap().put(2, new SelectCustomPetTagButton(this));
} }
@Override @Override

View File

@ -10,17 +10,7 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.function.Predicate; import java.util.function.Predicate;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite;
import mineplex.core.gadget.gadgets.death.DeathMapleLeaf;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple;
import mineplex.core.gadget.gadgets.flag.FlagType;
import mineplex.core.gadget.gadgets.morph.MorphBobRoss; import mineplex.core.gadget.gadgets.morph.MorphBobRoss;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleAuraNiceness;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedomFireworks;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled;
import mineplex.core.gadget.set.SetCanadian;
import mineplex.core.gadget.types.FlagGadget;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -57,50 +47,50 @@ import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.gadget.event.GadgetEnableEvent; import mineplex.core.gadget.event.GadgetEnableEvent;
import mineplex.core.gadget.event.PlayerToggleSwimEvent; import mineplex.core.gadget.event.PlayerToggleSwimEvent;
import mineplex.core.gadget.event.TauntCommandEvent; import mineplex.core.gadget.event.TauntCommandEvent;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; import mineplex.core.gadget.gadgets.arrowtrail.cupidslove.ArrowTrailCupid;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; import mineplex.core.gadget.gadgets.arrowtrail.emerald.ArrowTrailEmerald;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; import mineplex.core.gadget.gadgets.arrowtrail.freedom.ArrowTrailFreedom;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailHalloween; import mineplex.core.gadget.gadgets.arrowtrail.halloween.ArrowTrailHalloween;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; import mineplex.core.gadget.gadgets.arrowtrail.howlingwinds.ArrowTrailStorm;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; import mineplex.core.gadget.gadgets.arrowtrail.music.ArrowTrailMusic;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; import mineplex.core.gadget.gadgets.arrowtrail.party.ArrowTrailConfetti;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; import mineplex.core.gadget.gadgets.arrowtrail.shadow.ArrowTrailShadow;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailSpring; import mineplex.core.gadget.gadgets.arrowtrail.spring.ArrowTrailSpring;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan; import mineplex.core.gadget.gadgets.arrowtrail.titan.ArrowTrailTitan;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; import mineplex.core.gadget.gadgets.arrowtrail.vampire.ArrowTrailBlood;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant; import mineplex.core.gadget.gadgets.arrowtrail.wisdom.ArrowTrailEnchant;
import mineplex.core.gadget.gadgets.balloons.BalloonItem; import mineplex.core.gadget.gadgets.balloons.BalloonItem;
import mineplex.core.gadget.gadgets.balloons.BalloonType; import mineplex.core.gadget.gadgets.balloons.BalloonType;
import mineplex.core.gadget.gadgets.death.DeathCandyCane; import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane;
import mineplex.core.gadget.gadgets.death.DeathPresentDanger; import mineplex.core.gadget.gadgets.death.christmas.DeathPresentDanger;
import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart;
import mineplex.core.gadget.gadgets.death.DeathEmerald; import mineplex.core.gadget.gadgets.death.emerald.DeathEmerald;
import mineplex.core.gadget.gadgets.death.DeathFreedom; import mineplex.core.gadget.gadgets.death.freedom.DeathFreedom;
import mineplex.core.gadget.gadgets.death.DeathFrostLord; import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord;
import mineplex.core.gadget.gadgets.death.DeathStorm; import mineplex.core.gadget.gadgets.death.howlingwinds.DeathStorm;
import mineplex.core.gadget.gadgets.death.DeathMusic; import mineplex.core.gadget.gadgets.death.music.DeathMusic;
import mineplex.core.gadget.gadgets.death.DeathPinataBurst; import mineplex.core.gadget.gadgets.death.party.DeathPinataBurst;
import mineplex.core.gadget.gadgets.death.DeathShadow; import mineplex.core.gadget.gadgets.death.shadow.DeathShadow;
import mineplex.core.gadget.gadgets.death.DeathSpring; import mineplex.core.gadget.gadgets.death.spring.DeathSpring;
import mineplex.core.gadget.gadgets.death.DeathTitan; import mineplex.core.gadget.gadgets.death.titan.DeathTitan;
import mineplex.core.gadget.gadgets.death.DeathBlood; import mineplex.core.gadget.gadgets.death.vampire.DeathBlood;
import mineplex.core.gadget.gadgets.death.DeathEnchant; import mineplex.core.gadget.gadgets.death.wisdom.DeathEnchant;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; import mineplex.core.gadget.gadgets.doublejump.cupidslove.DoubleJumpCupidsWings;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; import mineplex.core.gadget.gadgets.doublejump.emerald.DoubleJumpEmerald;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; import mineplex.core.gadget.gadgets.doublejump.freedom.DoubleJumpFreedom;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween; import mineplex.core.gadget.gadgets.doublejump.halloween.DoubleJumpHalloween;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; import mineplex.core.gadget.gadgets.doublejump.howlingwinds.DoubleJumpStorm;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; import mineplex.core.gadget.gadgets.doublejump.music.DoubleJumpMusic;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; import mineplex.core.gadget.gadgets.doublejump.party.DoubleJumpFirecracker;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; import mineplex.core.gadget.gadgets.doublejump.shadow.DoubleJumpShadow;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpSpring; import mineplex.core.gadget.gadgets.doublejump.spring.DoubleJumpSpring;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan; import mineplex.core.gadget.gadgets.doublejump.titan.DoubleJumpTitan;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; import mineplex.core.gadget.gadgets.doublejump.vampire.DoubleJumpBlood;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; import mineplex.core.gadget.gadgets.doublejump.wisdom.DoubleJumpEnchant;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.gemhunters.GameModifierMount; import mineplex.core.gadget.gadgets.gamemodifiers.gemhunters.GameModifierMount;
import mineplex.core.gadget.gadgets.gamemodifiers.gemhunters.MountType; import mineplex.core.gadget.gadgets.gamemodifiers.gemhunters.MountType;
@ -195,19 +185,19 @@ import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal;
import mineplex.core.gadget.gadgets.particle.ParticleWingsLove; import mineplex.core.gadget.gadgets.particle.ParticleWingsLove;
import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie; import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie;
import mineplex.core.gadget.gadgets.particle.ParticleYinYang; import mineplex.core.gadget.gadgets.particle.ParticleYinYang;
import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane;
import mineplex.core.gadget.gadgets.particle.ParticleHeart; import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart;
import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom;
import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord;
import mineplex.core.gadget.gadgets.particle.ParticleRain; import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain;
import mineplex.core.gadget.gadgets.particle.ParticleMusic; import mineplex.core.gadget.gadgets.particle.music.ParticleMusic;
import mineplex.core.gadget.gadgets.particle.ParticlePartyTime; import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime;
import mineplex.core.gadget.gadgets.particle.ParticleFoot; import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot;
import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo; import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo;
import mineplex.core.gadget.gadgets.particle.ParticleTitan; import mineplex.core.gadget.gadgets.particle.titan.ParticleTitan;
import mineplex.core.gadget.gadgets.particle.ParticleBlood; import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood;
import mineplex.core.gadget.gadgets.particle.ParticleEnchant; import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant;
import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt; import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt;
import mineplex.core.gadget.gadgets.taunts.EternalTaunt; import mineplex.core.gadget.gadgets.taunts.EternalTaunt;
import mineplex.core.gadget.gadgets.taunts.RainbowTaunt; import mineplex.core.gadget.gadgets.taunts.RainbowTaunt;
@ -376,7 +366,6 @@ public class GadgetManager extends MiniPlugin
addSet(new SetMusic(this)); addSet(new SetMusic(this));
addSet(new SetFreedom(this)); addSet(new SetFreedom(this));
addSet(new SetSpring(this)); addSet(new SetSpring(this));
addSet(new SetCanadian(this));
} }
private void createGadgets() private void createGadgets()
@ -470,40 +459,31 @@ public class GadgetManager extends MiniPlugin
// Particles // Particles
addGadget(new ParticleFoot(this)); addGadget(new ParticleFoot(this));
addGadget(new ParticleEmerald(this));
addGadget(new ParticleRain(this));
addGadget(new ParticleBlood(this));
addGadget(new ParticleEnchant(this));
addGadget(new ParticleMusic(this));
addGadget(new ParticlePartyTime(this));
addGadget(new ParticleHeart(this));
addGadget(new ParticleCandyCane(this));
addGadget(new ParticleFrostLord(this));
addGadget(new ParticleLegend(this));
addGadget(new ParticleTitan(this));
addGadget(new ParticleYinYang(this));
addGadget(new ParticleKing(this, _castleManager));
addGadget(new ParticleWingsPixie(this));
addGadget(new ParticleWingsDemons(this));
addGadget(new ParticleWingsInfernal(this));
addGadget(new ParticleWingsAngel(this));
addGadget(new ParticleWingsLove(this));
addGadget(new ParticleFireRings(this)); addGadget(new ParticleFireRings(this));
addGadget(new ParticleFairy(this)); addGadget(new ParticleFairy(this));
addGadget(new ParticleLegend(this));
addGadget(new ParticleChristmasTree(this)); addGadget(new ParticleFrostLord(this));
addGadget(new ParticleTitan(this));
addGadget(new ParticleCandyCane(this));
addGadget(new ParticleCoalFumes(this)); addGadget(new ParticleCoalFumes(this));
addGadget(new ParticlePartyTime(this));
addGadget(new ParticleHeart(this));
addGadget(new ParticleEmerald(this));
addGadget(new ParticleWingsDemons(this));
addGadget(new ParticleEnchant(this));
addGadget(new ParticleRain(this));
addGadget(new ParticleBlood(this));
addGadget(new ParticleMusic(this));
addGadget(new ParticleWingsAngel(this));
addGadget(new ParticleWingsInfernal(this));
addGadget(new ParticleWingsPixie(this));
addGadget(new ParticleYinYang(this));
addGadget(new ParticleFreedom(this));
addGadget(new ParticleChristmasTree(this));
addGadget(new ParticleWingsLove(this));
addGadget(new ParticleSpringHalo(this)); addGadget(new ParticleSpringHalo(this));
addGadget(new ParticleWingsBee(this)); addGadget(new ParticleWingsBee(this));
addGadget(new ParticleKing(this, _castleManager));
addGadget(new ParticleFreedom(this));
addGadget(new ParticleFreedomFireworks(this));
addGadget(new ParticleStarSpangled(this));
addGadget(new ParticleAuraNiceness(this));
addGadget(new ParticleCanadian(this));
// Arrow Trails // Arrow Trails
addGadget(new ArrowTrailFrostLord(this)); addGadget(new ArrowTrailFrostLord(this));
@ -520,7 +500,6 @@ public class GadgetManager extends MiniPlugin
addGadget(new ArrowTrailFreedom(this)); addGadget(new ArrowTrailFreedom(this));
addGadget(new ArrowTrailHalloween(this)); addGadget(new ArrowTrailHalloween(this));
addGadget(new ArrowTrailSpring(this)); addGadget(new ArrowTrailSpring(this));
addGadget(new ArrowTrailRedWhite(this));
// Death Effect // Death Effect
addGadget(new DeathFrostLord(this)); addGadget(new DeathFrostLord(this));
@ -537,7 +516,6 @@ public class GadgetManager extends MiniPlugin
addGadget(new DeathFreedom(this)); addGadget(new DeathFreedom(this));
addGadget(new DeathPresentDanger(this)); addGadget(new DeathPresentDanger(this));
addGadget(new DeathSpring(this)); addGadget(new DeathSpring(this));
addGadget(new DeathMapleLeaf(this));
// Double Jump // Double Jump
addGadget(new DoubleJumpFrostLord(this)); addGadget(new DoubleJumpFrostLord(this));
@ -554,7 +532,6 @@ public class GadgetManager extends MiniPlugin
addGadget(new DoubleJumpFreedom(this)); addGadget(new DoubleJumpFreedom(this));
addGadget(new DoubleJumpHalloween(this)); addGadget(new DoubleJumpHalloween(this));
addGadget(new DoubleJumpSpring(this)); addGadget(new DoubleJumpSpring(this));
addGadget(new DoubleJumpMaple(this));
// Hat // Hat
for (HatType hatType : HatType.values()) for (HatType hatType : HatType.values())
@ -648,10 +625,6 @@ public class GadgetManager extends MiniPlugin
addGadget(new BlowAKissTaunt(this)); addGadget(new BlowAKissTaunt(this));
addGadget(new RainbowTaunt(this)); addGadget(new RainbowTaunt(this));
// Flags
addGadget(new FlagGadget(this, FlagType.UNITED_STATES));
addGadget(new FlagGadget(this, FlagType.CANADA));
// Kit Selectors // Kit Selectors
addGadget(new WaterWingsKitSelector(this)); addGadget(new WaterWingsKitSelector(this));
addGadget(new HaloKitSelector(this)); addGadget(new HaloKitSelector(this));
@ -857,23 +830,6 @@ public class GadgetManager extends MiniPlugin
return null; return null;
} }
public FlagGadget getFlagGadget(FlagType type)
{
for (Gadget gadget : getGadgets(GadgetType.FLAG))
{
if(gadget instanceof FlagGadget)
{
FlagGadget flagGadget = (FlagGadget) gadget;
if (type.equals(flagGadget.getFlagType()))
{
return flagGadget;
}
}
}
return null;
}
public BalloonGadget getBalloonGadget(BalloonType balloonType) public BalloonGadget getBalloonGadget(BalloonType balloonType)
{ {
for (Gadget gadget : getGadgets(GadgetType.BALLOON)) for (Gadget gadget : getGadgets(GadgetType.BALLOON))

View File

@ -9,19 +9,19 @@ import org.bukkit.entity.Player;
import mineplex.core.command.CommandBase; import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank; import mineplex.core.common.Rank;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord;
import mineplex.core.gadget.gadgets.death.DeathCandyCane; import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane;
import mineplex.core.gadget.gadgets.death.DeathFrostLord; import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord;
import mineplex.core.gadget.gadgets.hat.HatType; import mineplex.core.gadget.gadgets.hat.HatType;
import mineplex.core.gadget.gadgets.item.ItemCoal; import mineplex.core.gadget.gadgets.item.ItemCoal;
import mineplex.core.gadget.gadgets.item.ItemFreezeCannon; import mineplex.core.gadget.gadgets.item.ItemFreezeCannon;
import mineplex.core.gadget.gadgets.item.ItemPartyPopper; import mineplex.core.gadget.gadgets.item.ItemPartyPopper;
import mineplex.core.gadget.gadgets.item.ItemSnowball; import mineplex.core.gadget.gadgets.item.ItemSnowball;
import mineplex.core.gadget.gadgets.morph.MorphSnowman; import mineplex.core.gadget.gadgets.morph.MorphSnowman;
import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord;
import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.Gadget;
import mineplex.core.mount.Mount; import mineplex.core.mount.Mount;

View File

@ -41,30 +41,13 @@ public class UnlockCosmeticsCommand extends CommandBase<GadgetManager>
{ {
addCosmetics(null, caller); addCosmetics(null, caller);
} }
else if (args.length >= 1) else if (args.length == 1)
{ {
if (args[0].equalsIgnoreCase("all")) Player player = Bukkit.getPlayer(args[0]);
if (player != null)
{ {
for (Player player : UtilServer.getPlayers()) addCosmetics(null, player);
{ UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!"));
if (player != null)
{
addCosmetics(null, player);
UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!"));
}
}
}
else
{
for (int i = 0; i < args.length; ++i)
{
Player player = Bukkit.getPlayer(args[i]);
if (player != null)
{
addCosmetics(null, player);
UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!"));
}
}
} }
} }
} }

View File

@ -1,77 +0,0 @@
package mineplex.core.gadget.gadgets.arrowtrail;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.ArrowEffectGadget;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Arrow;
import org.bukkit.util.Vector;
import java.awt.Color;
/**
* Trails a red and white double helix behind the arrow.
*/
public class ArrowTrailRedWhite extends ArrowEffectGadget
{
public ArrowTrailRedWhite(GadgetManager manager)
{
super(manager, "Red & White Arrows",
UtilText.splitLineToArray(C.cRed + "Killing you nicely.", LineFormat.LORE),
-8, Material.WOOL, (byte)0);
setDisplayItem(CountryFlag.CANADA.getBanner());
}
@Override
public void doTrail(Arrow arrow)
{
Vector v = arrow.getVelocity();
Vector up = UtilAlg.getUp(v);
Vector left = UtilAlg.getLeft(v);
Location loc = arrow.getLocation();
double amount = 2;
double ticks = 15;
for(int i = 0; i < amount; i++)
{
double rad = Math.PI*2.0;
rad += i/amount * rad;
rad += Math.PI*2*(arrow.getTicksLived()%ticks)/ticks;
double l = -Math.sin(rad);
double u = Math.cos(rad);
Vector vel = v.clone().add(up.clone().multiply(u)).add(left.clone().multiply(l));
vel.multiply(0.4);
if (i == 0)
{
for(int j = 0; j < 3; ++j)
{
UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, loc.clone().add(vel), 0, UtilParticle.ViewDist.NORMAL);
}
}
else
{
for(int j = 0; j < 3; ++j)
{
UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, loc.clone().add(vel), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
}
@Override
public void doHitEffect(Arrow arrow)
{
UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, arrow.getLocation(), 0, 0, 0, 0, 3, UtilParticle.ViewDist.NORMAL);
}
}

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.candycane;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.cupidslove;
import org.bukkit.Color; import org.bukkit.Color;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.emerald;
import mineplex.core.common.util.*; import mineplex.core.common.util.*;
import org.bukkit.Location; import org.bukkit.Location;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.freedom;
import java.awt.Color; import java.awt.Color;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.frostlord;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.halloween;
import java.awt.Color; import java.awt.Color;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.howlingwinds;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.music;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.party;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.shadow;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.spring;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.titan;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.vampire;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.arrowtrail; package mineplex.core.gadget.gadgets.arrowtrail.wisdom;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,45 +0,0 @@
package mineplex.core.gadget.gadgets.death;
import mineplex.core.blood.BloodEvent;
import mineplex.core.common.shape.ShapeWings;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DeathEffectGadget;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
/**
* Displays a giant maple leaf at the point of death.
*/
public class DeathMapleLeaf extends DeathEffectGadget
{
/** height off the ground of the leaf */
private static final double HEIGHT = 3;
private final ShapeWings _leafOuter = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1.0, 1.0, 1.0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF);
private final ShapeWings _leafInner = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0.7, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF);
public DeathMapleLeaf(GadgetManager manager)
{
super(manager, "Fallen Maple Leaf",
UtilText.splitLineToArray(C.cGray + "When you die in " + C.cRed + "Canada" + C.cGray + " you die in real life.", LineFormat.LORE),
-8, Material.WOOL, (byte) 0);
setDisplayItem(CountryFlag.CANADA.getBanner());
}
@Override
public void onBlood(Player player, BloodEvent event)
{
event.setCancelled(true);
Location loc = player.getLocation().add(0, HEIGHT, 0);
_leafOuter.display(loc);
_leafInner.display(loc);
}
}

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.candycane;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.christmas;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.cupidslove;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.emerald;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.freedom;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Location; import org.bukkit.Location;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.frostlord;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.howlingwinds;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.music;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.party;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.shadow;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.spring;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.titan;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.vampire;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.death; package mineplex.core.gadget.gadgets.death.wisdom;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,110 +0,0 @@
package mineplex.core.gadget.gadgets.doublejump;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class DoubleJumpMaple extends DoubleJumpEffectGadget
{
/**
* Amount of particles played per tick as a player flies through the air.
*/
private static final int PARTICLES = 50;
/**
* Vertical offset of the animation's center from the player's location.
*/
private static final float Y_OFFSET = 0.95f;
/**
* Divisor of the gaussian distribution of particles as the player flies through the air.
*/
private static final int DISTRIBUTION = 2;
/**
* Particle ring count when a player launches from the ground.
*/
private static final int LAUNCH_RINGS = 6;
/**
* The distance between launch rings.
*/
private static final float RING_SPACING = 0.4f;
/**
* Particles played per 1 unit radius.
*/
private static final int RING_DENSITY = 8;
private HashMap<Player, Long> _playerMap = new HashMap<>();
public DoubleJumpMaple(GadgetManager manager)
{
super(manager, "Maple Leap",
UtilText.splitLineToArray(C.cGray + "Jump higher than the maple trees!", LineFormat.LORE),
-8, Material.WOOL, (byte)0);
setDisplayItem(CountryFlag.CANADA.getBanner());
}
@Override
public void doEffect(Player player)
{
_playerMap.put(player, System.currentTimeMillis() + 1000);
float limit = (LAUNCH_RINGS * RING_SPACING) + RING_SPACING;
for (float r = RING_SPACING; r < limit; r++)
{
double[][] points = UtilMath.normalCircle(player.getLocation(), player.getVelocity(), r, Math.round(RING_DENSITY * r));
for (int i = 0; i < points.length; i++)
{
UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, new Location(player.getWorld(), points[i][0], points[i][1], points[i][2]),
null, 0, 1, UtilParticle.ViewDist.NORMAL);
}
}
}
@EventHandler
public void onUpdate(UpdateEvent event)
{
if(event.getType() != UpdateType.FASTEST)
{
return;
}
for(Iterator<Map.Entry<Player, Long>> it = _playerMap.entrySet().iterator(); it.hasNext();)
{
Map.Entry<Player, Long> e = it.next();
if(e.getValue() <= System.currentTimeMillis())
{
it.remove();
continue;
}
Location loc = e.getKey().getLocation().add(0, Y_OFFSET, 0);
for (int i = 0; i < PARTICLES; ++i)
{
UtilParticle.playColoredParticleToAll(java.awt.Color.RED, UtilParticle.ParticleType.RED_DUST,
UtilMath.gauss(loc, DISTRIBUTION, DISTRIBUTION, DISTRIBUTION), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
}

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.candycane;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -30,7 +30,7 @@ public class DoubleJumpCandyCane extends DoubleJumpEffectGadget
Location loc = player.getLocation(); Location loc = player.getLocation();
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL);
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 1), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 1), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL);
UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 2), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL);
} }
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.cupidslove;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.emerald;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.freedom;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.Material; import org.bukkit.Material;
@ -18,7 +18,7 @@ public class DoubleJumpFreedom extends DoubleJumpEffectGadget
{ {
super(manager, "Leap of Freedom", UtilText.splitLineToArray(UtilText.colorWords("FREEEEEEEEEEEDOM!", super(manager, "Leap of Freedom", UtilText.splitLineToArray(UtilText.colorWords("FREEEEEEEEEEEDOM!",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, Material.WOOL, ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, Material.WOOL,
(byte) 0); (byte) 14);
setDisplayItem(CountryFlag.USA.getBanner()); setDisplayItem(CountryFlag.USA.getBanner());
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.frostlord;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.halloween;
import java.awt.Color; import java.awt.Color;
import java.util.HashMap; import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.howlingwinds;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.music;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.party;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.shadow;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.spring;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
@ -38,7 +38,7 @@ public class DoubleJumpSpring extends DoubleJumpEffectGadget
{ {
for (int i = 50; i < 60; i++) for (int i = 50; i < 60; i++)
{ {
Item sunflower = player.getWorld().dropItem(player.getLocation().add(0.0, 0.2, 0.0), ItemStackFactory.Instance.CreateStack(Material.DOUBLE_PLANT, (byte) 0, 1, " " + i)); Item sunflower = player.getWorld().dropItem(player.getLocation().add(0.5, 1.5, 0.5), ItemStackFactory.Instance.CreateStack(Material.DOUBLE_PLANT, (byte) 0, 1, " " + i));
_items.add(sunflower); _items.add(sunflower);
Vector vel = new Vector(Math.sin(i * 9/5d), 0, Math.cos(i * 9/5d)); Vector vel = new Vector(Math.sin(i * 9/5d), 0, Math.cos(i * 9/5d));

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.titan;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.vampire;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.doublejump; package mineplex.core.gadget.gadgets.doublejump.wisdom;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,33 +0,0 @@
package mineplex.core.gadget.gadgets.flag;
import mineplex.core.common.util.banner.CountryFlag;
/**
* Cosmetic flags representing countries.
*/
public enum FlagType
{
UNITED_STATES(CountryFlag.USA, -8),
CANADA(CountryFlag.CANADA, -8),
;
private final CountryFlag _flag;
private final int _cost;
FlagType(CountryFlag flag, int cost)
{
_flag = flag;
_cost = cost;
}
public CountryFlag getFlag()
{
return _flag;
}
public int getCost()
{
return _cost;
}
}

View File

@ -22,11 +22,7 @@ public enum HatType
SNOWMAN("Snowman Head", UtilText.splitLineToArray(C.cGray + "Do you want to be a snowman?", LineFormat.LORE), -2, SkinData.SNOWMAN), SNOWMAN("Snowman Head", UtilText.splitLineToArray(C.cGray + "Do you want to be a snowman?", LineFormat.LORE), -2, SkinData.SNOWMAN),
TEDDY_BEAR("Teddy Bear", UtilText.splitLineToArray(C.cGray + "Aww, it's a cute teddy bear! What shall I name him?", LineFormat.LORE), -6, SkinData.TEDDY_BEAR), TEDDY_BEAR("Teddy Bear", UtilText.splitLineToArray(C.cGray + "Aww, it's a cute teddy bear! What shall I name him?", LineFormat.LORE), -6, SkinData.TEDDY_BEAR),
UNCLE_SAM("Uncle Sam Hat", UtilText.splitLineToArray(UtilText.colorWords("Uncle Sam has a big hat but now you can too.", ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, SkinData.UNCLE_SAM), UNCLE_SAM("Uncle Sam Hat", UtilText.splitLineToArray(UtilText.colorWords("Uncle Sam has a big hat but now you can too.", ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, SkinData.UNCLE_SAM),
PUMPKIN("Pumpkin Hat", UtilText.splitLineToArray(C.cGray + "Pumpkin on the head, don't end up dead!", LineFormat.LORE), -9, Material.PUMPKIN), PUMPKIN("Pumpkin Hat", UtilText.splitLineToArray(C.cGray + "Pumpkin on the head, don't end up dead!", LineFormat.LORE), -9, Material.PUMPKIN);
CANADA("Warm Canadian Hat", UtilText.splitLineToArray(C.cGray + "Keep your ears nice and warm while up north.", LineFormat.LORE), -8, SkinData.CANADA_HAT),
AMERICA("Patriotic American Hat", UtilText.splitLineToArray(C.cGray + "Careful not to get a big head.", LineFormat.LORE), -8, SkinData.AMERICA_HAT),
;
private final String _name; private final String _name;
private final String[] _lore; private final String[] _lore;

View File

@ -1,6 +1,5 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle;
import mineplex.core.common.util.UtilMath;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -28,7 +27,7 @@ public class ParticleCoalFumes extends ParticleGadget
@Override @Override
public void playParticle(Player player, UpdateEvent event) public void playParticle(Player player, UpdateEvent event)
{ {
if(event.getType() != UpdateType.FASTER) return; if(event.getType() != UpdateType.TICK) return;
float xz = 1; float xz = 1;
int amount = 5; int amount = 5;
@ -40,6 +39,6 @@ public class ParticleCoalFumes extends ParticleGadget
amount = 2; amount = 2;
} }
UtilParticle.playParticleFor(player, type, UtilMath.gauss(player.getLocation(), 2, 6, 2), xz, 0, xz, 0, amount, ViewDist.NORMAL); UtilParticle.playParticleFor(player, type, player.getLocation(), xz, 0, xz, 0, amount, ViewDist.NORMAL);
} }
} }

View File

@ -1,8 +1,6 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle;
import mineplex.core.common.util.UtilMath; import org.bukkit.Effect;
import mineplex.core.common.util.UtilParticle;
import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
@ -19,40 +17,12 @@ import mineplex.core.inventory.data.Item;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import java.awt.Color;
public class ParticleLegend extends ParticleGadget public class ParticleLegend extends ParticleGadget
{ {
private static final double PI = Math.PI;
private static final int BASE_PILLARS = 9;
private static final int PILLAR_VARIANCE = 8;
private static final int MOVING_PARTICLES = 8;
private static final double VERTICAL_SPEED = 0.1;
private static final double HEIGHT_VARIANCE = 0.8;
private static final double ROTATIONAL_SPEED = .03;
private static final double RADIAL_VARIANCE = 0.09;
private static final double BASE_RADIUS = 1.30;
private static final double HEIGHT_MODIFIER_BASE = 0.1;
private static final double HEIGHT_MODIFIER_MAX = 1.3;
private static final double HEIGHT_MODIFIER_INTERVAL = 0.15;
private static final Color[] SELECTABLE_COLORS = {
new Color(60, 170, 25),
new Color(33, 92, 13),
new Color(0, 0, 0)
};
private final int _pillars = pillars();
private final Color[] _colors = colors();
private final double[] _heights = heights();
private final double[] _verticals = verticals();
private final double[] _variance = variances();
private final double[] _thetas = thetas();
private final double[] _radii = radii();
public ParticleLegend(GadgetManager manager) public ParticleLegend(GadgetManager manager)
{ {
super(manager, "Legendary Aura", super(manager, "Legendary Aura",
UtilText.splitLineToArray(C.cGray + "Legendary energy protects you.", LineFormat.LORE), UtilText.splitLineToArray(C.cGray + "This particle will be updated soon! Yay!", LineFormat.LORE),
-1, -1,
Material.ENDER_PORTAL_FRAME, (byte)0); Material.ENDER_PORTAL_FRAME, (byte)0);
} }
@ -61,150 +31,11 @@ public class ParticleLegend extends ParticleGadget
public void playParticle(Player player, UpdateEvent event) public void playParticle(Player player, UpdateEvent event)
{ {
if (event.getType() != UpdateType.TICK) if (event.getType() != UpdateType.TICK)
{
return; return;
}
if (Manager.isMoving(player)) player.getWorld().playEffect(player.getLocation().add(0, 1, 0), Effect.ENDER_SIGNAL, 0);
{
for (int i = 0; i < MOVING_PARTICLES; i++)
{
if (_colors[i].getGreen() == 0)
{
UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.SMOKE,
UtilMath.gauss(player.getLocation(), 8, 4, 8), null, 0, 1, UtilParticle.ViewDist.NORMAL);
}
else
{
UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST,
UtilMath.gauss(player.getLocation(), 8, 4, 8), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
else
{
if (event.getTick() % (ROTATIONAL_SPEED * 100) == 0)
{
for (int i = 0; i < _pillars; i++)
{
_thetas[i] = rollover(_thetas[i], ROTATIONAL_SPEED);
_heights[i] = rollover(_heights[i], _verticals[i]);
double x = (_radii[i] * Math.cos(_thetas[i])) + player.getLocation().getX();
double z = (_radii[i] * Math.sin(_thetas[i])) + player.getLocation().getZ();
double y = (Math.sin(_heights[i]) * _variance[i]) + player.getLocation().getY();
for (double h = HEIGHT_MODIFIER_BASE; h <= HEIGHT_MODIFIER_MAX; h+= HEIGHT_MODIFIER_INTERVAL)
{
if (_colors[i].getGreen() == 0)
{
UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.SMOKE,
new Location(player.getWorld(), x, y + h, z), null, 0, 1, UtilParticle.ViewDist.NORMAL);
}
else
{
UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST,
new Location(player.getWorld(), x, y + h, z), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
}
}
} }
private double[] heights()
{
double[] array = new double[_pillars];
for (int i = 0; i < _pillars; i++)
{
array[i] = 6.28 * Math.random();
}
return array;
}
private double[] variances()
{
double[] array = new double[_pillars];
for (int i = 0; i < _pillars; i++)
{
array[i] = Math.random() * HEIGHT_VARIANCE;
}
return array;
}
private double[] verticals()
{
double[] array = new double[_pillars];
for (int i = 0; i < _pillars; i++)
{
array[i] = Math.random() * VERTICAL_SPEED;
}
return array;
}
private double[] thetas()
{
double[] array = new double[_pillars];
double theta = 0;
double interval = (2 * PI) / _pillars;
for (int i = 0; i < _pillars; i++)
{
array[i] = theta;
theta += interval;
}
return array;
}
private double[] radii()
{
double[] array = new double[_pillars];
for (int i = 0; i < _pillars; i++)
{
array[i] = BASE_RADIUS + (Math.random() * RADIAL_VARIANCE);
}
return array;
}
private Color[] colors()
{
Color[] array = new Color[_pillars];
for (int i = 0; i < _pillars; i++)
{
array[i] = SELECTABLE_COLORS[i % SELECTABLE_COLORS.length];
}
return array;
}
private int pillars()
{
return BASE_PILLARS + (int) ((Math.random() * PILLAR_VARIANCE) - (PILLAR_VARIANCE / 2));
}
private double rollover(double value, double additive)
{
value += additive;
if (value >= 2 * PI)
{
value = value - (2 * PI);
}
return value;
}
@EventHandler @EventHandler
public void legendOwner(PlayerJoinEvent event) public void legendOwner(PlayerJoinEvent event)
{ {

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.candycane;
import java.util.HashMap; import java.util.HashMap;
import java.util.UUID; import java.util.UUID;
@ -63,7 +63,7 @@ public class ParticleCandyCane extends ParticleGadget
UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL);
UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 1), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 1), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL);
UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 2), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL);
} }
@EventHandler @EventHandler

View File

@ -1,6 +1,5 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.cupidslove;
import mineplex.core.common.util.UtilMath;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
@ -38,11 +37,11 @@ public class ParticleHeart extends ParticleGadget
{ {
if(getSet() == null || !getSet().isActive(player)) return; if(getSet() == null || !getSet().isActive(player)) return;
UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1.2, 0), null, 0, 1, ViewDist.NORMAL); UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1, 0), null, 0, 1, ViewDist.NORMAL);
} }
else else
{ {
UtilParticle.playParticleFor(player, ParticleType.HEART, UtilMath.gauss(player.getLocation(), 1, 3, 1).add(0, 1.2, 0), null, 0, 1, ViewDist.NORMAL); UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.5f, 0.5f, 0.5f, 0, 1, ViewDist.NORMAL);
} }
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.emerald;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,194 +0,0 @@
package mineplex.core.gadget.gadgets.particle.freedom;
import mineplex.core.arcadeevents.CoreGameStartEvent;
import mineplex.core.arcadeevents.CoreGameStopEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilShapes;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.treasure.event.TreasureFinishEvent;
import mineplex.core.treasure.event.TreasureStartEvent;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockPhysicsEvent;
import java.awt.Color;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.Collectors;
/**
* Places flowers around the player with poofs of red and white
*/
public class ParticleAuraNiceness extends ParticleGadget
{
/** Radius within which flowers not allowed near treasure chests */
private static final int TREASURE_RADIUS = 4;
/** Horizontal offset for particle spawns */
private static final double H_FIELD = 0.5;
/** Vertical offset for particle spawns */
private static final double V_FIELD = 0.35;
/** How likely a flower is to be spawned (1/n) */
private static final int ROSE_PROBABILITY = 40;
/** Radius in which flowers are spawned */
private static final double ROSE_RADIUS = 2.5;
/** How many particles accompany each flower spawn */
private static final int PARTICLE_COUNT = 20;
/** List of blocks that have flowers in them */
private final Set<Block> _blocks = new HashSet<>();
/** Milliseconds for which flowers persist */
private final long DURATION = 5000;
/** Locations at which treasure is currently being opened */
private final Map<UUID, Location> _openingTreasure = new HashMap<>();
/** Whether flowers can be spawned in addition to particles */
private boolean _enabled = true;
public ParticleAuraNiceness(GadgetManager manager)
{
super(manager, "Aura of Niceness",
UtilText.splitLineToArray(C.cGray + "Canadians are always nice online.", LineFormat.LORE), -8, Material.WOOL,
(byte) 0);
setDisplayItem(CountryFlag.CANADA.getBanner());
}
@Override
public void playParticle(Player player, UpdateEvent event)
{
if (event.getType() != UpdateType.FASTER)
{
return;
}
for (Location location : _openingTreasure.values())
{
if (location.toVector().isInSphere(player.getLocation().toVector(), TREASURE_RADIUS))
{
return;
}
}
UtilShapes.getCircle(player.getLocation().subtract(0, 0.5, 0), false, ROSE_RADIUS).stream().map(Location::getBlock)
.collect(Collectors.toSet()).forEach(block ->
{
if (ThreadLocalRandom.current().nextInt(ROSE_PROBABILITY) == 0)
{
Block b = block.getRelative(BlockFace.UP);
if (b.isEmpty() && UtilBlock.fullSolid(block) && !UtilBlock.bottomSlab(block))
{
Location loc = b.getLocation().add(H_FIELD, V_FIELD, H_FIELD);
if (_enabled)
{
byte data = ThreadLocalRandom.current().nextInt(2) == 0 ? (byte) 4 : 6;
_blocks.add(b);
Manager.getBlockRestore().add(b, Material.RED_ROSE.getId(), data, DURATION);
}
for (int i = 0; i < PARTICLE_COUNT; ++i)
{
UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 4, 4, 4), 0, UtilParticle.ViewDist.NORMAL);
UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 4, 4, 4), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
});
for(Iterator<Block> it = _blocks.iterator(); it.hasNext();)
{
Block b = it.next();
if (b.getType() != Material.RED_ROSE)
{
it.remove();
Location loc = b.getLocation().add(H_FIELD, V_FIELD, H_FIELD);
for (int i = 0; i < PARTICLE_COUNT / 2; ++i)
{
UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 6, 6, 6), 0, UtilParticle.ViewDist.NORMAL);
UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 6, 6, 6), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
}
/**
* Stop flowers from popping off of blocks
*/
@EventHandler
public void onBlockFade(BlockPhysicsEvent event)
{
if (_blocks.contains(event.getBlock()))
{
event.setCancelled(true);
}
}
/**
* Disable flowers in the area around treasure being opened.
*/
@EventHandler(priority = EventPriority.LOW)
public void disableOnTreasureStart(TreasureStartEvent event)
{
_openingTreasure.put(event.getPlayer().getUniqueId(), event.getPlayer().getLocation());
Manager.getBlockRestore().restoreBlockAround(Material.CARPET, event.getPlayer().getLocation(), TREASURE_RADIUS);
}
/**
* Enable flowers in the area around treasure no longer being opened.
*/
@EventHandler(priority = EventPriority.HIGH)
public void enableOnTreasureFinish(TreasureFinishEvent event)
{
if (_openingTreasure.containsKey(event.getPlayer().getUniqueId()))
{
_openingTreasure.remove(event.getPlayer().getUniqueId());
}
}
/**
* Disable flowers on game start
*/
@EventHandler
public void onGameStart(CoreGameStartEvent event)
{
_enabled = false;
}
/**
* Enable flowers on game end
*/
@EventHandler
public void onGameEnd(CoreGameStopEvent event)
{
_enabled = true;
}
}

View File

@ -1,71 +0,0 @@
package mineplex.core.gadget.gadgets.particle.freedom;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
import java.awt.Color;
/**
* Leaves a trail behind the player with the colors of the Canadian flag.
*/
public class ParticleCanadian extends ParticleGadget
{
/** # of lines of particles */
private static final int STRAND_COUNT = 9;
/** How far apart each line of particles is */
private static final double STRAND_SPACING = 0.124;
/** How far off the floor the particles begin */
private static final double DISTANCE_FROM_FLOOR = 0.43;
public ParticleCanadian(GadgetManager manager)
{
super(manager, "Canadian Trail",
UtilText.splitLineToArray(C.cGray + "Lead the way to freedom!", LineFormat.LORE),
-8, Material.WOOL, (byte) 0);
setDisplayItem(CountryFlag.CANADA.getBanner());
}
@Override
public void playParticle(Player player, UpdateEvent event)
{
if (event.getType() != UpdateType.TICK)
{
return;
}
Location center = player.getLocation().subtract(player.getLocation().getDirection().multiply(0.4))
.subtract(0, 0.1, 0).add(0, DISTANCE_FROM_FLOOR, 0);
if (Manager.isMoving(player))
{
for (int i = 0; i < STRAND_COUNT; i++)
{
if (i < 3 || i > 5)
{
UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST,
center.add(0, STRAND_SPACING, 0), 0, UtilParticle.ViewDist.NORMAL);
}
else
{
UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST,
center.add(0, STRAND_SPACING, 0), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
}
}

View File

@ -1,59 +0,0 @@
package mineplex.core.gadget.gadgets.particle.freedom;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.concurrent.ThreadLocalRandom;
/**
* Small fireworks which explode around the player
*/
public class ParticleFreedomFireworks extends ParticleGadget
{
/** Block types to source for particles */
private static final Material[] BLOCKTYPES = {
Material.REDSTONE_BLOCK,
Material.LAPIS_BLOCK,
Material.QUARTZ_BLOCK
};
/** Amount of particles for each firework */
private static final int PARTICLE_COUNT = 20;
public ParticleFreedomFireworks(GadgetManager manager)
{
super(manager, "Freedom Fireworks",
UtilText.splitLineToArray(C.cGray + "Keep your patriotism close.", LineFormat.LORE),
-8, Material.WOOL, (byte) 0);
setDisplayItem(CountryFlag.USA.getBanner());
}
@Override
public void playParticle(Player player, UpdateEvent event)
{
if (event.getType() != UpdateType.FAST)
{
return;
}
String particle = UtilParticle.ParticleType.BLOCK_CRACK.getParticle(BLOCKTYPES[ThreadLocalRandom.current().nextInt(0, BLOCKTYPES.length)], 0);
Location location = UtilMath.gauss(player.getEyeLocation(), 1, 1, 1);
for (int i = 0; i < PARTICLE_COUNT; ++i)
{
UtilParticle.PlayParticleToAll(particle, location, null, 3.0f, 1, UtilParticle.ViewDist.NORMAL);
}
}
}

View File

@ -1,81 +0,0 @@
package mineplex.core.gadget.gadgets.particle.freedom;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilText;
import mineplex.core.common.util.banner.CountryFlag;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import net.minecraft.server.v1_8_R3.MinecraftServer;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.entity.Player;
import java.awt.*;
/**
* @author J Teissler
* @date 6/26/17
*/
public class ParticleStarSpangled extends ParticleGadget
{
private static final int STRAND_COUNT = 9;
private static final double STRAND_SPACING = 0.124;
private static final double DISTANCE_FROM_FLOOR = 0.43;
private static final Color BLUE = new Color(29, 26, 120);
public ParticleStarSpangled(GadgetManager manager)
{
super(manager, "Star Spangled Stripe",
UtilText.splitLineToArray(C.cGray + "Blaze a trail of freedom!", LineFormat.LORE),
-8, Material.WOOL, (byte) 0);
setDisplayItem(CountryFlag.USA.getBanner());
}
@Override
public void playParticle(Player player, UpdateEvent event)
{
if (event.getType() != UpdateType.TICK)
{
return;
}
Location center = player.getLocation().subtract(player.getLocation().getDirection().multiply(0.4))
.subtract(0, 0.1, 0).add(0, DISTANCE_FROM_FLOOR, 0);
if (Manager.isMoving(player))
{
for (int i = 0; i < STRAND_COUNT; i++)
{
if (i == 3 || i == 7)
{
if (player.getTicksLived() % 3 == 0)
{
UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.FIREWORKS_SPARK,
center.add(0, STRAND_SPACING, 0), 0f, 0f, 0f, 0f, 0, UtilParticle.ViewDist.NORMAL);
continue;
}
}
else if (i == 5)
{
if (player.getTicksLived() + 1 % 3 == 0)
{
UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.FIREWORKS_SPARK,
center.add(0, STRAND_SPACING, 0), 0f, 0f, 0f, 0f, 0, UtilParticle.ViewDist.NORMAL);
continue;
}
}
UtilParticle.playColoredParticleToAll(BLUE, UtilParticle.ParticleType.RED_DUST,
center.add(0, STRAND_SPACING, 0), 0, UtilParticle.ViewDist.NORMAL);
}
}
}
}

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.frostlord;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.howlingwinds;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.music;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.party;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.shadow;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.titan;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.vampire;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;

View File

@ -1,4 +1,4 @@
package mineplex.core.gadget.gadgets.particle; package mineplex.core.gadget.gadgets.particle.wisdom;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -35,12 +35,10 @@ public class BlowAKissTaunt extends TauntGadget
} }
@Override @Override
public boolean onStart(Player player) public void onStart(Player player)
{ {
if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics")) if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics"))
{ return;
return false;
}
HashSet<Material> ignore = new HashSet<>(); HashSet<Material> ignore = new HashSet<>();
ignore.add(Material.AIR); ignore.add(Material.AIR);
@ -48,8 +46,6 @@ public class BlowAKissTaunt extends TauntGadget
BlowAKissEffect blowAKissEffect = new BlowAKissEffect(player, loc, this); BlowAKissEffect blowAKissEffect = new BlowAKissEffect(player, loc, this);
blowAKissEffect.start(); blowAKissEffect.start();
return true;
} }
@Override @Override

View File

@ -6,8 +6,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.game.GameDisplay;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Color; import org.bukkit.Color;
import org.bukkit.FireworkEffect; import org.bukkit.FireworkEffect;
@ -30,7 +28,9 @@ import mineplex.core.common.util.UtilText;
import mineplex.core.disguise.disguises.DisguiseSkeleton; import mineplex.core.disguise.disguises.DisguiseSkeleton;
import mineplex.core.events.EnableArcadeSpawnEvent; import mineplex.core.events.EnableArcadeSpawnEvent;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.morph.managers.UtilMorph;
import mineplex.core.gadget.types.TauntGadget; import mineplex.core.gadget.types.TauntGadget;
import mineplex.core.game.GameDisplay;
import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.recharge.Recharge; import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
@ -41,8 +41,7 @@ public class EternalTaunt extends TauntGadget
private static final int COOLDOWN = 30000; private static final int COOLDOWN = 30000;
private static final int PVP_COOLDOWN = 10000; private static final int PVP_COOLDOWN = 10000;
private final Map<UUID, List<Item>> _clocks = new HashMap<>(); private Map<UUID, List<Item>> _clocks = new HashMap<>();
private final Map<UUID, DisguiseBase> _disguises = new HashMap<>();
public EternalTaunt(GadgetManager manager) public EternalTaunt(GadgetManager manager)
{ {
@ -51,48 +50,33 @@ public class EternalTaunt extends TauntGadget
C.cWhite + "Use /taunt in game to show how long you've been waiting.", C.cWhite + "Use /taunt in game to show how long you've been waiting.",
C.cRed + "Cannot be used while in PvP!"}, LineFormat.LORE), C.cRed + "Cannot be used while in PvP!"}, LineFormat.LORE),
-15, Material.WATCH, (byte) 0); -15, Material.WATCH, (byte) 0);
setCanPlayWithPvp(false); setCanPlayWithPvp(false);
setPvpCooldown(PVP_COOLDOWN); setPvpCooldown(PVP_COOLDOWN);
setShouldPlay(true); setShouldPlay(true);
setEventType(UpdateType.FAST); setEventType(UpdateType.FAST);
addDisabledGames(GameDisplay.Smash, GameDisplay.SmashTeams, GameDisplay.SmashDomination, GameDisplay.SmashTraining); addDisabledGames(GameDisplay.Smash, GameDisplay.SmashTeams, GameDisplay.SmashDomination);
} }
@Override @Override
public boolean onStart(Player player) public void onStart(Player player)
{ {
if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics")) if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics"))
{ return;
return false;
}
UtilFirework.playFirework(player.getLocation(), FireworkEffect.builder().with(FireworkEffect.Type.BALL_LARGE).withColor(Color.fromRGB(255, 175, 175)).withFade(Color.RED).build()); UtilFirework.playFirework(player.getLocation(), FireworkEffect.builder().with(FireworkEffect.Type.BALL_LARGE).withColor(Color.fromRGB(255, 175, 175)).withFade(Color.RED).build());
_clocks.put(player.getUniqueId(), new ArrayList<>()); _clocks.put(player.getUniqueId(), new ArrayList<>());
Bukkit.broadcastMessage(F.main("Taunt", F.name(player.getName()) + " waited so long they turned to bones.")); Bukkit.broadcastMessage(F.main("Taunt", F.name(player.getName()) + " waited so long they turned to bones."));
if (!Manager.getDisguiseManager().isDisguised(player)) DisguiseSkeleton disguiseSkeleton = new DisguiseSkeleton(player);
{ UtilMorph.disguise(player, disguiseSkeleton, Manager);
DisguiseSkeleton disguiseSkeleton = new DisguiseSkeleton(player);
disguiseSkeleton.setName(player.getName());
disguiseSkeleton.setCustomNameVisible(true);
disguiseSkeleton.showArmor();
Manager.getDisguiseManager().disguise(disguiseSkeleton);
_disguises.put(player.getUniqueId(), disguiseSkeleton);
}
return true;
} }
@Override @Override
public void onPlay(Player player) public void onPlay(Player player)
{ {
if (!_clocks.containsKey(player.getUniqueId())) if (!_clocks.containsKey(player.getUniqueId()))
{
return; return;
}
int i = getPlayerTicks(player); int i = getPlayerTicks(player);
@ -130,11 +114,7 @@ public class EternalTaunt extends TauntGadget
@Override @Override
public void onFinish(Player player) public void onFinish(Player player)
{ {
if (_disguises.containsKey(player.getUniqueId())) UtilMorph.undisguise(player, Manager.getDisguiseManager());
{
Manager.getDisguiseManager().undisguise(_disguises.remove(player.getUniqueId()));
}
if (_clocks.containsKey(player.getUniqueId())) if (_clocks.containsKey(player.getUniqueId()))
{ {
_clocks.get(player.getUniqueId()).forEach(c -> c.remove()); _clocks.get(player.getUniqueId()).forEach(c -> c.remove());

View File

@ -36,12 +36,10 @@ public class RainbowTaunt extends TauntGadget
} }
@Override @Override
public boolean onStart(Player player) public void onStart(Player player)
{ {
if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics")) if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics"))
{ return;
return false;
}
Vector dir = player.getLocation().getDirection(); Vector dir = player.getLocation().getDirection();
Vector sideA = dir.clone().setX(-dir.getZ()).setZ(dir.getX()); Vector sideA = dir.clone().setX(-dir.getZ()).setZ(dir.getX());
@ -53,8 +51,6 @@ public class RainbowTaunt extends TauntGadget
RainbowTauntEffect rainbowTauntEffect = new RainbowTauntEffect(start, Manager.getPlugin()); RainbowTauntEffect rainbowTauntEffect = new RainbowTauntEffect(start, Manager.getPlugin());
rainbowTauntEffect.setTargetLocation(new EffectLocation(end)); rainbowTauntEffect.setTargetLocation(new EffectLocation(end));
rainbowTauntEffect.start(); rainbowTauntEffect.start();
return true;
} }
@Override @Override

View File

@ -1,22 +0,0 @@
package mineplex.core.gadget.set;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite;
import mineplex.core.gadget.gadgets.death.DeathMapleLeaf;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian;
import mineplex.core.gadget.types.GadgetSet;
public class SetCanadian extends GadgetSet
{
public SetCanadian(GadgetManager manager)
{
super(manager, "Canadian", "2x Holiday Points while active (Titles)",
manager.getGadget(ArrowTrailRedWhite.class),
manager.getGadget(DeathMapleLeaf.class),
manager.getGadget(DoubleJumpMaple.class),
manager.getGadget(ParticleCanadian.class));
}
}

View File

@ -1,10 +1,10 @@
package mineplex.core.gadget.set; package mineplex.core.gadget.set;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane;
import mineplex.core.gadget.gadgets.death.DeathCandyCane; import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane;
import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane;
import mineplex.core.gadget.types.GadgetSet; import mineplex.core.gadget.types.GadgetSet;
public class SetCandyCane extends GadgetSet public class SetCandyCane extends GadgetSet

View File

@ -1,10 +1,10 @@
package mineplex.core.gadget.set; package mineplex.core.gadget.set;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; import mineplex.core.gadget.gadgets.arrowtrail.cupidslove.ArrowTrailCupid;
import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; import mineplex.core.gadget.gadgets.doublejump.cupidslove.DoubleJumpCupidsWings;
import mineplex.core.gadget.gadgets.particle.ParticleHeart; import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart;
import mineplex.core.gadget.types.GadgetSet; import mineplex.core.gadget.types.GadgetSet;
public class SetCupidsLove extends GadgetSet public class SetCupidsLove extends GadgetSet

View File

@ -1,10 +1,10 @@
package mineplex.core.gadget.set; package mineplex.core.gadget.set;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; import mineplex.core.gadget.gadgets.arrowtrail.emerald.ArrowTrailEmerald;
import mineplex.core.gadget.gadgets.death.DeathEmerald; import mineplex.core.gadget.gadgets.death.emerald.DeathEmerald;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; import mineplex.core.gadget.gadgets.doublejump.emerald.DoubleJumpEmerald;
import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald;
import mineplex.core.gadget.types.GadgetSet; import mineplex.core.gadget.types.GadgetSet;
public class SetEmerald extends GadgetSet public class SetEmerald extends GadgetSet

View File

@ -1,10 +1,10 @@
package mineplex.core.gadget.set; package mineplex.core.gadget.set;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; import mineplex.core.gadget.gadgets.arrowtrail.freedom.ArrowTrailFreedom;
import mineplex.core.gadget.gadgets.death.DeathFreedom; import mineplex.core.gadget.gadgets.death.freedom.DeathFreedom;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; import mineplex.core.gadget.gadgets.doublejump.freedom.DoubleJumpFreedom;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom;
import mineplex.core.gadget.types.GadgetSet; import mineplex.core.gadget.types.GadgetSet;
public class SetFreedom extends GadgetSet public class SetFreedom extends GadgetSet
@ -16,7 +16,7 @@ public class SetFreedom extends GadgetSet
manager.getGadget(ArrowTrailFreedom.class), manager.getGadget(ArrowTrailFreedom.class),
manager.getGadget(DeathFreedom.class), manager.getGadget(DeathFreedom.class),
manager.getGadget(DoubleJumpFreedom.class), manager.getGadget(DoubleJumpFreedom.class),
manager.getGadget(ParticleStarSpangled.class)); manager.getGadget(ParticleFreedom.class));
} }
} }

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