Merge remote-tracking branch 'remotes/origin/develop' into feature/boosters-final

# Conflicts:
#	Plugins/Mineplex.Core/src/mineplex/core/inventory/GemBooster.java
#	Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java
#	Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java
This commit is contained in:
Shaun Bennett 2016-06-23 23:02:26 -07:00
commit fd843b88cb
355 changed files with 4031 additions and 2591 deletions

View File

@ -21,19 +21,25 @@ public class SkinData
{ {
private static long _nameCount = -99999999999999L; private static long _nameCount = -99999999999999L;
public final static SkinData MOOSHROOM = new SkinData("eyJ0aW1lc3RhbXAiOjE0NDk4NzI0OTU0MTcsInByb2ZpbGVJZCI6ImE5ZDBjMDcyYmYxOTQwYTFhMTkzNjhkMDlkNTAwMjZlIiwicHJvZmlsZU5hbWUiOiJTcGlyaXR1c1NhbmN0dXMiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzIxOWJlYTU0Y2FkN2Q1OGFiNWRhNDA2YjBhOTJhYjNhODI0MjI1MjY2Nzc3ZTUzNGI3ZGI2YzM3MmRkZmY3ZiJ9fX0=","UoSif81+UyvkcaanU8KAMYBpw9mefAmWehE2liDUFvk+y0X/9NovsxTYVpIDCltTSpLW3sNgamvbj4Ybs+s6DbudPiEkvh0ER7Bv2v29UJw7RzIdr6/1g548X12zcnh5iPGz/P75uNRnSfTFQx0ed8P/GNkPIjWpDuJFxEj6KcPzrCAGMx+BVw1VwryBIYf9cCDHky8z0bxR89rjiIvPTBFI6MRhqI3vgpEBTySHDS+Ki0Hwl5oa3PwS6+jgYx/4RSfFsb+BawcvDk2Xpkt5UimvqZ5BceYLIfCt4KbShYipgLXLfYUZrntjPemd3SxthjxUuA07i44UxRdiC8uqy1twLT/HUS28gpk68lA/id9tKFwu1CUzshgcmvQPt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eol53FxhkkC+m2geC14k1zsZQLHDF3BgAG9+kFJ4UEoYRKF2Gy1FxeDCJtjYNdrYR8fdaUKRMcpBgEs+ZGe2U9EVVS/ZcBCjB7S+1Ne2bPzPFzTQPuBoMgggo1xbxBmQ5NyhYo4gwgj/xjSLIhb+5h7ioN1URfSRcfYdVv6RRO9l/u9l09jEom8y/jGRviefpEr+/e9iAl5Dd/6nzQgosBQja3NSfqYZmyuet2eI9zu61CObDTpR6yaCbNgBe/lWofRfULdpJpgjb4UNTBom3q82FcCiOe02OekGPw4+YlilhICBhajF5JzN8FKAdqI1osDcX3KuJgikYIW3voNaOP5YN3GXgilJNdou20KFC8ICq68HglgX7/0rLrWKIEoswnINIM6HcJbQuXncVPwQhV6K34Hlt/Na60="); // A better way to do this would check for the properties when getting the skull or the skin
// Might change on the next version
//public final static SkinData MOOSHROOM = new SkinData("eyJ0aW1lc3RhbXAiOjE0NDk4NzI0OTU0MTcsInByb2ZpbGVJZCI6ImE5ZDBjMDcyYmYxOTQwYTFhMTkzNjhkMDlkNTAwMjZlIiwicHJvZmlsZU5hbWUiOiJTcGlyaXR1c1NhbmN0dXMiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzIxOWJlYTU0Y2FkN2Q1OGFiNWRhNDA2YjBhOTJhYjNhODI0MjI1MjY2Nzc3ZTUzNGI3ZGI2YzM3MmRkZmY3ZiJ9fX0=","UoSif81+UyvkcaanU8KAMYBpw9mefAmWehE2liDUFvk+y0X/9NovsxTYVpIDCltTSpLW3sNgamvbj4Ybs+s6DbudPiEkvh0ER7Bv2v29UJw7RzIdr6/1g548X12zcnh5iPGz/P75uNRnSfTFQx0ed8P/GNkPIjWpDuJFxEj6KcPzrCAGMx+BVw1VwryBIYf9cCDHky8z0bxR89rjiIvPTBFI6MRhqI3vgpEBTySHDS+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vo89lMRdRbknPt2ZX5Flgyjgr4Rt0KtDvpL/hG4BUsTWryUZZMKxdd6DkZXYRtTogLUfHeDYIz+cZQ0aXGMtvX/ZYTXJfMi6FYbIHY/qEEDnWhDX5y+SPpaJaZByPsvzi+qbfcFGnJ6nqi9ccyZYnYpnI2IVBM/yO/VRXWHxfqvJ0VVvv5KsGmVbko2Jxo0SDCxUL2UTH2+eol53FxhkkC+m2geC14k1zsZQLHDF3BgAG9+kFJ4UEoYRKF2Gy1FxeDCJtjYNdrYR8fdaUKRMcpBgEs+ZGe2U9EVVS/ZcBCjB7S+1Ne2bPzPFzTQPuBoMgggo1xbxBmQ5NyhYo4gwgj/xjSLIhb+5h7ioN1URfSRcfYdVv6RRO9l/u9l09jEom8y/jGRviefpEr+/e9iAl5Dd/6nzQgosBQja3NSfqYZmyuet2eI9zu61CObDTpR6yaCbNgBe/lWofRfULdpJpgjb4UNTBom3q82FcCiOe02OekGPw4+YlilhICBhajF5JzN8FKAdqI1osDcX3KuJgikYIW3voNaOP5YN3GXgilJNdou20KFC8ICq68HglgX7/0rLrWKIEoswnINIM6HcJbQuXncVPwQhV6K34Hlt/Na60=");
private Property _skinProperty; private Property _skinProperty;

View File

@ -108,4 +108,10 @@ public class UtilFirework
UtilMath.random.nextBoolean() UtilMath.random.nextBoolean()
); );
} }
public static void playFreedomFirework(Location location)
{
playFirework(location, FireworkEffect.builder().withColor(Color.RED).withColor(Color.BLUE)
.withColor(Color.WHITE).withFade(Color.RED).withFade(Color.BLUE).withFade(Color.WHITE).build());
}
} }

View File

@ -1,5 +1,6 @@
package mineplex.core.common.util; package mineplex.core.common.util;
import org.bukkit.Color;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -341,5 +342,20 @@ public class UtilParticle
PlayParticle(particle, location, offsetX, offsetY, offsetZ, speed, count, dist, UtilServer.getPlayers()); PlayParticle(particle, location, offsetX, offsetY, offsetZ, speed, count, dist, UtilServer.getPlayers());
} }
public static void playColoredParticle(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(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

@ -937,4 +937,10 @@ public class UtilPlayer
return false; return false;
return true; return true;
} }
public static void removeAllowedCommands(Player player)
{
if (ALLOWED_COMMANDS.containsKey(player.getUniqueId()))
ALLOWED_COMMANDS.remove(player.getUniqueId());
}
} }

View File

@ -197,4 +197,14 @@ public class UtilServer
{ {
return Lists.newArrayList(getPlayers()); return Lists.newArrayList(getPlayers());
} }
public static boolean isTestServer()
{
return getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
}
public static boolean isHubServer()
{
return getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Lobby");
}
} }

View File

@ -751,4 +751,20 @@ public class UtilText
} }
return array; return array;
} }
public static String colorWords(String str, ChatColor... colors)
{
int c = 0, maxC = colors.length - 1;
StringBuilder stringBuilder = new StringBuilder();
for (String word : str.split(" "))
{
stringBuilder.append(colors[c]);
stringBuilder.append(word + " ");
if (c < maxC)
c++;
else
c = 0;
}
return stringBuilder.toString();
}
} }

View File

@ -0,0 +1,70 @@
package mineplex.core.common.util.banner;
import org.bukkit.DyeColor;
import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType;
import org.bukkit.inventory.ItemStack;
public enum CountryFlag
{
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),
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)),
Spain(DyeColor.YELLOW, new Pattern(DyeColor.RED, PatternType.STRIPE_LEFT), new Pattern(DyeColor.RED, PatternType.STRIPE_RIGHT)),
Japan(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.CIRCLE_MIDDLE)),
South_Sudan(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.STRIPE_LEFT), new Pattern(DyeColor.BLACK, PatternType.STRIPE_RIGHT),
new Pattern(DyeColor.GREEN, PatternType.TRIANGLE_BOTTOM)),
Jamaica(DyeColor.GREEN, new Pattern(DyeColor.BLACK, PatternType.TRIANGLE_TOP), new Pattern(DyeColor.BLACK, PatternType.TRIANGLES_BOTTOM),
new Pattern(DyeColor.YELLOW, PatternType.CROSS)),
Italy(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.STRIPE_TOP), new Pattern(DyeColor.GREEN, PatternType.STRIPE_BOTTOM)),
Senegal(DyeColor.YELLOW, new Pattern(DyeColor.RED, PatternType.STRIPE_TOP), new Pattern(DyeColor.GREEN, PatternType.STRIPE_BOTTOM),
new Pattern(DyeColor.GREEN, PatternType.CIRCLE_MIDDLE)),
France(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.STRIPE_TOP), new Pattern(DyeColor.BLUE, PatternType.STRIPE_BOTTOM)),
India(DyeColor.WHITE, new Pattern(DyeColor.ORANGE, PatternType.STRIPE_LEFT), new Pattern(DyeColor.GREEN, PatternType.STRIPE_RIGHT),
new Pattern(DyeColor.BLUE, PatternType.CIRCLE_MIDDLE)),
Belgium(DyeColor.YELLOW, new Pattern(DyeColor.BLACK, PatternType.STRIPE_BOTTOM), new Pattern(DyeColor.RED, PatternType.STRIPE_TOP)),
England(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.STRAIGHT_CROSS)),
Austria(DyeColor.RED, new Pattern(DyeColor.WHITE, PatternType.STRIPE_CENTER)),
Armenia(DyeColor.RED, new Pattern(DyeColor.BLUE, PatternType.STRIPE_CENTER), new Pattern(DyeColor.ORANGE, PatternType.STRIPE_RIGHT)),
Argentina(DyeColor.LIGHT_BLUE, new Pattern(DyeColor.WHITE, PatternType.STRIPE_CENTER), new Pattern(DyeColor.YELLOW, PatternType.CIRCLE_MIDDLE)),
Greece(DyeColor.LIGHT_BLUE, new Pattern(DyeColor.WHITE, PatternType.STRIPE_SMALL), new Pattern(DyeColor.LIGHT_BLUE, PatternType.SQUARE_BOTTOM_LEFT)),
Czech_Republic(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.HALF_VERTICAL_MIRROR), new Pattern(DyeColor.BLUE, PatternType.TRIANGLE_BOTTOM)),
Romania(DyeColor.YELLOW, new Pattern(DyeColor.BLUE, PatternType.STRIPE_BOTTOM), new Pattern(DyeColor.RED, PatternType.STRIPE_TOP)),
Honduras(DyeColor.WHITE, new Pattern(DyeColor.BLUE, PatternType.STRIPE_LEFT), new Pattern(DyeColor.BLUE, PatternType.STRIPE_RIGHT)),
Algeria(DyeColor.WHITE, new Pattern(DyeColor.LIME, PatternType.HALF_HORIZONTAL_MIRROR), new Pattern(DyeColor.RED, PatternType.CIRCLE_MIDDLE)),
Portugal(DyeColor.RED, new Pattern(DyeColor.GREEN, PatternType.STRIPE_TOP), new Pattern(DyeColor.YELLOW, PatternType.CIRCLE_MIDDLE)),
Bahrain(DyeColor.RED, new Pattern(DyeColor.WHITE, PatternType.TRIANGLES_BOTTOM)),
Germany(DyeColor.RED, new Pattern(DyeColor.BLACK, PatternType.STRIPE_LEFT), new Pattern(DyeColor.YELLOW, PatternType.STRIPE_RIGHT)),
Gabon(DyeColor.YELLOW, new Pattern(DyeColor.BLUE, PatternType.STRIPE_RIGHT), new Pattern(DyeColor.LIME, PatternType.STRIPE_LEFT)),
Scotland(DyeColor.BLUE, new Pattern(DyeColor.WHITE, PatternType.CROSS)),
Peru(DyeColor.WHITE, new Pattern(DyeColor.RED, PatternType.STRIPE_TOP), new Pattern(DyeColor.RED, PatternType.STRIPE_BOTTOM)),
Tanzania(DyeColor.LIME, new Pattern(DyeColor.LIGHT_BLUE, PatternType.DIAGONAL_RIGHT), new Pattern(DyeColor.BLACK, PatternType.STRIPE_DOWNLEFT)),
Morocco(DyeColor.RED, new Pattern(DyeColor.GREEN, PatternType.CIRCLE_MIDDLE)),
Solomon_Islands(DyeColor.GREEN, new Pattern(DyeColor.BLUE, PatternType.DIAGONAL_LEFT_MIRROR), new Pattern(DyeColor.YELLOW, PatternType.STRIPE_DOWNRIGHT)),
Switzerland(DyeColor.RED, new Pattern(DyeColor.WHITE, PatternType.STRAIGHT_CROSS), new Pattern(DyeColor.RED, PatternType.STRIPE_BOTTOM),
new Pattern(DyeColor.RED, PatternType.STRIPE_TOP)),
Finland(DyeColor.BLUE, new Pattern(DyeColor.WHITE, PatternType.SQUARE_BOTTOM_LEFT), new Pattern(DyeColor.WHITE, PatternType.SQUARE_BOTTOM_RIGHT),
new Pattern(DyeColor.WHITE, PatternType.HALF_HORIZONTAL), new Pattern(DyeColor.BLUE, PatternType.STRIPE_CENTER)),
South_Africa(DyeColor.WHITE, new Pattern(DyeColor.BLUE, PatternType.HALF_VERTICAL_MIRROR), new Pattern(DyeColor.RED, PatternType.HALF_VERTICAL),
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));
private DyeColor _baseColor;
private Pattern[] _patterns;
CountryFlag(DyeColor baseColor, Pattern... patterns){
_baseColor = baseColor;
_patterns = patterns;
}
public ItemStack getBanner()
{
return UtilBanner.createBanner(_baseColor, _patterns);
}
}

View File

@ -0,0 +1,25 @@
package mineplex.core.common.util.banner;
import org.bukkit.DyeColor;
import org.bukkit.Material;
import org.bukkit.block.banner.Pattern;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
public class UtilBanner
{
public static ItemStack createBanner(DyeColor baseColor, Pattern... patterns)
{
ItemStack banner = new ItemStack(Material.BANNER);
BannerMeta bannerMeta = (BannerMeta) banner.getItemMeta();
bannerMeta.setBaseColor(baseColor);
for (Pattern pattern : patterns)
{
bannerMeta.addPattern(pattern);
}
banner.setItemMeta(bannerMeta);
return banner;
}
}

View File

@ -0,0 +1,56 @@
package mineplex.core.common.util.particles;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilServer;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public class ColoredParticle extends ParticleData
{
private ParticleColor _color;
public ColoredParticle(UtilParticle.ParticleType particleType, ParticleColor color, Location location)
{
super(particleType, location);
if ((particleType == UtilParticle.ParticleType.RED_DUST || particleType == UtilParticle.ParticleType.MOB_SPELL_AMBIENT)
&& !(color instanceof DustSpellColor))
throw new IllegalArgumentException("RED_DUST and MOB_SPELL_AMBIENT particle types require a DustSpellColor!");
else if(particleType == UtilParticle.ParticleType.NOTE && !(color instanceof NoteColor))
throw new IllegalArgumentException("NOTE particle type requires a NoteColor!");
else if(particleType != UtilParticle.ParticleType.RED_DUST && particleType != UtilParticle.ParticleType.MOB_SPELL_AMBIENT
&& particleType != UtilParticle.ParticleType.NOTE)
throw new IllegalArgumentException("Particle Type must be RED_DUST, MOB_SPELL_AMBIENT!");
_particleType = particleType;
_color = color;
_location = location;
}
@Override
public void display(UtilParticle.ViewDist viewDist, Player... players)
{
float x = _color.getX();
if (_particleType == UtilParticle.ParticleType.RED_DUST && x == 0)
x = Float.MIN_NORMAL;
UtilParticle.PlayParticle(_particleType, _location, x, _color.getY(), _color.getZ(), 1, 0, viewDist, players);
}
@Override
public void display(UtilParticle.ViewDist viewDist)
{
display(viewDist, UtilServer.getPlayers());
}
@Override
public void display()
{
display(UtilParticle.ViewDist.NORMAL);
}
public void setColor(ParticleColor color)
{
_color = color;
}
}

View File

@ -0,0 +1,39 @@
package mineplex.core.common.util.particles;
import java.awt.*;
public class DustSpellColor extends ParticleColor
{
private int _red, _green, _blue;
public DustSpellColor(Color color)
{
_red = color.getRed();
_green = color.getGreen();
_blue = color.getBlue();
}
public DustSpellColor(int r, int g, int b)
{
_red = r;
_green = g;
_blue = b;
}
public float getX()
{
return (float) _red / 255f;
}
public float getY()
{
return (float) _green / 255f;
}
public float getZ()
{
return (float) _blue / 255f;
}
}

View File

@ -0,0 +1,14 @@
package mineplex.core.common.util.particles;
import mineplex.core.common.util.UtilParticle;
import org.bukkit.Location;
public class NormalParticle extends ParticleData
{
public NormalParticle(UtilParticle.ParticleType particleType, Location location)
{
super(particleType, location);
}
}

View File

@ -0,0 +1,39 @@
package mineplex.core.common.util.particles;
import java.awt.*;
public class NoteColor extends ParticleColor
{
private int _red, _green, _blue;
public NoteColor(Color color)
{
_red = color.getRed();
_green = color.getGreen();
_blue = color.getBlue();
}
public NoteColor(int r, int g, int b)
{
_red = r;
_green = g;
_blue = b;
}
public float getX()
{
return (float) _red / 24f;
}
public float getY()
{
return 0f;
}
public float getZ()
{
return 0f;
}
}

View File

@ -0,0 +1,14 @@
package mineplex.core.common.util.particles;
import java.awt.*;
public abstract class ParticleColor
{
public abstract float getX();
public abstract float getY();
public abstract float getZ();
}

View File

@ -0,0 +1,57 @@
package mineplex.core.common.util.particles;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilServer;
import org.bukkit.Location;
import org.bukkit.entity.Player;
public class ParticleData
{
protected UtilParticle.ParticleType _particleType;
protected Location _location;
public ParticleData(UtilParticle.ParticleType particleType, Location location)
{
_particleType = particleType;
_location = location;
}
/**
* Displays the particles for selected players
* @param viewDist The distance of the particle view
* @param players The players that will receive the particle
*/
public void display(UtilParticle.ViewDist viewDist, Player... players)
{
UtilParticle.PlayParticle(_particleType, _location, 0f, 0f, 0f, 0f, 1, viewDist);
}
/**
* Displays the particles for all the players
* @param viewDist The distance of the particle view
*/
public void display(UtilParticle.ViewDist viewDist)
{
display(viewDist, UtilServer.getPlayers());
}
/**
* Displays the particles for all the players, with a NORMAL view distance
*/
public void display()
{
display(UtilParticle.ViewDist.NORMAL);
}
public void setLocation(Location location)
{
_location = location;
}
public Location getLocation()
{
return _location;
}
}

View File

@ -1070,6 +1070,8 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
public void Quit(PlayerQuitEvent event) public void Quit(PlayerQuitEvent event)
{ {
_showCarl.remove(event.getPlayer().getName()); _showCarl.remove(event.getPlayer().getName());
// Removes from allow command map
UtilPlayer.removeAllowedCommands(event.getPlayer());
} }
@EventHandler @EventHandler

View File

@ -20,7 +20,7 @@ public class GemFountainSalesPackage extends SalesPackageBase
} }
@Override @Override
public void Sold(Player player, CurrencyType currencyType) public void sold(Player player, CurrencyType currencyType)
{ {
} }

View File

@ -178,7 +178,7 @@ public class CosmeticManager extends MiniPlugin
public void disableItemsForGame() public void disableItemsForGame()
{ {
_gadgetManager.DisableAll(); _gadgetManager.disableAll();
_mountManager.DisableAll(); _mountManager.DisableAll();
_petManager.DisableAll(); _petManager.DisableAll();
} }

View File

@ -29,7 +29,7 @@ public class MountButton implements IButton
{ {
public void run() public void run()
{ {
_page.getPlugin().getInventoryManager().addItemToInventory(null, player, _mount.GetName(), 1); _page.getPlugin().getInventoryManager().addItemToInventory(null, player, _mount.getName(), 1);
_page.refresh(); _page.refresh();
} }
}, _page, _mount, CurrencyType.TREASURE_SHARD, player)); }, _page, _mount, CurrencyType.TREASURE_SHARD, player));

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.activate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.activate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
@ -23,7 +23,7 @@ public class ActivateMountButton implements IButton
public void onClick(Player player, ClickType clickType) public void onClick(Player player, ClickType clickType)
{ {
_page.playAcceptSound(player); _page.playAcceptSound(player);
_mount.Enable(player); _mount.enable(player);
_page.getShop().openPageForPlayer(player, new Menu(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), player)); _page.getShop().openPageForPlayer(player, new Menu(_page.getPlugin(), _page.getShop(), _page.getClientManager(), _page.getDonationManager(), player));
} }
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.activate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.deactivate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.deactivate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
@ -21,7 +21,7 @@ public class DeactivateMountButton implements IButton
public void onClick(Player player, ClickType clickType) public void onClick(Player player, ClickType clickType)
{ {
_page.playAcceptSound(player); _page.playAcceptSound(player);
_mount.Disable(player); _mount.disable(player);
_page.refresh(); _page.refresh();
} }
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.deactivate;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -0,0 +1,22 @@
package mineplex.core.cosmetic.ui.button.open;
import mineplex.core.cosmetic.ui.page.BalloonsPage;
import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.gadget.types.Gadget;
import org.bukkit.entity.Player;
public class OpenBalloons extends OpenPageButton
{
public OpenBalloons(Menu menu, Gadget active)
{
super(menu, active);
}
@Override
protected void leftClick(Player player)
{
getMenu().getShop().openPageForPlayer(player, new BalloonsPage(getMenu().getPlugin(), getMenu().getShop(), getMenu().getClientManager(), getMenu().getDonationManager(), "Win Effects", player));
}
}

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,8 +1,8 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import mineplex.core.cosmetic.ui.page.GameModifierPage; import mineplex.core.cosmetic.ui.page.gamemodifiers.GameModifierPage;
import mineplex.core.cosmetic.ui.page.Menu; import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.Gadget;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import mineplex.core.cosmetic.ui.page.Menu; import mineplex.core.cosmetic.ui.page.Menu;
import mineplex.core.cosmetic.ui.page.MorphPage; import mineplex.core.cosmetic.ui.page.MorphPage;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
@ -29,7 +29,7 @@ public class OpenMounts implements IButton
if (_active != null) if (_active != null)
{ {
_menu.playAcceptSound(player); _menu.playAcceptSound(player);
_active.Disable(player); _active.disable(player);
_menu.refresh(); _menu.refresh();
} }
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;
@ -28,7 +28,7 @@ public abstract class OpenPageButton implements IButton
if (_active != null) if (_active != null)
{ {
_menu.playAcceptSound(player); _menu.playAcceptSound(player);
_active.Disable(player); _active.disable(player);
_menu.refresh(); _menu.refresh();
} }
} }

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.ClickType;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button; package mineplex.core.cosmetic.ui.button.open;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;

View File

@ -0,0 +1,53 @@
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;
public class BalloonsPage extends GadgetPage
{
public BalloonsPage(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 = 19;
for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Balloon))
{
addGadget(gadget, slot);
if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.Balloon) == gadget)
addGlow(slot);
slot++;
if (slot == 26)
slot = 28;
if(slot == 35)
slot = 37;
}
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

@ -38,7 +38,7 @@ public class CostumePage extends GadgetPage
for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Costume)) for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Costume))
{ {
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -1) if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -1)
continue; continue;
OutfitGadget outfitGadget = ((OutfitGadget) gadget); OutfitGadget outfitGadget = ((OutfitGadget) gadget);
@ -51,16 +51,16 @@ public class CostumePage extends GadgetPage
slot = offset + 1 + 18; //1 buffer to left, 18 = 2 lines down slot = offset + 1 + 18; //1 buffer to left, 18 = 2 lines down
if (outfitGadget.GetSlot() == OutfitGadget.ArmorSlot.Chest) if (outfitGadget.getSlot() == OutfitGadget.ArmorSlot.Chest)
slot += 9; slot += 9;
else if (outfitGadget.GetSlot() == OutfitGadget.ArmorSlot.Legs) else if (outfitGadget.getSlot() == OutfitGadget.ArmorSlot.Legs)
slot += 18; slot += 18;
else if (outfitGadget.GetSlot() == OutfitGadget.ArmorSlot.Boots) else if (outfitGadget.getSlot() == OutfitGadget.ArmorSlot.Boots)
slot += 27; slot += 27;
addGadget(gadget, slot); addGadget(gadget, slot);
if (gadget.IsActive(getPlayer())) if (gadget.isActive(getPlayer()))
addGlow(slot); addGlow(slot);
} }
@ -71,10 +71,10 @@ public class CostumePage extends GadgetPage
boolean gadgetDisabled = false; boolean gadgetDisabled = false;
for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Costume)) for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Costume))
{ {
if (gadget.IsActive(player)) if (gadget.isActive(player))
{ {
gadgetDisabled = true; gadgetDisabled = true;
gadget.Disable(player); gadget.disable(player);
} }
} }
@ -99,7 +99,7 @@ public class CostumePage extends GadgetPage
{ {
if (gadget instanceof ItemGadget) if (gadget instanceof ItemGadget)
{ {
if (getPlugin().getInventoryManager().Get(player).getItemCount(gadget.GetName()) <= 0) if (getPlugin().getInventoryManager().Get(player).getItemCount(gadget.getName()) <= 0)
{ {
purchaseGadget(player, gadget); purchaseGadget(player, gadget);
return; return;
@ -107,7 +107,7 @@ public class CostumePage extends GadgetPage
} }
playAcceptSound(player); playAcceptSound(player);
gadget.Enable(player); gadget.enable(player);
buildPage(); buildPage();
} }

View File

@ -4,10 +4,12 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import mineplex.core.common.util.banner.CountryFlag;
import org.bukkit.Material; 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;
@ -17,8 +19,8 @@ import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilPlayer;
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.ActivateGadgetButton; import mineplex.core.cosmetic.ui.button.activate.ActivateGadgetButton;
import mineplex.core.cosmetic.ui.button.DeactivateGadgetButton; import mineplex.core.cosmetic.ui.button.deactivate.DeactivateGadgetButton;
import mineplex.core.cosmetic.ui.button.GadgetButton; import mineplex.core.cosmetic.ui.button.GadgetButton;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.morph.MorphBlock; import mineplex.core.gadget.gadgets.morph.MorphBlock;
@ -46,12 +48,12 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Item)) for (Gadget gadget : getPlugin().getGadgetManager().getGadgets(GadgetType.Item))
{ {
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -3) if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -3)
continue; continue;
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++;
@ -80,7 +82,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
List<String> itemLore = new ArrayList<String>(); List<String> itemLore = new ArrayList<String>();
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.addAll(Arrays.asList(gadget.GetDescription())); itemLore.addAll(Arrays.asList(gadget.getDescription()));
if (gadget.getSet() != null) if (gadget.getSet() != null)
{ {
@ -89,7 +91,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
//Elements //Elements
for (Gadget cur : gadget.getSet().getGadgets()) for (Gadget cur : gadget.getSet().getGadgets())
itemLore.add(" "+ (cur.ownsGadget(getPlayer()) ? C.cDGreen : C.cDRed) + "" + (cur.IsActive(getPlayer()) ? C.cGreen : C.cGray) + cur.GetName()); itemLore.add(" "+ (cur.ownsGadget(getPlayer()) ? C.cDGreen : C.cDRed) + "" + (cur.isActive(getPlayer()) ? C.cGreen : C.cGray) + cur.getName());
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
@ -101,59 +103,64 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
if (!gadget.ownsGadget(getPlayer())) if (!gadget.ownsGadget(getPlayer()))
{ {
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -1) if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -1)
{ {
//Nothing //Nothing
} }
//Chest Unlocks //Chest Unlocks
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -2 || gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -2 || gadget.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Treasure Chests"); itemLore.add(C.cBlue + "Found in Treasure Chests");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -3) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -3)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Winter Holiday Treasure"); itemLore.add(C.cBlue + "Found in Winter Holiday Treasure");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -4) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -4)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Halloween Pumpkin Treasure"); itemLore.add(C.cBlue + "Found in Halloween Pumpkin Treasure");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -5) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -5)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Easter Holiday Treasure"); itemLore.add(C.cBlue + "Found in Easter Holiday Treasure");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -6) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -6)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Valentines Gifts"); itemLore.add(C.cBlue + "Found in Valentines Gifts");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -7) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -7)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Purchased from shop.mineplex.com"); itemLore.add(C.cBlue + "Purchased from shop.mineplex.com");
} }
else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -8)
{
itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Freedom Chests");
}
//Rank Unlocks //Rank Unlocks
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -10) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -10)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cAqua + "Unlocked with Ultra Rank"); itemLore.add(C.cAqua + "Unlocked with Ultra Rank");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -11) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -11)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cPurple + "Unlocked with Hero Rank"); itemLore.add(C.cPurple + "Unlocked with Hero Rank");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -12) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -12)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Unlocked with Legend Rank"); itemLore.add(C.cGreen + "Unlocked with Legend Rank");
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) == -13) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) == -13)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Unlocked with Titan Rank"); itemLore.add(C.cRed + "Unlocked with Titan Rank");
@ -166,15 +173,15 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
ItemGadget itemGadget = (ItemGadget)gadget; ItemGadget itemGadget = (ItemGadget)gadget;
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cWhite + "You own " + C.cGreen + getPlugin().getInventoryManager().Get(getPlayer()).getItemCount(gadget.GetName())); itemLore.add(C.cWhite + "You own " + C.cGreen + getPlugin().getInventoryManager().Get(getPlayer()).getItemCount(gadget.getName()));
// boolean canAffordAmmo = true; // boolean canAffordAmmo = true;
// if (itemGadget.getAmmo().GetCost(CurrencyType.Coins) > 0) // if (itemGadget.getAmmo().getCost(CurrencyType.Coins) > 0)
// { // {
// itemLore.add(C.cBlack); // itemLore.add(C.cBlack);
// itemLore.add(C.cWhite + ((ItemGadget)gadget).getAmmo().GetDisplayName() + " for " + C.cYellow + ((ItemGadget)gadget).getAmmo().GetCost(CurrencyType.Coins) + " Coins"); // itemLore.add(C.cWhite + ((ItemGadget)gadget).getAmmo().getDisplayName() + " for " + C.cYellow + ((ItemGadget)gadget).getAmmo().getCost(CurrencyType.Coins) + " Coins");
// //
// if (getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.Coins) >= itemGadget.getAmmo().GetCost(CurrencyType.Coins)) // if (getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.Coins) >= itemGadget.getAmmo().getCost(CurrencyType.Coins))
// { // {
// itemLore.add(C.cGreen + "Right-Click To Purchase"); // itemLore.add(C.cGreen + "Right-Click To Purchase");
// } // }
@ -190,11 +197,11 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Left-Click to Enable"); itemLore.add(C.cGreen + "Left-Click to Enable");
addButton(slot, new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false).hideInfo(), new ActivateGadgetButton(gadget, this)); addButton(slot, new ShopItem(gadget.getDisplayMaterial(), gadget.getDisplayData(), gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false).hideInfo(), new ActivateGadgetButton(gadget, this));
} }
else else
{ {
addButton(slot, new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo(), new ActivateGadgetButton(gadget, this)); addButton(slot, new ShopItem(gadget.getDisplayMaterial(), gadget.getDisplayData(), gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo(), new ActivateGadgetButton(gadget, this));
} }
return; return;
@ -205,11 +212,11 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
ItemStack item = ((HatGadget)gadget).getHelmetItem(); ItemStack item = ((HatGadget)gadget).getHelmetItem();
ItemMeta im = item.getItemMeta(); ItemMeta im = item.getItemMeta();
im.setDisplayName(C.cGreen + C.Bold + gadget.GetName()); im.setDisplayName(C.cGreen + C.Bold + gadget.getName());
if (gadget.ownsGadget(getPlayer())) if (gadget.ownsGadget(getPlayer()))
{ {
if (gadget.GetActive().contains(getPlayer())) if (gadget.getActive().contains(getPlayer()))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Disable"); itemLore.add(C.cGreen + "Click to Disable");
@ -230,29 +237,35 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
} }
else else
{ {
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0) if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + gadget.GetCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards"); itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + gadget.getCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards");
} }
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= gadget.GetCost(CurrencyType.TREASURE_SHARD)) if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= gadget.getCost(CurrencyType.TREASURE_SHARD))
{
itemLore.add(C.cBlack);
itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + gadget.getCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards");
}
if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= gadget.getCost(CurrencyType.TREASURE_SHARD))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Purchase"); itemLore.add(C.cGreen + "Click to Purchase");
addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo(), new GadgetButton(gadget, this)); addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo(), new GadgetButton(gadget, this));
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Not enough Treasure Shards."); itemLore.add(C.cRed + "Not enough Treasure Shards.");
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo()); setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo());
} }
else else
{ {
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo()); setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo());
} }
} }
@ -262,46 +275,81 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
//Standard //Standard
if (gadget.ownsGadget(getPlayer())) if (gadget.ownsGadget(getPlayer()))
{ {
if (gadget.GetActive().contains(getPlayer())) ItemStack gadgetItemStack = new ItemStack(gadget.getDisplayMaterial(), 1, gadget.getDisplayData());
ItemMeta meta = gadgetItemStack.getItemMeta();
meta.setDisplayName(C.cGreen + C.Bold + gadget.getName());
if (gadget.getActive().contains(getPlayer()))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Disable"); itemLore.add(C.cGreen + "Click to Disable");
addButton(slot, new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false).hideInfo(), new DeactivateGadgetButton(gadget, this)); meta.setLore(itemLore);
gadgetItemStack.setItemMeta(meta);
if (gadget.getGadgetType() == GadgetType.ArrowTrail || gadget.getGadgetType() == GadgetType.Death
|| gadget.getGadgetType() == GadgetType.Particle || gadget.getGadgetType() == GadgetType.DoubleJump)
{
if (gadget.getCost(CurrencyType.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));
} }
else else
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Enable"); itemLore.add(C.cGreen + "Click to Enable");
addButton(slot, new ShopItem(gadget.GetDisplayMaterial(), gadget.GetDisplayData(), gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false).hideInfo(), new ActivateGadgetButton(gadget, this)); meta.setLore(itemLore);
gadgetItemStack.setItemMeta(meta);
if (gadget.getGadgetType() == GadgetType.ArrowTrail || gadget.getGadgetType() == GadgetType.Death
|| gadget.getGadgetType() == GadgetType.Particle || gadget.getGadgetType() == GadgetType.DoubleJump)
{
if (gadget.getCost(CurrencyType.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 ActivateGadgetButton(gadget, this));
} }
} }
else else
{ {
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0) if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + gadget.GetCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards"); itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + gadget.getCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards");
} }
if (gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= gadget.GetCost(CurrencyType.TREASURE_SHARD)) if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= gadget.getCost(CurrencyType.TREASURE_SHARD))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Purchase"); itemLore.add(C.cGreen + "Click to Purchase");
addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo(), new GadgetButton(gadget, this)); addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo(), new GadgetButton(gadget, this));
} }
else if (gadget.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (gadget.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Not enough Treasure Shards."); itemLore.add(C.cRed + "Not enough Treasure Shards.");
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo()); setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo());
} }
else else
{ {
setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo()); setItem(slot, new ShopItem(Material.INK_SACK, (byte)8, gadget.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).hideInfo());
} }
} }
} }
@ -313,7 +361,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
{ {
ItemGadget itemGadget = (ItemGadget)gadget; ItemGadget itemGadget = (ItemGadget)gadget;
if (itemGadget.getAmmo().GetCost(CurrencyType.TREASURE_SHARD) < 0) if (itemGadget.getAmmo().getCost(CurrencyType.TREASURE_SHARD) < 0)
return; return;
} }
@ -326,7 +374,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
{ {
public void run() public void run()
{ {
getPlugin().getInventoryManager().addItemToInventory(getPlayer(), gadget.GetName(), (gadget instanceof ItemGadget ? ((ItemGadget) gadget).getAmmo().getQuantity() : gadget.getQuantity())); getPlugin().getInventoryManager().addItemToInventory(getPlayer(), gadget.getName(), (gadget instanceof ItemGadget ? ((ItemGadget) gadget).getAmmo().getQuantity() : gadget.getQuantity()));
refresh(); refresh();
} }
}, this, (gadget instanceof ItemGadget ? ((ItemGadget) gadget).getAmmo() : gadget), CurrencyType.TREASURE_SHARD, getPlayer())); }, this, (gadget instanceof ItemGadget ? ((ItemGadget) gadget).getAmmo() : gadget), CurrencyType.TREASURE_SHARD, getPlayer()));
@ -336,7 +384,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
{ {
// if (gadget instanceof ItemGadget) // if (gadget instanceof ItemGadget)
// { // {
// if (getPlugin().getInventoryManager().Get(player).getItemCount(gadget.GetName()) <= 0) // if (getPlugin().getInventoryManager().Get(player).getItemCount(gadget.getName()) <= 0)
// { // {
// purchaseGadget(player, gadget); // purchaseGadget(player, gadget);
// return; // return;
@ -344,9 +392,9 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
// } // }
playAcceptSound(player); playAcceptSound(player);
gadget.Enable(player); gadget.enable(player);
getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), player)); refresh();
} }
public void handleRightClick(Player player, Gadget gadget) public void handleRightClick(Player player, Gadget gadget)
@ -360,7 +408,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
public void deactivateGadget(Player player, Gadget gadget) public void deactivateGadget(Player player, Gadget gadget)
{ {
playAcceptSound(player); playAcceptSound(player);
gadget.Disable(player); gadget.disable(player);
refresh(); refresh();
} }
} }

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.EnumMap; import java.util.EnumMap;
import java.util.List; import java.util.List;
import mineplex.core.cosmetic.ui.button.open.*;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Creature; import org.bukkit.entity.Creature;
import org.bukkit.entity.EntityType; import org.bukkit.entity.EntityType;
@ -18,19 +19,6 @@ import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilText; import mineplex.core.common.util.UtilText;
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.OpenArrowTrails;
import mineplex.core.cosmetic.ui.button.OpenCostumes;
import mineplex.core.cosmetic.ui.button.OpenDeathAnimations;
import mineplex.core.cosmetic.ui.button.OpenDoubleJump;
import mineplex.core.cosmetic.ui.button.OpenGadgets;
import mineplex.core.cosmetic.ui.button.OpenGameModifiers;
import mineplex.core.cosmetic.ui.button.OpenHats;
import mineplex.core.cosmetic.ui.button.OpenMorphs;
import mineplex.core.cosmetic.ui.button.OpenMounts;
import mineplex.core.cosmetic.ui.button.OpenMusic;
import mineplex.core.cosmetic.ui.button.OpenParticles;
import mineplex.core.cosmetic.ui.button.OpenPets;
import mineplex.core.cosmetic.ui.button.OpenWinEffect;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType; import mineplex.core.gadget.types.GadgetType;
@ -79,7 +67,6 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
int tauntSlot = 49;//slots[11]; int tauntSlot = 49;//slots[11];
int winEffectSlot = 51; int winEffectSlot = 51;
int gameModifierSlot = 53; int gameModifierSlot = 53;
int boosterSlot = 52;// TODO
EnumMap<GadgetType, Integer> ownedCount = new EnumMap<GadgetType, Integer>(GadgetType.class); EnumMap<GadgetType, Integer> ownedCount = new EnumMap<GadgetType, Integer>(GadgetType.class);
EnumMap<GadgetType, Integer> maxCount = new EnumMap<GadgetType, Integer>(GadgetType.class); EnumMap<GadgetType, Integer> maxCount = new EnumMap<GadgetType, Integer>(GadgetType.class);
@ -113,7 +100,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
Mount<?> mountActive = getPlugin().getMountManager().getActive(getPlayer()); Mount<?> mountActive = getPlugin().getMountManager().getActive(getPlayer());
for (Mount<?> mount : getPlugin().getMountManager().getMounts()) for (Mount<?> mount : getPlugin().getMountManager().getMounts())
{ {
if (getDonationManager().Get(getPlayer()).OwnsUnknownPackage(mount.GetName()) || mount.HasMount(getPlayer())) if (getDonationManager().Get(getPlayer()).OwnsUnknownPackage(mount.getName()) || mount.hasMount(getPlayer()))
{ {
mountOwned++; mountOwned++;
} }
@ -165,7 +152,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
addButton(morphSlot, new ShopItem(Material.LEATHER, "Morphs", lore, 1, false), new OpenMorphs(this, enabled.get(type))); addButton(morphSlot, new ShopItem(Material.LEATHER, "Morphs", lore, 1, false), new OpenMorphs(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(morphSlot); if (enabled.containsKey(type)) addGlow(morphSlot);
lore = getLore(mountOwned, mountMax, "Why walk when you can ride? Summon fancy mounts to help you move in style.", "Usable in Lobbies", mountActive == null ? null : mountActive.GetName()); lore = getLore(mountOwned, mountMax, "Why walk when you can ride? Summon fancy mounts to help you move in style.", "Usable in Lobbies", mountActive == null ? null : mountActive.getName());
addButton(mountSlot, new ShopItem(Material.IRON_BARDING, "Mounts", lore, 1, false), new OpenMounts(this, mountActive)); addButton(mountSlot, new ShopItem(Material.IRON_BARDING, "Mounts", lore, 1, false), new OpenMounts(this, mountActive));
if (mountActive != null) addGlow(mountSlot); if (mountActive != null) addGlow(mountSlot);
@ -199,7 +186,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
}); });
type = GadgetType.WinEffect; type = GadgetType.WinEffect;
lore = getLore(ownedCount.get(type), maxCount.get(type), "Winning a game with your friends all good and dandy, but then being able to also show off awsome effects is even more fun!", "Usable in Lobbies", enabled.get(type)); lore = getLore(ownedCount.get(type), maxCount.get(type), "Winning a game with your friends all good and dandy, but then being able to also show off awesome effects is even more fun!", "Usable in Lobbies", enabled.get(type));
addButton(winEffectSlot, new ShopItem(Material.CAKE, "Win Effects", lore, 1, false), new OpenWinEffect(this, enabled.get(type))); addButton(winEffectSlot, new ShopItem(Material.CAKE, "Win Effects", lore, 1, false), new OpenWinEffect(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(winEffectSlot); if (enabled.containsKey(type)) addGlow(winEffectSlot);
@ -208,15 +195,11 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
lore = getLore(ownedCount.get(type), maxCount.get(type), "Cosmetic effects which changes appearances of objects in game", "Visible in Games", enabled.get(type)); lore = getLore(ownedCount.get(type), maxCount.get(type), "Cosmetic effects which changes appearances of objects in game", "Visible in Games", enabled.get(type));
addButton(gameModifierSlot, new ShopItem(Material.TORCH, "Game Modifiers", lore, 1, false), new OpenGameModifiers(this, enabled.get(type))); addButton(gameModifierSlot, new ShopItem(Material.TORCH, "Game Modifiers", lore, 1, false), new OpenGameModifiers(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(gameModifierSlot); if (enabled.containsKey(type)) addGlow(gameModifierSlot);
// addButton(boosterSlot, new ShopItem(Material.EMERALD, "Game Boosters",
// new String[]{C.Bold + "", C.cDGreen + C.Italics + "Coming soon!"}, 1, false),
// (player, clickType) -> openBoosters(player));
} }
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)
{ {
return getLore(ownedCount, maxCount, info, visibility, enabled == null ? null : enabled.GetName()); return getLore(ownedCount, maxCount, info, visibility, enabled == null ? null : enabled.getName());
} }
private String[] getLore(int ownedCount, int maxCount,String info, String visibility, String enabled) private String[] getLore(int ownedCount, int maxCount,String info, String visibility, String enabled)

View File

@ -13,8 +13,8 @@ import mineplex.core.common.CurrencyType;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
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.ActivateMountButton; import mineplex.core.cosmetic.ui.button.activate.ActivateMountButton;
import mineplex.core.cosmetic.ui.button.DeactivateMountButton; import mineplex.core.cosmetic.ui.button.deactivate.DeactivateMountButton;
import mineplex.core.cosmetic.ui.button.MountButton; import mineplex.core.cosmetic.ui.button.MountButton;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.mount.Mount; import mineplex.core.mount.Mount;
@ -58,105 +58,110 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
List<String> itemLore = new ArrayList<String>(); List<String> itemLore = new ArrayList<String>();
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.addAll(Arrays.asList(mount.GetDescription())); itemLore.addAll(Arrays.asList(mount.getDescription()));
if (!getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(mount.GetName())) if (!getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(mount.getName()))
{ {
if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -1) if (mount.getCost(CurrencyType.TREASURE_SHARD) == -1)
{ {
//Nothing //Nothing
} }
//Chest Unlocks //Chest Unlocks
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -2 || mount.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -2 || mount.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Treasure Chests"); itemLore.add(C.cBlue + "Found in Treasure Chests");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -3) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -3)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Winter Holiday Treasure"); itemLore.add(C.cBlue + "Found in Winter Holiday Treasure");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -4) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -4)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Halloween Pumpkin Treasure"); itemLore.add(C.cBlue + "Found in Halloween Pumpkin Treasure");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -5) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -5)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Easter Holiday Treasure"); itemLore.add(C.cBlue + "Found in Easter Holiday Treasure");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -6) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -6)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Valentines Holiday Treasure"); itemLore.add(C.cBlue + "Found in Valentines Holiday Treasure");
} }
else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -7)
{
itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Freedom Chests");
}
//Rank Unlocks //Rank Unlocks
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -10) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -10)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cAqua + "Unlocked with Ultra Rank"); itemLore.add(C.cAqua + "Unlocked with Ultra Rank");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -11) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -11)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cPurple + "Unlocked with Hero Rank"); itemLore.add(C.cPurple + "Unlocked with Hero Rank");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -12) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -12)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Unlocked with Legend Rank"); itemLore.add(C.cGreen + "Unlocked with Legend Rank");
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) == -13) else if (mount.getCost(CurrencyType.TREASURE_SHARD) == -13)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Unlocked with Titan Rank"); itemLore.add(C.cRed + "Unlocked with Titan Rank");
} }
} }
if (getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(mount.GetName())) if (getDonationManager().Get(getPlayer().getName()).OwnsUnknownPackage(mount.getName()))
{ {
if (mount.GetActive().containsKey(getPlayer())) if (mount.getActive().containsKey(getPlayer()))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Disable"); itemLore.add(C.cGreen + "Click to Disable");
addButton(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new DeactivateMountButton(mount, this)); addButton(slot, new ShopItem(mount.getDisplayMaterial(), mount.getDisplayData(), mount.getName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new DeactivateMountButton(mount, this));
} }
else else
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Enable"); itemLore.add(C.cGreen + "Click to Enable");
addButton(slot, new ShopItem(mount.GetDisplayMaterial(), mount.GetDisplayData(), mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new ActivateMountButton(mount, this)); addButton(slot, new ShopItem(mount.getDisplayMaterial(), mount.getDisplayData(), mount.getName(), itemLore.toArray(new String[itemLore.size()]), 1, false, false), new ActivateMountButton(mount, this));
} }
} }
else else
{ {
if (mount.GetCost(CurrencyType.TREASURE_SHARD) > 0) if (mount.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + mount.GetCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards"); itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + mount.getCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards");
} }
if (mount.GetCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= mount.GetCost(CurrencyType.TREASURE_SHARD)) if (mount.getCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= mount.getCost(CurrencyType.TREASURE_SHARD))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Purchase"); itemLore.add(C.cGreen + "Click to Purchase");
addButton(slot, new ShopItem(Material.INK_SACK, (byte) 7, mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false), new MountButton(mount, this)); addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, mount.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false), new MountButton(mount, this));
} }
else if (mount.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (mount.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Not enough Treasure Shards."); itemLore.add(C.cRed + "Not enough Treasure Shards.");
setItem(slot, new ShopItem(Material.INK_SACK, (byte) 7, mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false)); setItem(slot, new ShopItem(Material.INK_SACK, (byte) 8, mount.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
} }
else else
{ {
setItem(slot, new ShopItem(Material.INK_SACK, (byte) 7, mount.GetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false)); setItem(slot, new ShopItem(Material.INK_SACK, (byte) 8, mount.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false));
} }
} }

View File

@ -24,8 +24,8 @@ import mineplex.core.common.util.UtilPlayer;
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.PetSorter; import mineplex.core.cosmetic.ui.PetSorter;
import mineplex.core.cosmetic.ui.button.ActivatePetButton; import mineplex.core.cosmetic.ui.button.activate.ActivatePetButton;
import mineplex.core.cosmetic.ui.button.DeactivatePetButton; import mineplex.core.cosmetic.ui.button.deactivate.DeactivatePetButton;
import mineplex.core.cosmetic.ui.button.PetButton; import mineplex.core.cosmetic.ui.button.PetButton;
import mineplex.core.cosmetic.ui.button.RenamePetButton; import mineplex.core.cosmetic.ui.button.RenamePetButton;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
@ -58,54 +58,54 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
List<String> itemLore = new ArrayList<String>(); List<String> itemLore = new ArrayList<String>();
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGray + "Your very own " + pet.GetName() + "!"); itemLore.add(C.cGray + "Your very own " + pet.getName() + "!");
//Chest Unlocks //Chest Unlocks
if (!getPlugin().getPetManager().Get(getPlayer()).GetPets().containsKey(pet.GetPetType())) if (!getPlugin().getPetManager().Get(getPlayer()).GetPets().containsKey(pet.GetPetType()))
{ {
if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -1) if (pet.getCost(CurrencyType.TREASURE_SHARD) == -1)
{ {
//Nothing //Nothing
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -2 || pet.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -2 || pet.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Treasure Chests"); itemLore.add(C.cBlue + "Found in Treasure Chests");
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -3) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -3)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Winter Holiday Treasure"); itemLore.add(C.cBlue + "Found in Winter Holiday Treasure");
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -4) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -4)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Halloween Pumpkin Treasure"); itemLore.add(C.cBlue + "Found in Halloween Pumpkin Treasure");
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -5) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -5)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Easter Holiday Treasure"); itemLore.add(C.cBlue + "Found in Easter Holiday Treasure");
} }
//Rank Unlocks //Rank Unlocks
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -10) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -10)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cAqua + "Unlocked with Ultra Rank"); itemLore.add(C.cAqua + "Unlocked with Ultra Rank");
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -11) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -11)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cPurple + "Unlocked with Hero Rank"); itemLore.add(C.cPurple + "Unlocked with Hero Rank");
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -12) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -12)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Unlocked with Legend Rank"); itemLore.add(C.cGreen + "Unlocked with Legend Rank");
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) == -13) else if (pet.getCost(CurrencyType.TREASURE_SHARD) == -13)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Unlocked with Titan Rank"); itemLore.add(C.cRed + "Unlocked with Titan Rank");
@ -118,7 +118,7 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
String petName = getPlugin().getPetManager().Get(getPlayer()).GetPets().get(pet.GetPetType()); String petName = getPlugin().getPetManager().Get(getPlayer()).GetPets().get(pet.GetPetType());
if (petName == null) if (petName == null)
{ {
petName = pet.GetName(); petName = pet.getName();
} }
if (getPlugin().getPetManager().hasActivePet(getPlayer().getName()) && getPlugin().getPetManager().getActivePet(getPlayer().getName()).getType() == pet.GetPetType()) if (getPlugin().getPetManager().hasActivePet(getPlayer().getName()) && getPlugin().getPetManager().getActivePet(getPlayer().getName()).getType() == pet.GetPetType())
@ -145,20 +145,20 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
//Not Owned //Not Owned
else else
{ {
if (pet.GetCost(CurrencyType.TREASURE_SHARD) > 0) if (pet.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + pet.GetCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards"); itemLore.add(C.cWhiteB + "Cost: " + C.cAqua + pet.getCost(CurrencyType.TREASURE_SHARD) + " Treasure Shards");
} }
if (pet.GetCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= pet.GetCost(CurrencyType.TREASURE_SHARD)) if (pet.getCost(CurrencyType.TREASURE_SHARD) > 0 && getDonationManager().Get(getPlayer().getName()).GetBalance(CurrencyType.TREASURE_SHARD) >= pet.getCost(CurrencyType.TREASURE_SHARD))
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cGreen + "Click to Purchase"); itemLore.add(C.cGreen + "Click to Purchase");
addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, pet.GetPetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false), new PetButton(pet, this)); addButton(slot, new ShopItem(Material.INK_SACK, (byte) 8, pet.GetPetName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false), new PetButton(pet, this));
} }
else if (pet.GetCost(CurrencyType.TREASURE_SHARD) > 0) else if (pet.getCost(CurrencyType.TREASURE_SHARD) > 0)
{ {
itemLore.add(C.cBlack); itemLore.add(C.cBlack);
itemLore.add(C.cRed + "Not enough Treasure Shards."); itemLore.add(C.cRed + "Not enough Treasure Shards.");
@ -185,11 +185,16 @@ public class PetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
if (!getPlugin().getPetManager().hasActivePet(getPlayer().getName())) 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());
} }
else if (getPlugin().getPetManager().getActivePet(getPlayer().getName()).getType() != EntityType.WITHER) // Silverfish = Wither disguised
// Villager = Elf
// Zombie = Pumpkin
else if (getPlugin().getPetManager().getActivePet(getPlayer().getName()).getType() != EntityType.SILVERFISH
|| getPlugin().getPetManager().getActivePet(getPlayer().getName()).getType() != EntityType.VILLAGER
|| getPlugin().getPetManager().getActivePet(getPlayer().getName()).getType() != EntityType.ZOMBIE)
{ {
addButton(slot, new ShopItem(petExtra.GetMaterial(), (byte) 0, "Rename " + getPlugin().getPetManager().getActivePet(getPlayer().getName()).getCustomName() + " for " + C.cYellow + petExtra.GetCost(CurrencyType.TREASURE_SHARD) + C.cGreen + " Shards", itemLore.toArray(new String[itemLore.size()]), 1, false, false), new RenamePetButton(this)); addButton(slot, new ShopItem(petExtra.GetMaterial(), (byte) 0, "Rename " + getPlugin().getPetManager().getActivePet(getPlayer().getName()).getCustomName() + " for " + C.cYellow + petExtra.getCost(CurrencyType.TREASURE_SHARD) + C.cGreen + " Shards", itemLore.toArray(new String[itemLore.size()]), 1, false, false), new RenamePetButton(this));
} }
slot++; slot++;

View File

@ -92,7 +92,7 @@ public class PetTagPage extends ShopPageBase<CosmeticManager, CosmeticShop>
return; return;
} }
PetExtra tag = new PetExtra("Rename " + _pet.GetName() + " to " + _tagName, Material.NAME_TAG, 100); PetExtra tag = new PetExtra("Rename " + _pet.getName() + " to " + _tagName, Material.NAME_TAG, 100);
_pet.setDisplayName(C.cGreen + "Purchase " + _tagName); _pet.setDisplayName(C.cGreen + "Purchase " + _tagName);

View File

@ -1,8 +1,9 @@
package mineplex.core.cosmetic.ui.page; package mineplex.core.cosmetic.ui.page.gamemodifiers;
import java.util.List; import java.util.List;
import org.bukkit.Bukkit; import mineplex.core.cosmetic.ui.page.GadgetPage;
import mineplex.core.cosmetic.ui.page.Menu;
import org.bukkit.Material; 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;
@ -15,7 +16,7 @@ import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.types.GadgetGameModifier; import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.ShopItem;
@ -37,7 +38,7 @@ public class GameModifierPage extends GadgetPage
{ {
int own = 0; int own = 0;
int total = 0; int total = 0;
for(GadgetGameModifier g : getPlugin().getGadgetManager().getGameModifiers(type)) { for(GameModifierGadget g : getPlugin().getGadgetManager().getGameModifiers(type)) {
if(g.ownsGadget(getPlayer())) own++; if(g.ownsGadget(getPlayer())) own++;
total++; total++;
} }

View File

@ -1,5 +1,6 @@
package mineplex.core.cosmetic.ui.page; package mineplex.core.cosmetic.ui.page.gamemodifiers;
import mineplex.core.cosmetic.ui.page.GadgetPage;
import org.bukkit.Material; 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;
@ -11,7 +12,7 @@ import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
import mineplex.core.gadget.types.GadgetGameModifier; import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.ShopItem;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -47,7 +48,7 @@ public class GameModifierSubPage extends GadgetPage
{ {
int own = 0; int own = 0;
int total = 0; int total = 0;
for (GadgetGameModifier g : getPlugin().getGadgetManager().getGameModifiers(kitModifierType)) for (GameModifierGadget g : getPlugin().getGadgetManager().getGameModifiers(kitModifierType))
{ {
if (g.ownsGadget(getPlayer())) own++; if (g.ownsGadget(getPlayer())) own++;
total++; total++;
@ -83,12 +84,12 @@ public class GameModifierSubPage extends GadgetPage
} }
else else
{ {
for (GadgetGameModifier gadget : getPlugin().getGadgetManager().getGameModifiers(_type)) for (GameModifierGadget gadget : getPlugin().getGadgetManager().getGameModifiers(_type))
{ {
addGadget(gadget, slot); addGadget(gadget, slot);
if (gadget.IsActive(getPlayer())) if (gadget.isActive(getPlayer()))
addGlow(slot); addGlow(slot);
slot++; slot++;

View File

@ -1,14 +1,15 @@
package mineplex.core.cosmetic.ui.page; package mineplex.core.cosmetic.ui.page.gamemodifiers;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
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.page.GadgetPage;
import mineplex.core.donation.DonationManager; import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
import mineplex.core.gadget.types.GadgetGameModifier; import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.IButton;
import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.ShopItem;
import org.bukkit.Material; import org.bukkit.Material;
@ -37,7 +38,7 @@ public class KitGameModifierPage extends GadgetPage
int slot = 19; int slot = 19;
for (GadgetGameModifier gadget : getPlugin().getGadgetManager().getGameModifiers(_kitType)) for (GameModifierGadget gadget : getPlugin().getGadgetManager().getGameModifiers(_kitType))
{ {
if (gadget instanceof KitGameModifier) if (gadget instanceof KitGameModifier)
{ {
@ -46,18 +47,14 @@ public class KitGameModifierPage 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) slot += 2; if(slot%9 == 8) slot += 2;
} }
else
continue;
} }
else
continue;
} }
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

@ -344,9 +344,9 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
if (disguise.GetEntity() instanceof EntityPlayer && disguise instanceof DisguisePlayer) if (disguise.GetEntity() instanceof EntityPlayer && disguise instanceof DisguisePlayer)
{ {
if (!((EntityPlayer) disguise.GetEntity()).getName().equalsIgnoreCase(((DisguisePlayer) disguise).getName())) if (!(disguise.GetEntity()).getName().equalsIgnoreCase(((DisguisePlayer) disguise).getName()))
{ {
_blockedNames.add(((Player) disguise.GetEntity()).getName()); _blockedNames.add((disguise.GetEntity()).getName());
} }
} }

View File

@ -0,0 +1,13 @@
package mineplex.core.disguise.disguises;
import org.bukkit.entity.EntityType;
public class DisguiseAnimalBase extends DisguiseAnimal
{
public DisguiseAnimalBase(EntityType entityType, org.bukkit.entity.Entity entity)
{
super(entityType, entity);
}
}

View File

@ -21,9 +21,11 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.WorldServer; import net.minecraft.server.v1_8_R3.WorldServer;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo.EnumPlayerInfoAction; import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo.EnumPlayerInfoAction;
import net.minecraft.server.v1_8_R3.WorldSettings; import net.minecraft.server.v1_8_R3.WorldSettings;
import org.bukkit.entity.Entity;
public class DisguisePlayer extends DisguiseHuman public class DisguisePlayer extends DisguiseHuman
{ {
private Entity _entity;
private GameProfile _profile; private GameProfile _profile;
private boolean _sneaking; private boolean _sneaking;
private BlockFace _sleeping; private BlockFace _sleeping;
@ -32,6 +34,7 @@ public class DisguisePlayer extends DisguiseHuman
public DisguisePlayer(org.bukkit.entity.Entity entity) public DisguisePlayer(org.bukkit.entity.Entity entity)
{ {
super(entity); super(entity);
_entity = entity;
} }
public DisguisePlayer(org.bukkit.entity.Entity entity, GameProfile profile) public DisguisePlayer(org.bukkit.entity.Entity entity, GameProfile profile)
@ -170,4 +173,9 @@ public class DisguisePlayer extends DisguiseHuman
sendPacket(packet); sendPacket(packet);
} }
public org.bukkit.entity.Entity getEntity()
{
return _entity;
}
} }

View File

@ -1,12 +1,24 @@
package mineplex.core.gadget; package mineplex.core.gadget;
import java.util.ArrayList; import java.util.*;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.function.Predicate; import java.util.function.Predicate;
import mineplex.core.gadget.commands.LockCosmeticsCommand; import mineplex.core.gadget.commands.LockCosmeticsCommand;
import mineplex.core.gadget.event.GadgetEnableEvent;
import mineplex.core.gadget.gadgets.arrowtrail.freedom.ArrowTrailFreedom;
import mineplex.core.gadget.gadgets.death.freedom.DeathFreedom;
import mineplex.core.gadget.gadgets.doublejump.freedom.DoubleJumpFreedom;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifier;
import mineplex.core.gadget.gadgets.hat.*;
import mineplex.core.gadget.gadgets.morph.*;
import mineplex.core.gadget.gadgets.outfit.windupsuit.*;
import mineplex.core.gadget.gadgets.particle.*;
import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane;
import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom;
import mineplex.core.gadget.gadgets.wineffect.*;
import mineplex.core.gadget.persistence.UserGadgetPersistence;
import mineplex.core.gadget.set.*;
import mineplex.core.gadget.types.*;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
@ -24,7 +36,6 @@ import mineplex.core.MiniPlugin;
import mineplex.core.account.CoreClientManager; import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager; import mineplex.core.achievement.AchievementManager;
import mineplex.core.blockrestore.BlockRestore; import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.common.Rank;
import mineplex.core.common.util.NautHashMap; import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilMath;
@ -35,55 +46,44 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.commands.AmmoCommand; import mineplex.core.gadget.commands.AmmoCommand;
import mineplex.core.gadget.commands.UnlockCosmeticsCommand; import mineplex.core.gadget.commands.UnlockCosmeticsCommand;
import mineplex.core.gadget.event.GadgetCollideEntityEvent; import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.gadget.event.GadgetEnableEvent; import mineplex.core.gadget.gadgets.arrowtrail.vampire.ArrowTrailBlood;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; import mineplex.core.gadget.gadgets.arrowtrail.party.ArrowTrailConfetti;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; import mineplex.core.gadget.gadgets.arrowtrail.cupidslove.ArrowTrailCupid;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; import mineplex.core.gadget.gadgets.arrowtrail.emerald.ArrowTrailEmerald;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; import mineplex.core.gadget.gadgets.arrowtrail.wisdom.ArrowTrailEnchant;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant; import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; import mineplex.core.gadget.gadgets.arrowtrail.music.ArrowTrailMusic;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; import mineplex.core.gadget.gadgets.arrowtrail.shadow.ArrowTrailShadow;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; import mineplex.core.gadget.gadgets.arrowtrail.howlingwinds.ArrowTrailStorm;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; import mineplex.core.gadget.gadgets.arrowtrail.titan.ArrowTrailTitan;
import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan; import mineplex.core.gadget.gadgets.death.vampire.DeathBlood;
import mineplex.core.gadget.gadgets.death.DeathBlood; import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane;
import mineplex.core.gadget.gadgets.death.DeathCandyCane; import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart;
import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; import mineplex.core.gadget.gadgets.death.emerald.DeathEmerald;
import mineplex.core.gadget.gadgets.death.DeathEmerald; import mineplex.core.gadget.gadgets.death.wisdom.DeathEnchant;
import mineplex.core.gadget.gadgets.death.DeathEnchant; import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord;
import mineplex.core.gadget.gadgets.death.DeathFrostLord; import mineplex.core.gadget.gadgets.death.music.DeathMusic;
import mineplex.core.gadget.gadgets.death.DeathMusic; import mineplex.core.gadget.gadgets.death.party.DeathPinataBurst;
import mineplex.core.gadget.gadgets.death.DeathPinataBurst; import mineplex.core.gadget.gadgets.death.shadow.DeathShadow;
import mineplex.core.gadget.gadgets.death.DeathShadow; import mineplex.core.gadget.gadgets.death.howlingwinds.DeathStorm;
import mineplex.core.gadget.gadgets.death.DeathStorm; import mineplex.core.gadget.gadgets.death.titan.DeathTitan;
import mineplex.core.gadget.gadgets.death.DeathTitan; import mineplex.core.gadget.gadgets.doublejump.vampire.DoubleJumpBlood;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; import mineplex.core.gadget.gadgets.doublejump.cupidslove.DoubleJumpCupidsWings;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; import mineplex.core.gadget.gadgets.doublejump.emerald.DoubleJumpEmerald;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; import mineplex.core.gadget.gadgets.doublejump.wisdom.DoubleJumpEnchant;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; import mineplex.core.gadget.gadgets.doublejump.party.DoubleJumpFirecracker;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; import mineplex.core.gadget.gadgets.doublejump.music.DoubleJumpMusic;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; import mineplex.core.gadget.gadgets.doublejump.shadow.DoubleJumpShadow;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; import mineplex.core.gadget.gadgets.doublejump.howlingwinds.DoubleJumpStorm;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; import mineplex.core.gadget.gadgets.doublejump.titan.DoubleJumpTitan;
import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier; import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin; import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin;
import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.MineStrikeSkin; import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.MineStrikeSkin;
import mineplex.core.gadget.gadgets.hat.HatCoal;
import mineplex.core.gadget.gadgets.hat.HatCompanionBlock;
import mineplex.core.gadget.gadgets.hat.HatGrinch;
import mineplex.core.gadget.gadgets.hat.HatLovestruck;
import mineplex.core.gadget.gadgets.hat.HatPresent;
import mineplex.core.gadget.gadgets.hat.HatRudolph;
import mineplex.core.gadget.gadgets.hat.HatSanta;
import mineplex.core.gadget.gadgets.hat.HatSecretPackage;
import mineplex.core.gadget.gadgets.hat.HatSnowman;
import mineplex.core.gadget.gadgets.hat.HatTeddyBear;
import mineplex.core.gadget.gadgets.item.ItemBatGun; import mineplex.core.gadget.gadgets.item.ItemBatGun;
import mineplex.core.gadget.gadgets.item.ItemBow; import mineplex.core.gadget.gadgets.item.ItemBow;
import mineplex.core.gadget.gadgets.item.ItemCoal; import mineplex.core.gadget.gadgets.item.ItemCoal;
@ -101,21 +101,6 @@ import mineplex.core.gadget.gadgets.item.ItemPaintbrush;
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.item.ItemTNT; import mineplex.core.gadget.gadgets.item.ItemTNT;
import mineplex.core.gadget.gadgets.morph.MorphBat;
import mineplex.core.gadget.gadgets.morph.MorphBlaze;
import mineplex.core.gadget.gadgets.morph.MorphBlock;
import mineplex.core.gadget.gadgets.morph.MorphBunny;
import mineplex.core.gadget.gadgets.morph.MorphChicken;
import mineplex.core.gadget.gadgets.morph.MorphCow;
import mineplex.core.gadget.gadgets.morph.MorphCreeper;
import mineplex.core.gadget.gadgets.morph.MorphEnderman;
import mineplex.core.gadget.gadgets.morph.MorphPig;
import mineplex.core.gadget.gadgets.morph.MorphPumpkinKing;
import mineplex.core.gadget.gadgets.morph.MorphSlime;
import mineplex.core.gadget.gadgets.morph.MorphSnowman;
import mineplex.core.gadget.gadgets.morph.MorphTitan;
import mineplex.core.gadget.gadgets.morph.MorphVillager;
import mineplex.core.gadget.gadgets.morph.MorphWither;
import mineplex.core.gadget.gadgets.outfit.OutfitTeam; import mineplex.core.gadget.gadgets.outfit.OutfitTeam;
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitBoots; import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitBoots;
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate; import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate;
@ -125,62 +110,19 @@ import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitBoots;
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate; import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate;
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet; import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet;
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings; import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings;
import mineplex.core.gadget.gadgets.outfit.windupsuit.OutfitWindUpSuitBoosterManager; import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood;
import mineplex.core.gadget.gadgets.particle.ParticleBlood; import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald;
import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant;
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes; import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot;
import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord;
import mineplex.core.gadget.gadgets.particle.ParticleEnchant; import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart;
import mineplex.core.gadget.gadgets.particle.ParticleFairy; import mineplex.core.gadget.gadgets.particle.music.ParticleMusic;
import mineplex.core.gadget.gadgets.particle.ParticleFireRings; import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime;
import mineplex.core.gadget.gadgets.particle.ParticleFoot; import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain;
import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; import mineplex.core.gadget.gadgets.particle.titan.ParticleTitan;
import mineplex.core.gadget.gadgets.particle.ParticleHeart;
import mineplex.core.gadget.gadgets.particle.ParticleLegend;
import mineplex.core.gadget.gadgets.particle.ParticleMusic;
import mineplex.core.gadget.gadgets.particle.ParticlePartyTime;
import mineplex.core.gadget.gadgets.particle.ParticleRain;
import mineplex.core.gadget.gadgets.particle.ParticleTitan;
import mineplex.core.gadget.gadgets.particle.ParticleWingsAngel;
import mineplex.core.gadget.gadgets.particle.ParticleWingsDemons;
import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal;
import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie;
import mineplex.core.gadget.gadgets.particle.ParticleYinYang;
import mineplex.core.gadget.gadgets.wineffect.WinEffectBabyChicken;
import mineplex.core.gadget.gadgets.wineffect.WinEffectFireworks;
import mineplex.core.gadget.gadgets.wineffect.WinEffectFlames;
import mineplex.core.gadget.gadgets.wineffect.WinEffectLavaTrap;
import mineplex.core.gadget.gadgets.wineffect.WinEffectLightningStrike;
import mineplex.core.gadget.gadgets.wineffect.WinEffectMrPunchMan;
import mineplex.core.gadget.gadgets.wineffect.WinEffectPodium;
import mineplex.core.gadget.gadgets.wineffect.WinEffectRiseOfTheElderGuardian;
import mineplex.core.gadget.gadgets.wineffect.WinEffectSnowTrails;
import mineplex.core.gadget.set.SetCandyCane;
import mineplex.core.gadget.set.SetCupidsLove;
import mineplex.core.gadget.set.SetEmerald;
import mineplex.core.gadget.set.SetFrostLord;
import mineplex.core.gadget.set.SetHowlingWinds;
import mineplex.core.gadget.set.SetMusic;
import mineplex.core.gadget.set.SetParty;
import mineplex.core.gadget.set.SetShadow;
import mineplex.core.gadget.set.SetTitan;
import mineplex.core.gadget.set.SetVampire;
import mineplex.core.gadget.set.SetWisdom;
import mineplex.core.gadget.set.suits.SetRaveSuit; import mineplex.core.gadget.set.suits.SetRaveSuit;
import mineplex.core.gadget.set.suits.SetSpaceSuit; import mineplex.core.gadget.set.suits.SetSpaceSuit;
import mineplex.core.gadget.types.ArrowEffectGadget;
import mineplex.core.gadget.types.DeathEffectGadget;
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetGameModifier;
import mineplex.core.gadget.types.GadgetSet;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.ItemGadget;
import mineplex.core.gadget.types.MusicGadget;
import mineplex.core.gadget.types.OutfitGadget;
import mineplex.core.gadget.types.OutfitGadget.ArmorSlot; import mineplex.core.gadget.types.OutfitGadget.ArmorSlot;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.gadget.types.WinEffectGadget;
import mineplex.core.hologram.HologramManager; import mineplex.core.hologram.HologramManager;
import mineplex.core.inventory.InventoryManager; import mineplex.core.inventory.InventoryManager;
import mineplex.core.mount.MountManager; import mineplex.core.mount.MountManager;
@ -213,6 +155,8 @@ public class GadgetManager extends MiniPlugin
private final HashSet<GadgetSet> _sets = new HashSet<>(); private final HashSet<GadgetSet> _sets = new HashSet<>();
private UserGadgetPersistence _userGadgetPersistence;
private boolean _hideParticles = false; private boolean _hideParticles = false;
private int _activeItemSlot = 3; private int _activeItemSlot = 3;
private boolean _gadgetsEnabled = true; private boolean _gadgetsEnabled = true;
@ -236,9 +180,10 @@ public class GadgetManager extends MiniPlugin
_packetManager = packetHandler; _packetManager = packetHandler;
_mountManager = mountManager; _mountManager = mountManager;
_hologramManager = hologramManager; _hologramManager = hologramManager;
_userGadgetPersistence = new UserGadgetPersistence(this);
_boosterManager = new OutfitWindUpSuitBoosterManager(this); _boosterManager = new OutfitWindUpSuitBoosterManager(this);
CreateGadgets(); createGadgets();
createSets(); createSets();
} }
@ -257,13 +202,9 @@ public class GadgetManager extends MiniPlugin
addSet(new SetCandyCane(this)); addSet(new SetCandyCane(this));
addSet(new SetTitan(this)); addSet(new SetTitan(this));
// Removes Lovely Set (Duplicate of Cupid's Love)
//addSet(new SetLove(this));
//Costumes //Costumes
addSet(new SetRaveSuit(this)); addSet(new SetRaveSuit(this));
addSet(new SetSpaceSuit(this)); addSet(new SetSpaceSuit(this));
//Removes WindUp suit for now, as it's not going to be released
//addSet(new SetWindUpSuit(this)); //addSet(new SetWindUpSuit(this));
addSet(new SetParty(this)); addSet(new SetParty(this));
addSet(new SetCupidsLove(this)); addSet(new SetCupidsLove(this));
@ -273,11 +214,12 @@ public class GadgetManager extends MiniPlugin
addSet(new SetHowlingWinds(this)); addSet(new SetHowlingWinds(this));
addSet(new SetVampire(this)); addSet(new SetVampire(this));
addSet(new SetMusic(this)); addSet(new SetMusic(this));
addSet(new SetFreedom(this));
} }
private void CreateGadgets() private void createGadgets()
{ {
_gadgets = new NautHashMap<GadgetType, List<Gadget>>(); _gadgets = new NautHashMap<>();
// Items // Items
addGadget(new ItemEtherealPearl(this)); addGadget(new ItemEtherealPearl(this));
@ -309,10 +251,10 @@ public class GadgetManager extends MiniPlugin
addGadget(new OutfitSpaceSuitLeggings(this)); addGadget(new OutfitSpaceSuitLeggings(this));
addGadget(new OutfitSpaceSuitBoots(this)); addGadget(new OutfitSpaceSuitBoots(this));
//addGadget(new OutfitWindUpSuitHelmet(this)); /*addGadget(new OutfitWindUpSuitHelmet(this));
//addGadget(new OutfitWindUpSuitChestplate(this)); addGadget(new OutfitWindUpSuitChestplate(this));
//addGadget(new OutfitWindUpSuitLeggings(this)); addGadget(new OutfitWindUpSuitLeggings(this));
//addGadget(new OutfitWindUpSuitBoots(this)); addGadget(new OutfitWindUpSuitBoots(this));*/
addGadget(new OutfitTeam(this, "Team Helmet", -1, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0)); addGadget(new OutfitTeam(this, "Team Helmet", -1, ArmorSlot.Helmet, Material.LEATHER_HELMET, (byte)0));
addGadget(new OutfitTeam(this, "Team Shirt", -1, ArmorSlot.Chest, Material.LEATHER_CHESTPLATE, (byte)0)); addGadget(new OutfitTeam(this, "Team Shirt", -1, ArmorSlot.Chest, Material.LEATHER_CHESTPLATE, (byte)0));
@ -335,6 +277,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new MorphSlime(this, _achievementManager)); addGadget(new MorphSlime(this, _achievementManager));
addGadget(new MorphTitan(this)); addGadget(new MorphTitan(this));
addGadget(new MorphSnowman(this)); addGadget(new MorphSnowman(this));
addGadget(new MorphUncleSam(this));
// Particles // Particles
addGadget(new ParticleFoot(this)); addGadget(new ParticleFoot(this));
@ -357,6 +300,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new ParticleWingsInfernal(this)); addGadget(new ParticleWingsInfernal(this));
addGadget(new ParticleWingsPixie(this)); addGadget(new ParticleWingsPixie(this));
addGadget(new ParticleYinYang(this)); addGadget(new ParticleYinYang(this));
addGadget(new ParticleFreedom(this));
// Arrow Trails // Arrow Trails
@ -371,8 +315,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new ArrowTrailStorm(this)); addGadget(new ArrowTrailStorm(this));
addGadget(new ArrowTrailBlood(this)); addGadget(new ArrowTrailBlood(this));
addGadget(new ArrowTrailMusic(this)); addGadget(new ArrowTrailMusic(this));
// Removes Lovely Set (Duplicate of Cupid's Love) addGadget(new ArrowTrailFreedom(this));
//addGadget(new ArrowTrailHearts(this));
// Death Effect // Death Effect
addGadget(new DeathFrostLord(this)); addGadget(new DeathFrostLord(this));
@ -386,8 +329,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new DeathStorm(this)); addGadget(new DeathStorm(this));
addGadget(new DeathBlood(this)); addGadget(new DeathBlood(this));
addGadget(new DeathMusic(this)); addGadget(new DeathMusic(this));
// Removes Lovely Set (Duplicate of Cupid's Love) addGadget(new DeathFreedom(this));
//addGadget(new DeathHearts(this));
// Double Jump // Double Jump
addGadget(new DoubleJumpFrostLord(this)); addGadget(new DoubleJumpFrostLord(this));
@ -401,20 +343,13 @@ public class GadgetManager extends MiniPlugin
addGadget(new DoubleJumpStorm(this)); addGadget(new DoubleJumpStorm(this));
addGadget(new DoubleJumpBlood(this)); addGadget(new DoubleJumpBlood(this));
addGadget(new DoubleJumpMusic(this)); addGadget(new DoubleJumpMusic(this));
// Removes Lovely Set (Duplicate of Cupid's Love) addGadget(new DoubleJumpFreedom(this));
//addGadget(new DoubleJumpHearts(this));
// Hat // Hat
addGadget(new HatSanta(this)); for (HatType hatType : HatType.values())
addGadget(new HatSnowman(this)); {
addGadget(new HatPresent(this)); addGadget(new HatItem(this, hatType));
addGadget(new HatCoal(this)); }
addGadget(new HatRudolph(this));
addGadget(new HatGrinch(this));
addGadget(new HatCompanionBlock(this));
addGadget(new HatLovestruck(this));
addGadget(new HatSecretPackage(this));
addGadget(new HatTeddyBear(this));
//Win Effects //Win Effects
addGadget(new WinEffectPodium(this)); addGadget(new WinEffectPodium(this));
@ -470,30 +405,18 @@ public class GadgetManager extends MiniPlugin
// Survival Games // Survival Games
// Also not being released in this update /* for (KitModifier kitModifier : KitModifier.values())
// Beastmaster
//addGadget(new ChickenKitGameModifier(this));
//addGadget(new MiniGuardianKitGameModifier(this));
//addGadget(new PigKitGameModifier(this));
//addGadget(new SquidKitGameModifier(this));
// Horseman
//addGadget(new MuleKitGameModifier(this));
//addGadget(new SkeletonHorseKitGameModifier(this));
// Necromancer
//addGadget(new WitherSkeletonKitGameModifier(this));
// Bridges
//addGadget(new PotatoKitGameModifier(this));
for(GadgetType type : GadgetType.values())
{ {
if(!_gadgets.containsKey(type)) addGadget(new KitGameModifier(this, kitModifier));
}*/
// Balloons
//addGadget(new BabyCowBalloon(this));
for (GadgetType gadgetType : GadgetType.values())
{ {
_gadgets.put(type, new ArrayList<Gadget>()); if (!_gadgets.containsKey(gadgetType))
} _gadgets.put(gadgetType, new ArrayList<>());
} }
} }
@ -536,7 +459,7 @@ public class GadgetManager extends MiniPlugin
private void addGadget(Gadget gadget) private void addGadget(Gadget gadget)
{ {
if (!_gadgets.containsKey(gadget.getGadgetType())) if (!_gadgets.containsKey(gadget.getGadgetType()))
_gadgets.put(gadget.getGadgetType(), new ArrayList<Gadget>()); _gadgets.put(gadget.getGadgetType(), new ArrayList<>());
_gadgets.get(gadget.getGadgetType()).add(gadget); _gadgets.get(gadget.getGadgetType()).add(gadget);
} }
@ -544,22 +467,11 @@ public class GadgetManager extends MiniPlugin
@EventHandler @EventHandler
public void onPlayerJoin(PlayerJoinEvent event) public void onPlayerJoin(PlayerJoinEvent event)
{ {
// Fixes win room speed bug
event.getPlayer().setWalkSpeed(0.2f); event.getPlayer().setWalkSpeed(0.2f);
event.getPlayer().setFlySpeed(0.1f); event.getPlayer().setFlySpeed(0.1f);
// UnlockCosmetics command fixes this part // Loads saved gadgets
// if (_clientManager.Get(event.getPlayer()).GetRank().has(Rank.MODERATOR)) _userGadgetPersistence.load(event.getPlayer());
// {
// for (GadgetType gadgetType : _gadgets.keySet())
// {
// if (gadgetType == GadgetType.Particle && _clientManager.Get(event.getPlayer()).GetRank().has(Rank.ADMIN))
// {
// for (Gadget gadget : _gadgets.get(gadgetType))
// {
// _donationManager.Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(gadget.GetName());
// }
// }
// }
// }
} }
public List<Gadget> getGadgets(GadgetType gadgetType) public List<Gadget> getGadgets(GadgetType gadgetType)
@ -567,14 +479,36 @@ public class GadgetManager extends MiniPlugin
return _gadgets.get(gadgetType); return _gadgets.get(gadgetType);
} }
public List<GadgetGameModifier> getGameModifiers(GameModifierType gameType) public List<Gadget> getAllGadgets()
{ {
List<GadgetGameModifier> list = new ArrayList<>(); List<Gadget> gadgets = new ArrayList<>();
for (GadgetType gadgetType : GadgetType.values())
{
gadgets.addAll(getGadgets(gadgetType));
}
return gadgets;
}
public Gadget getGadget(String name, GadgetType gadgetType)
{
List<Gadget> gadgets = getGadgets(gadgetType);
for (Gadget gadget : gadgets)
{
if (gadget.getName().equalsIgnoreCase(name)
|| Arrays.asList(gadget.getAlternativePackageNames()).contains(name))
return gadget;
}
return null;
}
public List<GameModifierGadget> getGameModifiers(GameModifierType gameType)
{
List<GameModifierGadget> list = new ArrayList<>();
for (Gadget g : getGadgets(GadgetType.GameModifier)) for (Gadget g : getGadgets(GadgetType.GameModifier))
{ {
if (g instanceof GadgetGameModifier) if (g instanceof GameModifierGadget)
{ {
GadgetGameModifier mod = (GadgetGameModifier) g; GameModifierGadget mod = (GameModifierGadget) g;
if (mod.getGameType() == gameType) list.add(mod); if (mod.getGameType() == gameType) list.add(mod);
} }
} }
@ -583,18 +517,18 @@ public class GadgetManager extends MiniPlugin
public GameModifierMineStrikeSkin getGameModifier(MineStrikeSkin skin) public GameModifierMineStrikeSkin getGameModifier(MineStrikeSkin skin)
{ {
for(GadgetGameModifier g : getGameModifiers(GameModifierType.MineStrike)) for(GameModifierGadget g : getGameModifiers(GameModifierType.MineStrike))
{ {
GameModifierMineStrikeSkin gskin = (GameModifierMineStrikeSkin) g; GameModifierMineStrikeSkin gskin = (GameModifierMineStrikeSkin) g;
if(g.GetName().equals(skin.getSkinName())) return gskin; if(g.getName().equals(skin.getSkinName())) return gskin;
} }
return null; return null;
} }
public List<GadgetGameModifier> getGameModifiers(KitModifierType kitType) public List<GameModifierGadget> getGameModifiers(KitModifierType kitType)
{ {
List<GadgetGameModifier> list = new ArrayList<>(); List<GameModifierGadget> list = new ArrayList<>();
for (GadgetGameModifier gadget : getGameModifiers(kitType.getGameModifierType())) for (GameModifierGadget gadget : getGameModifiers(kitType.getGameModifierType()))
{ {
if (gadget instanceof KitGameModifier) if (gadget instanceof KitGameModifier)
{ {
@ -607,11 +541,11 @@ public class GadgetManager extends MiniPlugin
return list; return list;
} }
public GadgetGameModifier getActiveGameModifier(Player player, GameModifierType gameType, Predicate<GadgetGameModifier> selector) public GameModifierGadget getActiveGameModifier(Player player, GameModifierType gameType, Predicate<GameModifierGadget> selector)
{ {
for (GadgetGameModifier g : getGameModifiers(gameType)) for (GameModifierGadget g : getGameModifiers(gameType))
{ {
if (!g.IsActive(player)) { continue; } if (!g.isActive(player)) { continue; }
if (!selector.test(g)) { continue; } if (!selector.test(g)) { continue; }
return g; return g;
} }
@ -619,11 +553,11 @@ public class GadgetManager extends MiniPlugin
} }
// Gets all the Game modifiers that are related to kits // Gets all the Game modifiers that are related to kits
public KitGameModifier getActiveGameModifier(Player player, KitModifierType kitType, Predicate<GadgetGameModifier> selector) public KitGameModifier getActiveGameModifier(Player player, KitModifierType kitType, Predicate<GameModifierGadget> selector)
{ {
for (GadgetGameModifier g : getGameModifiers(kitType)) for (GameModifierGadget g : getGameModifiers(kitType))
{ {
if (!g.IsActive(player)) { continue; } if (!g.isActive(player)) { continue; }
if (!selector.test(g)) { continue; } if (!selector.test(g)) { continue; }
if (!(g instanceof KitGameModifier)) { continue; } if (!(g instanceof KitGameModifier)) { continue; }
return (KitGameModifier) g; return (KitGameModifier) g;
@ -631,8 +565,22 @@ public class GadgetManager extends MiniPlugin
return null; return null;
} }
public HatGadget getHatGadget(HatType type)
{
for (Gadget gadget : getGadgets(GadgetType.Hat))
{
if(gadget instanceof HatGadget)
{
HatGadget hatGadget = (HatGadget) gadget;
if (type.equals(hatGadget.getHatType()))
return hatGadget;
}
}
return null;
}
// Disallows two armor gadgets in same slot. // Disallows two armor gadgets in same slot.
public void RemoveOutfit(Player player, ArmorSlot slot) public void removeOutfit(Player player, ArmorSlot slot)
{ {
for (GadgetType gadgetType : _gadgets.keySet()) for (GadgetType gadgetType : _gadgets.keySet())
{ {
@ -642,9 +590,9 @@ public class GadgetManager extends MiniPlugin
{ {
OutfitGadget armor = (OutfitGadget) gadget; OutfitGadget armor = (OutfitGadget) gadget;
if (armor.GetSlot() == slot) if (armor.getSlot() == slot)
{ {
armor.RemoveArmor(player); armor.removeArmor(player);
} }
} }
} }
@ -657,11 +605,22 @@ public class GadgetManager extends MiniPlugin
if(gadgets == null) return; if(gadgets == null) return;
for(Gadget g : gadgets) for(Gadget g : gadgets)
{ {
g.Disable(player); g.disable(player);
} }
} }
public void DisableAll() public void removeGadgetType(Player player, GadgetType type, Gadget enabled)
{
List<Gadget> gadgets = _gadgets.get(type);
if(gadgets == null) return;
for(Gadget g : gadgets)
{
if (g != enabled)
g.disable(player);
}
}
public void disableAll()
{ {
for (GadgetType gadgetType : _gadgets.keySet()) for (GadgetType gadgetType : _gadgets.keySet())
{ {
@ -682,36 +641,47 @@ public class GadgetManager extends MiniPlugin
if (gadget instanceof WinEffectGadget) if (gadget instanceof WinEffectGadget)
continue; continue;
if(gadget instanceof GadgetGameModifier) if(gadget instanceof GameModifierGadget)
continue; continue;
for (Player player : UtilServer.getPlayers()) for (Player player : UtilServer.getPlayers())
gadget.Disable(player); gadget.disable(player);
} }
} }
} }
public void DisableAll(Player player) public void disableAll(Player player)
{ {
for (GadgetType gadgetType : _gadgets.keySet()) for (GadgetType gadgetType : _gadgets.keySet())
{ {
for (Gadget gadget : _gadgets.get(gadgetType)) for (Gadget gadget : _gadgets.get(gadgetType))
{ {
gadget.Disable(player); gadget.disable(player);
} }
} }
} }
public void DisableAll(Player player, List<String> dontDisable) public void disableAll(Player player, boolean callEvent)
{ {
for (GadgetType gadgetType : _gadgets.keySet()) for (GadgetType gadgetType : _gadgets.keySet())
{ {
for (Gadget gadget : _gadgets.get(gadgetType)) for (Gadget gadget : _gadgets.get(gadgetType))
{ {
if (dontDisable.contains(gadget.GetName())) gadget.disable(player);
}
}
}
public void disableAll(Player player, List<String> dontDisable)
{
for (GadgetType gadgetType : _gadgets.keySet())
{
for (Gadget gadget : _gadgets.get(gadgetType))
{
if (dontDisable.contains(gadget.getName()))
continue; continue;
gadget.Disable(player); gadget.disable(player);
} }
} }
} }
@ -805,22 +775,16 @@ public class GadgetManager extends MiniPlugin
} }
@EventHandler @EventHandler
public void quit(PlayerQuitEvent event) public void onPlayerQuit(PlayerQuitEvent event)
{ {
DisableAll(event.getPlayer()); saveGadgets(event.getPlayer());
disableAll(event.getPlayer(), false);
_lastMove.remove(event.getPlayer()); _lastMove.remove(event.getPlayer());
_playerActiveGadgetMap.remove(event.getPlayer()); _playerActiveGadgetMap.remove(event.getPlayer());
event.getPlayer().setWalkSpeed(0.2f); event.getPlayer().setWalkSpeed(0.2f);
event.getPlayer().setFlySpeed(0.1f); event.getPlayer().setFlySpeed(0.1f);
} }
@EventHandler
public void join(PlayerJoinEvent event)
{
event.getPlayer().setWalkSpeed(0.2f);
event.getPlayer().setFlySpeed(0.1f);
}
@EventHandler @EventHandler
public void death(PlayerDeathEvent event) public void death(PlayerDeathEvent event)
{ {
@ -877,7 +841,7 @@ public class GadgetManager extends MiniPlugin
{ {
if (gadget instanceof ItemGadget) if (gadget instanceof ItemGadget)
{ {
if (gadget.IsActive(player)) if (gadget.isActive(player))
{ {
((ItemGadget)gadget).ApplyItem(player, false); ((ItemGadget)gadget).ApplyItem(player, false);
} }
@ -916,20 +880,13 @@ public class GadgetManager extends MiniPlugin
if (_gadgetsEnabled != enabled) if (_gadgetsEnabled != enabled)
{ {
_gadgetsEnabled = enabled; _gadgetsEnabled = enabled;
DisableAll(); disableAll();
_mountManager.DisableAll(); _mountManager.DisableAll();
} }
} }
@EventHandler @EventHandler
public void GadgetActivate(GadgetEnableEvent event) public void onMountActivate(MountActivateEvent event)
{
if (!_gadgetsEnabled)
event.setCancelled(true);
}
@EventHandler
public void MountActivate(MountActivateEvent event)
{ {
if (!_gadgetsEnabled) if (!_gadgetsEnabled)
event.setCancelled(true); event.setCancelled(true);
@ -950,4 +907,87 @@ public class GadgetManager extends MiniPlugin
if (event.getPlayer().getName().equalsIgnoreCase("sterling_")) if (event.getPlayer().getName().equalsIgnoreCase("sterling_"))
event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.PIG_IDLE, 1f, 1f); event.getPlayer().getWorld().playSound(event.getPlayer().getLocation(), Sound.PIG_IDLE, 1f, 1f);
} }
@EventHandler
public void onGadgetEnable(GadgetEnableEvent event)
{
if (!_gadgetsEnabled)
event.setCancelled(true);
}
private void saveGadgets(Player player)
{
Map<String, String> cache = new HashMap<>();
for (Gadget gadget : getAllGadgets())
{
GadgetType gadgetType = gadget.getGadgetType();
if (gadget.ownsGadget(player))
{
switch (gadgetType)
{
case MusicDisc:
case Item:
case Morph:
case Balloon:
break;
case Costume:
OutfitGadget outfitGadget = (OutfitGadget) gadget;
String key = "activeCostume" + outfitGadget.getSlot().getDatabaseKey();
if (cache.containsKey(key))
continue;
if (outfitGadget.isActive(player))
cache.put(key, outfitGadget.getName());
break;
case GameModifier:
GameModifierGadget gameModifierGadget = (GameModifierGadget) gadget;
if (gameModifierGadget.canAllowMultiple())
{
if (cache.containsKey(gadget.getName()))
continue;
cache.put(gadget.getName(), (gadget.isActive(player)) ? "enabled" : "disabled");
} else
{
String dataKey = "activeModifier" + gameModifierGadget.getGameType().getName().replace(" ", "");
if (cache.containsKey(dataKey))
continue;
if (gadget.isActive(player))
cache.put(dataKey, gadget.getName());
}
break;
default:
if (cache.containsKey(gadgetType.getDatabaseKey()))
continue;
if (gadget.isActive(player))
cache.put(gadgetType.getDatabaseKey(), gadget.getName());
break;
}
}
}
_userGadgetPersistence.save(player, cache);
}
public boolean isKitModifierActive(KitModifier kitModifier, Player player)
{
for (Gadget gadget : getGadgets(GadgetType.GameModifier))
{
if (gadget instanceof KitGameModifier)
{
KitGameModifier kitGameModifier = (KitGameModifier) gadget;
if (kitGameModifier.getKitModifier().equals(kitModifier))
return kitGameModifier.isActive(player);
}
}
return false;
}
public KitModifier getActiveKitModifier(KitModifierType kitModifierType, Player player)
{
for (KitModifier kitModifier : KitModifier.values())
{
if (kitModifier.getKitModifierType().equals(kitModifierType))
if (isKitModifierActive(kitModifier, player))
return kitModifier;
}
return null;
}
} }

View File

@ -89,11 +89,11 @@ public class AmmoCommand extends CommandBase<GadgetManager>
try try
{ {
int ammo = Integer.parseInt(amount); int ammo = Integer.parseInt(amount);
_plugin.getInventoryManager().addItemToInventory(target, gadget.GetName(), ammo); _plugin.getInventoryManager().addItemToInventory(target, gadget.getName(), ammo);
UtilPlayer.message(caller, F.main("Ammo", "You gave " + F.elem(ammo + " Ammo") + " for the gadget " + F.skill(gadget.GetName()) + " to " + F.name(target.getName()) + ".")); UtilPlayer.message(caller, F.main("Ammo", "You gave " + F.elem(ammo + " Ammo") + " for the gadget " + F.skill(gadget.getName()) + " to " + F.name(target.getName()) + "."));
if (target != null) if (target != null)
{ {
UtilPlayer.message(target, F.main("Ammo", F.name(caller.getName()) + " gave you " + F.elem(ammo + " Ammo") + " for the gadget " + F.skill(gadget.GetName()) + ".")); UtilPlayer.message(target, F.main("Ammo", F.name(caller.getName()) + " gave you " + F.elem(ammo + " Ammo") + " for the gadget " + F.skill(gadget.getName()) + "."));
} }
} }
catch (Exception e) catch (Exception e)
@ -106,7 +106,7 @@ public class AmmoCommand extends CommandBase<GadgetManager>
{ {
for (Gadget gadget : _plugin.getGadgets(GadgetType.Item)) for (Gadget gadget : _plugin.getGadgets(GadgetType.Item))
{ {
if (gadget.GetName().equalsIgnoreCase(gadgetName.replaceAll("_", " "))) if (gadget.getName().equalsIgnoreCase(gadgetName.replaceAll("_", " ")))
return gadget; return gadget;
} }
return null; return null;

View File

@ -7,6 +7,8 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType; import mineplex.core.gadget.types.GadgetType;
import mineplex.core.mount.Mount;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
public class LockCosmeticsCommand extends CommandBase<GadgetManager> public class LockCosmeticsCommand extends CommandBase<GadgetManager>
@ -64,7 +66,7 @@ public class LockCosmeticsCommand extends CommandBase<GadgetManager>
} }
for (Gadget gadget : _plugin.getGadgets(gadgetType)) for (Gadget gadget : _plugin.getGadgets(gadgetType))
{ {
_plugin.getDonationManager().Get(caller.getName()).RemoveUnknownSalesPackagesOwned(gadget.GetName()); _plugin.getDonationManager().Get(caller.getName()).RemoveUnknownSalesPackagesOwned(gadget.getName());
} }
UtilPlayer.message(caller, F.main("Cosmetics", "Removed all the " + gadgetType.name() + " cosmetics!")); UtilPlayer.message(caller, F.main("Cosmetics", "Removed all the " + gadgetType.name() + " cosmetics!"));
} }

View File

@ -7,6 +7,10 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType; import mineplex.core.gadget.types.GadgetType;
import mineplex.core.mount.Mount;
import mineplex.core.mount.MountManager;
import mineplex.core.pet.Pet;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
public class UnlockCosmeticsCommand extends CommandBase<GadgetManager> public class UnlockCosmeticsCommand extends CommandBase<GadgetManager>
@ -64,7 +68,7 @@ public class UnlockCosmeticsCommand extends CommandBase<GadgetManager>
} }
for (Gadget gadget : _plugin.getGadgets(gadgetType)) for (Gadget gadget : _plugin.getGadgets(gadgetType))
{ {
_plugin.getDonationManager().Get(caller.getName()).AddUnknownSalesPackagesOwned(gadget.GetName()); _plugin.getDonationManager().Get(caller.getName()).AddUnknownSalesPackagesOwned(gadget.getName());
} }
UtilPlayer.message(caller, F.main("Cosmetics", "Added all the " + gadgetType.name() + " cosmetics!")); UtilPlayer.message(caller, F.main("Cosmetics", "Added all the " + gadgetType.name() + " cosmetics!"));
} }

View File

@ -0,0 +1,42 @@
package mineplex.core.gadget.event;
import mineplex.core.gadget.types.Gadget;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class GadgetAppliedEvent extends Event
{
private static final HandlerList handlers = new HandlerList();
private Player _player;
private Gadget _gadget;
public GadgetAppliedEvent(Player player, Gadget gadget)
{
_player = player;
_gadget = gadget;
}
public HandlerList getHandlers()
{
return handlers;
}
public static HandlerList getHandlerList()
{
return handlers;
}
public Gadget getGadget()
{
return _gadget;
}
public Player getPlayer()
{
return _player;
}
}

View File

@ -1,7 +1,6 @@
package mineplex.core.gadget.event; package mineplex.core.gadget.event;
import mineplex.core.gadget.types.Gadget; import mineplex.core.gadget.types.Gadget;
import mineplex.core.mount.Mount;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.Event; import org.bukkit.event.Event;

View File

@ -18,7 +18,7 @@ public class Ammo extends SalesPackageBase
} }
@Override @Override
public void Sold(Player player, CurrencyType currencyType) public void sold(Player player, CurrencyType currencyType)
{ {
} }
} }

View File

@ -1,42 +0,0 @@
package mineplex.core.gadget.gadgets.arrowtrail;
import org.bukkit.Material;
import org.bukkit.entity.Arrow;
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.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.ArrowEffectGadget;
public class ArrowTrailHearts extends ArrowEffectGadget
{
/**
* Created by: Mysticate
* Timestamp: February 4, 2016
*/
public ArrowTrailHearts(GadgetManager manager)
{
super(manager, "Arrows of Cupid",
UtilText.splitLineToArray(C.cGray + "Tether your love to an arrow, then spear someone with it. Maybe they'll fall in love!", LineFormat.LORE),
-6,
Material.APPLE, (byte) 0);
}
@Override
public void doTrail(Arrow arrow)
{
UtilParticle.PlayParticleToAll(ParticleType.HEART, arrow.getLocation(), .1F, .1F, .1F, 0F, 1, ViewDist.LONGER);
}
@Override
public void doHitEffect(Arrow arrow)
{
UtilParticle.PlayParticleToAll(ParticleType.HEART, arrow.getLocation(), .5F, .5F, .5F, 0F, 4, ViewDist.LONGER);
}
}

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

@ -0,0 +1,64 @@
package mineplex.core.gadget.gadgets.arrowtrail.freedom;
import java.awt.*;
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.particles.ColoredParticle;
import mineplex.core.common.util.particles.DustSpellColor;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.particle.unrelated.BabyFireworkEffect;
import mineplex.core.gadget.gadgets.particle.unrelated.FreedomFireworkEffect;
import mineplex.core.gadget.types.ArrowEffectGadget;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Arrow;
public class ArrowTrailFreedom extends ArrowEffectGadget
{
private Color _color = Color.RED;
private long _count;
public ArrowTrailFreedom(GadgetManager manager)
{
super(manager, "Shock and Awe", UtilText.splitLineToArray(UtilText.colorWords("Send freedom directly into the faces of your foes.",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE),
-8, Material.WOOL,
(byte) 0);
}
@Override
public void doTrail(Arrow arrow)
{
ColoredParticle coloredParticle = new ColoredParticle(UtilParticle.ParticleType.RED_DUST,
new DustSpellColor(_color), arrow.getLocation().clone().add(0, .5, 0));
for (int i = 0; i < 7; i++)
{
coloredParticle.setLocation(arrow.getLocation().clone().add(0, .5, 0));
coloredParticle.display();
}
_count++;
if (_count % 5 == 0)
{
if (_color == Color.RED)
_color = Color.WHITE;
else if (_color == Color.WHITE)
_color = Color.BLUE;
else
_color = Color.RED;
}
if (_count == Long.MAX_VALUE - 1)
_count = 0;
}
@Override
public void doHitEffect(Arrow arrow)
{
BabyFireworkEffect babyFireworkEffect = new BabyFireworkEffect(arrow.getLocation(), Manager.getPlugin(), _color);
babyFireworkEffect.start();
}
}

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.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.titan;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Arrow; import org.bukkit.entity.Arrow;
@ -45,7 +45,7 @@ public class ArrowTrailTitan extends ArrowEffectGadget
{ {
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{ {
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(getName());
} }
} }
} }

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

@ -0,0 +1,52 @@
package mineplex.core.gadget.gadgets.balloons;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.BalloonGadget;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.*;
public class BabyCowBalloon extends BalloonGadget
{
private ArmorStand _entityStand, _playerStand;
private Entity _balloonEntity;
public BabyCowBalloon(GadgetManager manager)
{
super(manager, "Baby Cow Balloon", new String[]{"placeholder"}, 0, Material.MONSTER_EGG, UtilEnt.getEntityEggData(EntityType.COW));
}
@Override
public void enableCustom(Player player)
{
if (!canSpawnBalloon(player))
{
// TODO MESSAGE
return;
}
addPlayerBalloon(player);
_entityStand = player.getWorld().spawn(player.getLocation(), ArmorStand.class);
_entityStand.setGravity(false);
_entityStand.setVisible(false);
Cow babyCow = player.getWorld().spawn(player.getLocation(), Cow.class);
babyCow.setBaby();
_balloonEntity = babyCow;
_entityStand.setPassenger(babyCow);
Location balloonLocation = player.getLocation().add(_random.nextDouble(), getNewHeight(player), _random.nextDouble());
_entityStand.teleport(balloonLocation);
babyCow.setLeashHolder(player);
// TODO UPDATE BALLOONS
}
@Override
public void disableCustom(Player player)
{
_entityStand.remove();
_balloonEntity.remove();
removePlayerBalloon(player);
// TODO UPDATE PLAYER HEIGHT
}
}

View File

@ -1,40 +0,0 @@
package mineplex.core.gadget.gadgets.death;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import mineplex.core.blood.BloodEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DeathEffectGadget;
public class DeathHearts extends DeathEffectGadget
{
/**
* Created by: Mysticate
* Timestamp: February 4, 2016
*/
public DeathHearts(GadgetManager manager)
{
super(manager, "Broken Hearted",
UtilText.splitLineToArray(C.cGray + "Nothing hurts more than having your heart broken. Apart from being killed, that is.",
LineFormat.LORE),
-6, Material.APPLE, (byte) 0);
}
@Override
public void onBlood(Player player, BloodEvent event)
{
event.setCancelled(true);
Location loc = event.getLocation().clone().add(0, .5, 0);
UtilParticle.PlayParticleToAll(ParticleType.HEART, loc, 0F, 0F, 0F, 0F, 1, ViewDist.NORMAL);
}
}

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.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

@ -0,0 +1,36 @@
package mineplex.core.gadget.gadgets.death.freedom;
import mineplex.core.blood.BloodEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DeathEffectGadget;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
public class DeathFreedom extends DeathEffectGadget
{
public DeathFreedom(GadgetManager manager)
{
super(manager, "Price of Freedom", UtilText.splitLineToArray(UtilText.colorWords("Freedom isn't always free, Soldier.",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE),
-8, Material.WOOL, (byte) 0);
}
@Override
public void onBlood(Player player, BloodEvent event)
{
event.setCancelled(true);
event.setItem(Material.INK_SACK, (byte) 15);
Location loc = event.getLocation();
UtilFirework.playFreedomFirework(loc);
}
}

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.titan;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -34,7 +34,7 @@ public class DeathTitan extends DeathEffectGadget
{ {
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{ {
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(getName());
} }
} }

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,35 +0,0 @@
package mineplex.core.gadget.gadgets.doublejump;
import org.bukkit.Material;
import org.bukkit.entity.Player;
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.UtilParticle.ParticleType;
import mineplex.core.common.util.UtilParticle.ViewDist;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
public class DoubleJumpHearts extends DoubleJumpEffectGadget
{
/**
* Created by: Mysticate
* Timestamp: February 4, 2016
*/
public DoubleJumpHearts(GadgetManager manager)
{
super(manager, "Wings of Love",
UtilText.splitLineToArray(C.cGray + "Nothing hurts more than having your heart broken. Apart from being killed, that is.", LineFormat.LORE),
-6, Material.APPLE, (byte) 0);
}
@Override
public void doEffect(Player player)
{
UtilParticle.PlayParticleToAll(ParticleType.HEART, player.getLocation(), .5F, .5F, .5F, 0F, 4, ViewDist.LONGER);
}
}

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;

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

@ -0,0 +1,30 @@
package mineplex.core.gadget.gadgets.doublejump.freedom;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.DoubleJumpEffectGadget;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
public class DoubleJumpFreedom extends DoubleJumpEffectGadget
{
public DoubleJumpFreedom(GadgetManager manager)
{
super(manager, "Leap of Freedom", UtilText.splitLineToArray(UtilText.colorWords("FREEEEEEEEEEEDOM!",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, Material.WOOL,
(byte) 14);
}
@Override
public void doEffect(Player player)
{
/*FreedomFireworkEffect freedomFireworkEffect = new FreedomFireworkEffect(player, Manager.getPlugin(), 3);
freedomFireworkEffect.start();*/
UtilFirework.playFreedomFirework(player.getLocation());
}
}

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.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,10 +1,9 @@
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;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerToggleFlightEvent;
import mineplex.core.common.Rank; import mineplex.core.common.Rank;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
@ -40,7 +39,7 @@ public class DoubleJumpTitan extends DoubleJumpEffectGadget
{ {
if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN)) if (Manager.getClientManager().Get(event.getPlayer()).GetRank().has(Rank.TITAN))
{ {
Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(GetName()); Manager.getDonationManager().Get(event.getPlayer().getName()).AddUnknownSalesPackagesOwned(getName());
} }
} }
} }

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,10 +1,8 @@
package mineplex.core.gadget.gadgets.gamemodifiers.kits; package mineplex.core.gadget.gadgets.gamemodifiers.kits;
import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.gadget.types.GadgetGameModifier;
import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import java.util.function.Predicate; import java.util.function.Predicate;
@ -14,20 +12,18 @@ import java.util.function.Predicate;
* *
* @author LCastr0 * @author LCastr0
*/ */
public class KitGameModifier extends GadgetGameModifier public class KitGameModifier extends GameModifierGadget
{ {
private KitModifier _kitModifier;
private KitModifierType _kitType; private KitModifierType _kitType;
private String _kit;
private String _id;
public KitGameModifier(GadgetManager manager, GameModifierType gameType, KitModifierType kitType, String name, String[] desc, public KitGameModifier(GadgetManager manager, KitModifier kitModifier)
int cost, Material material, byte data, String kit, String id)
{ {
super(manager, gameType, name, desc, cost, material, data); super(manager, kitModifier.getKitModifierType().getGameModifierType(), kitModifier.getName(), kitModifier.getLore(), kitModifier.getCost(),
_kitType = kitType; kitModifier.getMaterial(), kitModifier.getData(), false);
_kit = kit; _kitModifier = kitModifier;
_id = id; _kitType = kitModifier.getKitModifierType();
} }
public KitModifierType getKitType() public KitModifierType getKitType()
@ -35,36 +31,31 @@ public class KitGameModifier extends GadgetGameModifier
return _kitType; return _kitType;
} }
public String getKit() public KitModifier getKitModifier()
{ {
return _kit; return _kitModifier;
}
public String getId()
{
return _id;
} }
@Override @Override
public void EnableCustom(Player player) public void enableCustom(Player player)
{ {
Manager.getGameModifiers(getGameType()).stream().filter(getKitFilter(_kit)).forEach(g -> g.Disable(player)); Manager.getGameModifiers(getGameType()).stream().filter(getKitFilter(_kitType)).forEach(g -> g.disable(player));
super.EnableCustom(player); super.enableCustom(player);
} }
/** /**
* Filters kit based on name * Filters kit based on type
* @param kitName * @param kitModifierType
* @return * @return
*/ */
public static Predicate<GadgetGameModifier> getKitFilter(String kitName) public static Predicate<GameModifierGadget> getKitFilter(KitModifierType kitModifierType)
{ {
return new Predicate<GadgetGameModifier>() { return new Predicate<GameModifierGadget>() {
@Override @Override
public boolean test(GadgetGameModifier g) { public boolean test(GameModifierGadget g) {
if (!(g instanceof KitGameModifier)) { return false; } if (!(g instanceof KitGameModifier)) { return false; }
return ((KitGameModifier)g).getKit().equalsIgnoreCase(kitName); return ((KitGameModifier)g).getKitType().equals(kitModifierType);
} }
}; };
} }

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