Freedom update:

Freedom chests
Freedom Aura
Shock and Awe
Leap of Freedom
Price of Freedom
Uncle Sam Morph
Freedom Mount
Uncle Sam Hat
Persistence update:
Items will still be enabled after player leaves the server
This commit is contained in:
LCastr0 2016-06-23 16:09:31 -03:00
parent 2410151371
commit a441727e09
121 changed files with 2121 additions and 670 deletions

View File

@ -19,21 +19,27 @@ import net.minecraft.server.v1_8_R3.NBTTagString;
public class SkinData
{
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/id9tKFwu1CUzshgcmvQPt3ghtNViNziR/2t7D/+5D31Vzmhf6n7Pnpdirt/5frMi2BKMMs7pLa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w3oKcm0PuR8CPLyf9kjcmUF6XMiEXAWWJtCgvhCiFV5/mQQH3cQ1kqk4BDLUxMVhG5tzjKLoQQy39cFM32ee+QFjXlzy59meC8jgvPmOVU3GpJ32XWOtaXMCyeJrhz2QVKRLEr2KZgz8Pd8VrHARXVZsNYEasj8z0cHjgSJqTU9kD90CC+4YpvdyRBRqbNQig5KuGCqUHKgflsEsM7YrFRKP5As1LgqYQfqRAMmLSo47eW0onOwchC9wCqqisPlYSuDRt4Mun/KFGqYh1Sghn8/gzu49La8BpwlekjVEoPEcDaIIgnFzOvgmmgMANkoJ3PzhHoHMoXtObe3eSTi+eYp4qAQVzkTxfF3WXY2fui1M=");
// Comments this out for now, so it doesn't load the player profile
// A better way to do this would check for the properties when getting the skull or the skin
// Might change on the next version
//public final static SkinData MOOSHROOM = new SkinData("eyJ0aW1lc3RhbXAiOjE0NDk4NzI0OTU0MTcsInByb2ZpbGVJZCI6ImE5ZDBjMDcyYmYxOTQwYTFhMTkzNjhkMDlkNTAwMjZlIiwicHJvZmlsZU5hbWUiOiJTcGlyaXR1c1NhbmN0dXMiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzIxOWJlYTU0Y2FkN2Q1OGFiNWRhNDA2YjBhOTJhYjNhODI0MjI1MjY2Nzc3ZTUzNGI3ZGI2YzM3MmRkZmY3ZiJ9fX0=","UoSif81+UyvkcaanU8KAMYBpw9mefAmWehE2liDUFvk+y0X/9NovsxTYVpIDCltTSpLW3sNgamvbj4Ybs+s6DbudPiEkvh0ER7Bv2v29UJw7RzIdr6/1g548X12zcnh5iPGz/P75uNRnSfTFQx0ed8P/GNkPIjWpDuJFxEj6KcPzrCAGMx+BVw1VwryBIYf9cCDHky8z0bxR89rjiIvPTBFI6MRhqI3vgpEBTySHDS+Ki0Hwl5oa3PwS6+jgY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yjgr4Rt0KtDvpL/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;

View File

@ -108,4 +108,10 @@ public class UtilFirework
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;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -340,6 +341,21 @@ public class UtilParticle
{
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

@ -196,4 +196,14 @@ public class UtilServer
{
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

@ -746,4 +746,20 @@ public class UtilText
}
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

@ -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.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.event.inventory.ClickType;
@ -23,7 +23,7 @@ public class ActivateMountButton implements IButton
public void onClick(Player player, ClickType clickType)
{
_page.playAcceptSound(player);
_mount.Enable(player);
_mount.enable(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.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.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.event.inventory.ClickType;
@ -21,7 +21,7 @@ public class DeactivateMountButton implements IButton
public void onClick(Player player, ClickType clickType)
{
_page.playAcceptSound(player);
_mount.Disable(player);
_mount.disable(player);
_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.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;

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;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button;
package mineplex.core.cosmetic.ui.button.open;
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;

View File

@ -1,4 +1,4 @@
package mineplex.core.cosmetic.ui.button;
package mineplex.core.cosmetic.ui.button.open;
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 mineplex.core.cosmetic.ui.page.GameModifierPage;
import mineplex.core.cosmetic.ui.page.gamemodifiers.GameModifierPage;
import mineplex.core.cosmetic.ui.page.Menu;
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;

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.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.event.inventory.ClickType;
@ -29,7 +29,7 @@ public class OpenMounts implements IButton
if (_active != null)
{
_menu.playAcceptSound(player);
_active.Disable(player);
_active.disable(player);
_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;

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

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

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

@ -4,10 +4,12 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import mineplex.core.common.util.banner.CountryFlag;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BannerMeta;
import org.bukkit.inventory.meta.ItemMeta;
import mineplex.core.account.CoreClientManager;
@ -17,8 +19,8 @@ import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.button.ActivateGadgetButton;
import mineplex.core.cosmetic.ui.button.DeactivateGadgetButton;
import mineplex.core.cosmetic.ui.button.activate.ActivateGadgetButton;
import mineplex.core.cosmetic.ui.button.deactivate.DeactivateGadgetButton;
import mineplex.core.cosmetic.ui.button.GadgetButton;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.morph.MorphBlock;
@ -136,6 +138,11 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Purchased from shop.mineplex.com");
}
else if (gadget.getCost(CurrencyType.Coins) == -8)
{
itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Freedom Chests");
}
//Rank Unlocks
else if (gadget.getCost(CurrencyType.Coins) == -10)
@ -262,19 +269,54 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
//Standard
if (gadget.ownsGadget(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.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.Coins) == -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
{
itemLore.add(C.cBlack);
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.Coins) == -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
@ -346,7 +388,7 @@ public class GadgetPage extends ShopPageBase<CosmeticManager, CosmeticShop>
playAcceptSound(player);
gadget.enable(player);
getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), player));
refresh();
}
public void handleRightClick(Player player, Gadget gadget)

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.EnumMap;
import java.util.List;
import mineplex.core.cosmetic.ui.button.open.*;
import org.bukkit.Material;
import org.bukkit.entity.Creature;
import org.bukkit.entity.EntityType;
@ -18,19 +19,6 @@ import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilText;
import mineplex.core.cosmetic.CosmeticManager;
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.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
@ -112,7 +100,7 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
Mount<?> mountActive = getPlugin().getMountManager().getActive(getPlayer());
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++;
}
@ -207,6 +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));
addButton(gameModifierSlot, new ShopItem(Material.TORCH, "Game Modifiers", lore, 1, false), new OpenGameModifiers(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(gameModifierSlot);
/*type = GadgetType.Balloon;
lore = getLore(ownedCount.get(type), maxCount.get(type), "Placeholder", "Placeholder", enabled.get(type));
addButton(balloonSlot, new ShopItem(Material.BANNER, "Balloons", lore, 1, false), new OpenBalloons(this, enabled.get(type)));
if (enabled.containsKey(type)) addGlow(balloonSlot);*/
}
private String[] getLore(int ownedCount, int maxCount, String info, String visibility, Gadget enabled)

View File

@ -13,8 +13,8 @@ import mineplex.core.common.CurrencyType;
import mineplex.core.common.util.C;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.button.ActivateMountButton;
import mineplex.core.cosmetic.ui.button.DeactivateMountButton;
import mineplex.core.cosmetic.ui.button.activate.ActivateMountButton;
import mineplex.core.cosmetic.ui.button.deactivate.DeactivateMountButton;
import mineplex.core.cosmetic.ui.button.MountButton;
import mineplex.core.donation.DonationManager;
import mineplex.core.mount.Mount;
@ -92,6 +92,11 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Valentines Holiday Treasure");
}
else if (mount.getCost(CurrencyType.Coins) == -7)
{
itemLore.add(C.cBlack);
itemLore.add(C.cBlue + "Found in Freedom Chests");
}
//Rank Unlocks
else if (mount.getCost(CurrencyType.Coins) == -10)
{
@ -117,7 +122,7 @@ public class MountPage extends ShopPageBase<CosmeticManager, CosmeticShop>
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.cGreen + "Click to Disable");

View File

@ -24,8 +24,8 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.PetSorter;
import mineplex.core.cosmetic.ui.button.ActivatePetButton;
import mineplex.core.cosmetic.ui.button.DeactivatePetButton;
import mineplex.core.cosmetic.ui.button.activate.ActivatePetButton;
import mineplex.core.cosmetic.ui.button.deactivate.DeactivatePetButton;
import mineplex.core.cosmetic.ui.button.PetButton;
import mineplex.core.cosmetic.ui.button.RenamePetButton;
import mineplex.core.donation.DonationManager;

View File

@ -1,8 +1,9 @@
package mineplex.core.cosmetic.ui.page;
package mineplex.core.cosmetic.ui.page.gamemodifiers;
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.entity.Player;
import org.bukkit.event.inventory.ClickType;
@ -15,7 +16,7 @@ import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.donation.DonationManager;
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.ShopItem;
@ -37,7 +38,7 @@ public class GameModifierPage extends GadgetPage
{
int own = 0;
int total = 0;
for(GadgetGameModifier g : getPlugin().getGadgetManager().getGameModifiers(type)) {
for(GameModifierGadget g : getPlugin().getGadgetManager().getGameModifiers(type)) {
if(g.ownsGadget(getPlayer())) own++;
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.entity.Player;
import org.bukkit.event.inventory.ClickType;
@ -11,7 +12,7 @@ import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
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.ShopItem;
import org.bukkit.inventory.ItemStack;
@ -47,7 +48,7 @@ public class GameModifierSubPage extends GadgetPage
{
int own = 0;
int total = 0;
for (GadgetGameModifier g : getPlugin().getGadgetManager().getGameModifiers(kitModifierType))
for (GameModifierGadget g : getPlugin().getGadgetManager().getGameModifiers(kitModifierType))
{
if (g.ownsGadget(getPlayer())) own++;
total++;
@ -83,7 +84,7 @@ public class GameModifierSubPage extends GadgetPage
}
else
{
for (GadgetGameModifier gadget : getPlugin().getGadgetManager().getGameModifiers(_type))
for (GameModifierGadget gadget : getPlugin().getGadgetManager().getGameModifiers(_type))
{
addGadget(gadget, slot);

View File

@ -1,15 +1,15 @@
package mineplex.core.cosmetic.ui.page;
package mineplex.core.cosmetic.ui.page.gamemodifiers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilServer;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.cosmetic.ui.CosmeticShop;
import mineplex.core.cosmetic.ui.page.GadgetPage;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier;
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.ShopItem;
import org.bukkit.Material;
@ -38,7 +38,7 @@ public class KitGameModifierPage extends GadgetPage
int slot = 19;
for (GadgetGameModifier gadget : getPlugin().getGadgetManager().getGameModifiers(_kitType))
for (GameModifierGadget gadget : getPlugin().getGadgetManager().getGameModifiers(_kitType))
{
if (gadget instanceof KitGameModifier)
{

View File

@ -344,9 +344,9 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
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

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

View File

@ -5,11 +5,20 @@ import java.util.function.Predicate;
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.suits.SetWindUpSuit;
import mineplex.core.gadget.set.*;
import mineplex.core.gadget.types.*;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
@ -75,16 +84,6 @@ import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitGameModifier;
import mineplex.core.gadget.gadgets.gamemodifiers.kits.KitModifierType;
import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.GameModifierMineStrikeSkin;
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.ItemBow;
import mineplex.core.gadget.gadgets.item.ItemCoal;
@ -102,21 +101,6 @@ import mineplex.core.gadget.gadgets.item.ItemPaintbrush;
import mineplex.core.gadget.gadgets.item.ItemPartyPopper;
import mineplex.core.gadget.gadgets.item.ItemSnowball;
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.ravesuit.OutfitRaveSuitBoots;
import mineplex.core.gadget.gadgets.outfit.ravesuit.OutfitRaveSuitChestplate;
@ -127,58 +111,18 @@ import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitChestplate;
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitHelmet;
import mineplex.core.gadget.gadgets.outfit.spacesuit.OutfitSpaceSuitLeggings;
import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood;
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald;
import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant;
import mineplex.core.gadget.gadgets.particle.ParticleFairy;
import mineplex.core.gadget.gadgets.particle.ParticleFireRings;
import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot;
import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord;
import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart;
import mineplex.core.gadget.gadgets.particle.ParticleLegend;
import mineplex.core.gadget.gadgets.particle.music.ParticleMusic;
import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime;
import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain;
import mineplex.core.gadget.gadgets.particle.titan.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.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.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.ParticleGadget;
import mineplex.core.gadget.types.WinEffectGadget;
import mineplex.core.hologram.HologramManager;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.mount.MountManager;
@ -261,7 +205,7 @@ public class GadgetManager extends MiniPlugin
//Costumes
addSet(new SetRaveSuit(this));
addSet(new SetSpaceSuit(this));
addSet(new SetWindUpSuit(this));
//addSet(new SetWindUpSuit(this));
addSet(new SetParty(this));
addSet(new SetCupidsLove(this));
addSet(new SetEmerald(this));
@ -270,6 +214,7 @@ public class GadgetManager extends MiniPlugin
addSet(new SetHowlingWinds(this));
addSet(new SetVampire(this));
addSet(new SetMusic(this));
addSet(new SetFreedom(this));
}
private void createGadgets()
@ -306,10 +251,10 @@ public class GadgetManager extends MiniPlugin
addGadget(new OutfitSpaceSuitLeggings(this));
addGadget(new OutfitSpaceSuitBoots(this));
addGadget(new OutfitWindUpSuitHelmet(this));
/*addGadget(new OutfitWindUpSuitHelmet(this));
addGadget(new OutfitWindUpSuitChestplate(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 Shirt", -1, ArmorSlot.Chest, Material.LEATHER_CHESTPLATE, (byte)0));
@ -332,6 +277,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new MorphSlime(this, _achievementManager));
addGadget(new MorphTitan(this));
addGadget(new MorphSnowman(this));
addGadget(new MorphUncleSam(this));
// Particles
addGadget(new ParticleFoot(this));
@ -354,6 +300,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new ParticleWingsInfernal(this));
addGadget(new ParticleWingsPixie(this));
addGadget(new ParticleYinYang(this));
addGadget(new ParticleFreedom(this));
// Arrow Trails
@ -368,6 +315,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new ArrowTrailStorm(this));
addGadget(new ArrowTrailBlood(this));
addGadget(new ArrowTrailMusic(this));
addGadget(new ArrowTrailFreedom(this));
// Death Effect
addGadget(new DeathFrostLord(this));
@ -381,6 +329,7 @@ public class GadgetManager extends MiniPlugin
addGadget(new DeathStorm(this));
addGadget(new DeathBlood(this));
addGadget(new DeathMusic(this));
addGadget(new DeathFreedom(this));
// Double Jump
addGadget(new DoubleJumpFrostLord(this));
@ -394,18 +343,13 @@ public class GadgetManager extends MiniPlugin
addGadget(new DoubleJumpStorm(this));
addGadget(new DoubleJumpBlood(this));
addGadget(new DoubleJumpMusic(this));
addGadget(new DoubleJumpFreedom(this));
// Hat
addGadget(new HatSanta(this));
addGadget(new HatSnowman(this));
addGadget(new HatPresent(this));
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));
for (HatType hatType : HatType.values())
{
addGadget(new HatItem(this, hatType));
}
//Win Effects
addGadget(new WinEffectPodium(this));
@ -461,17 +405,18 @@ public class GadgetManager extends MiniPlugin
// Survival Games
for (KitModifier kitModifier : KitModifier.values())
/* for (KitModifier kitModifier : KitModifier.values())
{
addGadget(new KitGameModifier(this, kitModifier));
}
for(GadgetType type : GadgetType.values())
}*/
// Balloons
//addGadget(new BabyCowBalloon(this));
for (GadgetType gadgetType : GadgetType.values())
{
if(!_gadgets.containsKey(type))
{
_gadgets.put(type, new ArrayList<>());
}
if (!_gadgets.containsKey(gadgetType))
_gadgets.put(gadgetType, new ArrayList<>());
}
}
@ -514,7 +459,7 @@ public class GadgetManager extends MiniPlugin
private void addGadget(Gadget gadget)
{
if (!_gadgets.containsKey(gadget.getGadgetType()))
_gadgets.put(gadget.getGadgetType(), new ArrayList<Gadget>());
_gadgets.put(gadget.getGadgetType(), new ArrayList<>());
_gadgets.get(gadget.getGadgetType()).add(gadget);
}
@ -556,14 +501,14 @@ public class GadgetManager extends MiniPlugin
return null;
}
public List<GadgetGameModifier> getGameModifiers(GameModifierType gameType)
public List<GameModifierGadget> getGameModifiers(GameModifierType gameType)
{
List<GadgetGameModifier> list = new ArrayList<>();
List<GameModifierGadget> list = new ArrayList<>();
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);
}
}
@ -572,7 +517,7 @@ public class GadgetManager extends MiniPlugin
public GameModifierMineStrikeSkin getGameModifier(MineStrikeSkin skin)
{
for(GadgetGameModifier g : getGameModifiers(GameModifierType.MineStrike))
for(GameModifierGadget g : getGameModifiers(GameModifierType.MineStrike))
{
GameModifierMineStrikeSkin gskin = (GameModifierMineStrikeSkin) g;
if(g.getName().equals(skin.getSkinName())) return gskin;
@ -580,10 +525,10 @@ public class GadgetManager extends MiniPlugin
return null;
}
public List<GadgetGameModifier> getGameModifiers(KitModifierType kitType)
public List<GameModifierGadget> getGameModifiers(KitModifierType kitType)
{
List<GadgetGameModifier> list = new ArrayList<>();
for (GadgetGameModifier gadget : getGameModifiers(kitType.getGameModifierType()))
List<GameModifierGadget> list = new ArrayList<>();
for (GameModifierGadget gadget : getGameModifiers(kitType.getGameModifierType()))
{
if (gadget instanceof KitGameModifier)
{
@ -596,9 +541,9 @@ public class GadgetManager extends MiniPlugin
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 (!selector.test(g)) { continue; }
@ -608,9 +553,9 @@ public class GadgetManager extends MiniPlugin
}
// 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 (!selector.test(g)) { continue; }
@ -619,6 +564,20 @@ public class GadgetManager extends MiniPlugin
}
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.
public void removeOutfit(Player player, ArmorSlot slot)
@ -682,7 +641,7 @@ public class GadgetManager extends MiniPlugin
if (gadget instanceof WinEffectGadget)
continue;
if(gadget instanceof GadgetGameModifier)
if(gadget instanceof GameModifierGadget)
continue;
for (Player player : UtilServer.getPlayers())
@ -961,48 +920,48 @@ public class GadgetManager extends MiniPlugin
Map<String, String> cache = new HashMap<>();
for (Gadget gadget : getAllGadgets())
{
if (gadget.ownsGadget(player))
{
GadgetType gadgetType = gadget.getGadgetType();
switch (gadgetType)
GadgetType gadgetType = gadget.getGadgetType();
if (gadget.ownsGadget(player))
{
case MusicDisc:
case Item:
case Morph:
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:
GadgetGameModifier gadgetGameModifier = (GadgetGameModifier) gadget;
if (gadgetGameModifier.canAllowMultiple())
{
if (cache.containsKey(gadget.getName()))
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;
cache.put(gadget.getName(), (gadget.isActive(player)) ? "enabled" : "disabled");
}
else
{
String dataKey = "activeModifier" + gadgetGameModifier.getGameType().getName().replace(" ", "");
if (cache.containsKey(dataKey))
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(dataKey, gadget.getName());
}
break;
default:
if (cache.containsKey(gadgetType.getDatabaseKey()))
continue;
if (gadget.isActive(player))
cache.put(gadgetType.getDatabaseKey(), gadget.getName());
break;
cache.put(gadgetType.getDatabaseKey(), gadget.getName());
break;
}
}
}
}
_userGadgetPersistence.save(player, cache);
}

View File

@ -7,6 +7,8 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.mount.Mount;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
public class LockCosmeticsCommand extends CommandBase<GadgetManager>

View File

@ -7,6 +7,10 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.Gadget;
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;
public class UnlockCosmeticsCommand extends CommandBase<GadgetManager>

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

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

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

@ -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,10 +1,8 @@
package mineplex.core.gadget.gadgets.gamemodifiers.kits;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.types.GadgetGameModifier;
import mineplex.core.gadget.types.GameModifierGadget;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.function.Predicate;
@ -14,7 +12,7 @@ import java.util.function.Predicate;
*
* @author LCastr0
*/
public class KitGameModifier extends GadgetGameModifier
public class KitGameModifier extends GameModifierGadget
{
private KitModifier _kitModifier;
@ -51,11 +49,11 @@ public class KitGameModifier extends GadgetGameModifier
* @param kitModifierType
* @return
*/
public static Predicate<GadgetGameModifier> getKitFilter(KitModifierType kitModifierType)
public static Predicate<GameModifierGadget> getKitFilter(KitModifierType kitModifierType)
{
return new Predicate<GadgetGameModifier>() {
return new Predicate<GameModifierGadget>() {
@Override
public boolean test(GadgetGameModifier g) {
public boolean test(GameModifierGadget g) {
if (!(g instanceof KitGameModifier)) { return false; }
return ((KitGameModifier)g).getKitType().equals(kitModifierType);
}

View File

@ -9,13 +9,13 @@ import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
import mineplex.core.gadget.types.GadgetGameModifier;
import mineplex.core.gadget.types.GameModifierGadget;
/**
* A gamemodifier to apply custom skin data to {@link GameModifierType#MineStrike} weapons
*/
public class GameModifierMineStrikeSkin extends GadgetGameModifier
public class GameModifierMineStrikeSkin extends GameModifierGadget
{
private String _weapon;
@ -91,12 +91,12 @@ public class GameModifierMineStrikeSkin extends GadgetGameModifier
}
/**
* A simple {@link GadgetGameModifier} filter which filters out {@link GameModifierMineStrikeSkin} gadgets depending on weapon name
* A simple {@link GameModifierGadget} filter which filters out {@link GameModifierMineStrikeSkin} gadgets depending on weapon name
* @param weaponName Exact weapon name to test for
* @return Returns a weapon filter which will filter out any {@link GadgetGameModifier}
* @return Returns a weapon filter which will filter out any {@link GameModifierGadget}
* which is not instance of {@link GameModifierMineStrikeSkin} and which does not match the provided weapon name
*/
public static Predicate<GadgetGameModifier> getWeaponFilter(String weaponName)
public static Predicate<GameModifierGadget> getWeaponFilter(String weaponName)
{
return g -> g instanceof GameModifierMineStrikeSkin && ((GameModifierMineStrikeSkin)g).getWeaponName().equals(weaponName);
}

View File

@ -1,23 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatCoal extends HatGadget
{
public HatCoal(GadgetManager manager)
{
super(manager, "Lump of Coal Hat",
UtilText.splitLineToArray(C.cGray + "When life gives you coal, make a weird cube hat out it!", LineFormat.LORE),
-1,
new ItemStack(Material.COAL_BLOCK));
}
}

View File

@ -1,20 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatCompanionBlock extends HatGadget
{
public HatCompanionBlock(GadgetManager manager)
{
super(manager, "Companion Block",
UtilText.splitLineToArray(C.cGray + "The Enrichment Center is required to remind you that the Weighted Companion cube cannot talk. In the event that it does talk The Enrichment Center asks you to ignore its advice.", LineFormat.LORE),
-2, SkinData.COMPANION_CUBE.getSkull(), "Companion");
}
}

View File

@ -1,21 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatGrinch extends HatGadget
{
public HatGrinch(GadgetManager manager)
{
super(manager, "The Grinch",
UtilText.splitLineToArray(C.cGray + "Great! Now where's the Roast Beast?!", LineFormat.LORE),
-3,
SkinData.THE_GRINCH.getSkull(), "The Grinch Hat");
}
}

View File

@ -0,0 +1,26 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
public class HatItem extends HatGadget
{
public HatItem(GadgetManager manager, HatType hatType)
{
super(manager, hatType);
}
public HatItem(GadgetManager manager, String name, String[] desc, int cost, Material material, byte data)
{
super(manager, name, desc, cost, new ItemStack(material, 1, data));
}
public HatItem(GadgetManager manager, String name, String[] desc, int cost, String playerName)
{
super(manager, name, desc, cost, playerName);
}
}

View File

@ -1,20 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatLovestruck extends HatGadget
{
public HatLovestruck(GadgetManager manager)
{
super(manager, "Love Struck",
UtilText.splitLineToArray(C.cGray + "I think I'm in love... Wait a minute, did someone use a love potion on me?!", LineFormat.LORE),
-6, SkinData.LOVESTRUCK.getSkull(), "Love Struck Hat", "Lovestruck");
}
}

View File

@ -1,21 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatPresent extends HatGadget
{
public HatPresent(GadgetManager manager)
{
super(manager, "Present",
UtilText.splitLineToArray(C.cGray + "WHAT'S IN THE PRESENT? Oh, it's just you...", LineFormat.LORE),
-3,
SkinData.PRESENT.getSkull());
}
}

View File

@ -1,21 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatRudolph extends HatGadget
{
public HatRudolph(GadgetManager manager)
{
super(manager, "Rudolph",
UtilText.splitLineToArray(C.cGray + "HEY YOU! Wanna lead Santa's sleigh team?", LineFormat.LORE),
-3,
SkinData.RUDOLPH.getSkull());
}
}

View File

@ -1,21 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatSanta extends HatGadget
{
public HatSanta(GadgetManager manager)
{
super(manager, "Santa",
UtilText.splitLineToArray(C.cGray + "Now you can work the Mall circuit!", LineFormat.LORE),
-3,
SkinData.SANTA.getSkull());
}
}

View File

@ -1,20 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatSecretPackage extends HatGadget
{
public HatSecretPackage(GadgetManager manager)
{
super(manager, "Secret Package",
UtilText.splitLineToArray(C.cGray + "I hope Chiss is inside!", LineFormat.LORE),
-6, SkinData.SECRET_PACKAGE.getSkull());
}
}

View File

@ -1,20 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatSnowman extends HatGadget
{
public HatSnowman(GadgetManager manager)
{
super(manager, "Snowman Head",
UtilText.splitLineToArray(C.cGray + "Do you want to be a snowman?", LineFormat.LORE),
-2, SkinData.SNOWMAN.getSkull());
}
}

View File

@ -1,19 +0,0 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.HatGadget;
public class HatTeddyBear extends HatGadget
{
public HatTeddyBear(GadgetManager manager)
{
super(manager, "Teddy Bear",
UtilText.splitLineToArray(C.cGray + "Aww, it's a cute teddy bear! What shall I name him?", LineFormat.LORE),
-6,
SkinData.TEDDY_BEAR.getSkull());
}
}

View File

@ -0,0 +1,75 @@
package mineplex.core.gadget.gadgets.hat;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
public enum HatType
{
Coal("Lump of Coal Hat", UtilText.splitLineToArray(C.cGray + "When life gives you coal, make a weird cube hat out it!", LineFormat.LORE), -1, Material.COAL_BLOCK),
Companion_Block("Companion Block", UtilText.splitLineToArray(C.cGray + "The Enrichment Center is required to remind you that the Weighted Companion cube cannot talk. In the event that it does talk The Enrichment Center asks you to ignore its advice.", LineFormat.LORE), -2, SkinData.COMPANION_CUBE, "Companion"),
Grinch("The Grinch", UtilText.splitLineToArray(C.cGray + "Great! Now where's the Roast Beast?!", LineFormat.LORE), -3, SkinData.THE_GRINCH, "The Grinch Hat"),
Lovestruck("Love Struck", UtilText.splitLineToArray(C.cGray + "I think I'm in love... Wait a minute, did someone use a love potion on me?!", LineFormat.LORE), -6, SkinData.LOVESTRUCK, "Love Struck Hat", "Lovestruck"),
Present("Present", UtilText.splitLineToArray(C.cGray + "WHAT'S IN THE PRESENT? Oh, it's just you...", LineFormat.LORE), -3, SkinData.PRESENT),
Rudolph("Rudolph", UtilText.splitLineToArray(C.cGray + "HEY YOU! Wanna lead Santa's sleigh team?", LineFormat.LORE), -3, SkinData.RUDOLPH),
Santa("Santa", UtilText.splitLineToArray(C.cGray + "Now you can work the Mall circuit!", LineFormat.LORE), -3, SkinData.SANTA),
Secret_Package("Secret Package", UtilText.splitLineToArray(C.cGray + "I hope Chiss is inside!", LineFormat.LORE), -6, SkinData.SECRET_PACKAGE),
Snowman("Snowman Head", UtilText.splitLineToArray(C.cGray + "Do you want to be a snowman?", LineFormat.LORE), -2, SkinData.SNOWMAN),
Teddy_Bear("Teddy Bear", UtilText.splitLineToArray(C.cGray + "Aww, it's a cute teddy bear! What shall I name him?", LineFormat.LORE), -6, SkinData.TEDDY_BEAR),
Uncle_Sam("Uncle Sam Hat", UtilText.splitLineToArray(UtilText.colorWords("Uncle Sam has a big hat but now you can too.", ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, SkinData.UNCLE_SAM);
private final String _name;
private final String[] _lore;
private final int _cost;
private final ItemStack _hat;
private final String[] _altNames;
HatType(String name, String[] lore, int cost, Material material, String... altNames)
{
_name = name;
_lore = lore;
_cost = cost;
_hat = new ItemStack(material);
_altNames = altNames;
}
HatType(String name, String[] lore, int cost, SkinData skin, String... altNames)
{
_name = name;
_lore = lore;
_cost = cost;
_hat = skin.getSkull();
_altNames = altNames;
}
public String getName()
{
return _name;
}
public String[] getLore()
{
return _lore;
}
public int getCost()
{
return _cost;
}
public ItemStack getHat()
{
return _hat;
}
public String[] getAltNames()
{
return _altNames;
}
}

View File

@ -1,5 +1,6 @@
package mineplex.core.gadget.gadgets.item;
import mineplex.core.gadget.gadgets.hat.HatType;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.Sound;
@ -25,7 +26,6 @@ import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.event.ItemGadgetOutOfAmmoEvent;
import mineplex.core.gadget.gadgets.Ammo;
import mineplex.core.gadget.gadgets.hat.HatCoal;
import mineplex.core.gadget.gadgets.particle.ParticleCoalFumes;
import mineplex.core.gadget.types.ItemGadget;
import mineplex.core.itemstack.ItemStackFactory;
@ -80,7 +80,7 @@ public class ItemCoal extends ItemGadget
int goal = -1;
//Coal Hat
if (!Manager.getGadget(HatCoal.class).ownsGadget(player))
if (!Manager.getHatGadget(HatType.Coal).ownsGadget(player))
{
goal = _hat;

View File

@ -0,0 +1,74 @@
package mineplex.core.gadget.gadgets.morph;
import java.util.UUID;
import com.mojang.authlib.GameProfile;
import mineplex.core.common.skin.SkinData;
import mineplex.core.common.util.*;
import mineplex.core.disguise.disguises.DisguisePlayer;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.MorphGadget;
import mineplex.core.recharge.Recharge;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerInteractEvent;
public class MorphUncleSam extends MorphGadget
{
public MorphUncleSam(GadgetManager manager)
{
super(manager, "Uncle Sam Morph", UtilText.splitLinesToArray(new String[]
{
UtilText.colorWords("Turn into Uncle Sam and bring Justice and Freedom with you!",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE),
C.blankLine,
"#" + C.cWhite + "Left-click to use Freedom Fireworks",
C.blankLine,
"#" + C.cRed +C.Bold + "WARNING: " + ChatColor.RESET + "FREEDOM FIREWORKS ARE EXTREMELY PATRIOTIC"
}, LineFormat.LORE),
-8, Material.FIREWORK, (byte) 0);
}
@Override
public void enableCustom(Player player)
{
this.ApplyArmor(player);
DisguisePlayer disguisePlayer = new DisguisePlayer(player);
disguisePlayer.setProfile(new GameProfile(UUID.randomUUID(), C.cRed + "Uncle " + C.cBlue + "Sam"));
SkinData uncleSam = SkinData.UNCLE_SAM;
disguisePlayer.setSkinData(uncleSam);
disguisePlayer.setSendSkinDataToSelf(true);
Manager.getDisguiseManager().disguise(disguisePlayer);
}
@Override
public void disableCustom(Player player)
{
this.RemoveArmor(player);
Manager.getDisguiseManager().undisguise(player);
}
@EventHandler
public void firework(PlayerInteractEvent event)
{
Player player = event.getPlayer();
if (!isActive(player))
return;
if (!UtilEvent.isAction(event, UtilEvent.ActionType.L))
return;
if (!Recharge.Instance.use(player, getName(), 2500, false, false, "Cosmetics"))
return;
int r = (int) (Math.random() * 3);
UtilFirework.playFreedomFirework(player.getLocation().clone().add(0, 2, 0));
}
}

View File

@ -0,0 +1,49 @@
package mineplex.core.gadget.gadgets.particle.freedom;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.gadgets.particle.unrelated.FreedomFireworkEffect;
import mineplex.core.gadget.types.ParticleGadget;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;
public class ParticleFreedom extends ParticleGadget
{
private Map<UUID, FreedomFireworkEffect> _effects = new HashMap<>();
public ParticleFreedom(GadgetManager manager)
{
super(manager, "Freedom Aura", UtilText.splitLineToArray(UtilText.colorWords("Do you hear that? It's the sound of Freedom swirling around you.",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8,
Material.WOOL, (byte) 11);
}
@Override
public void playParticle(Player player, UpdateEvent updateEvent)
{
}
@Override
public void startEffect(Player player)
{
_effects.put(player.getUniqueId(), new FreedomFireworkEffect(player, Manager.getPlugin(), true));
_effects.get(player.getUniqueId()).start();
}
@Override
public void stopEffect(Player player)
{
if (_effects.containsKey(player.getUniqueId()))
_effects.get(player.getUniqueId()).stop();
}
}

View File

@ -0,0 +1,94 @@
package mineplex.core.gadget.gadgets.particle.unrelated;
import java.awt.*;
import java.util.Random;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.particles.ColoredParticle;
import mineplex.core.common.util.particles.DustSpellColor;
import mineplex.core.common.util.particles.NormalParticle;
import org.bukkit.Location;
import org.bukkit.plugin.java.JavaPlugin;
public class BabyFireworkEffect extends Effect
{
private Color _fireworkColor;
private Location _fireworkLocation;
private Random _random = new Random();
private int _count = 0, _fireworkCount = 0;
private boolean _multipleColors = false;
public BabyFireworkEffect(Location location, JavaPlugin javaPlugin, Color color)
{
super(10, new EffectLocation(location), javaPlugin, 2);
_fireworkColor = color;
_fireworkLocation = location.clone();
if (color == null)
{
_multipleColors = true;
_fireworkColor = Color.RED;
}
}
@Override
public void runEffect()
{
if (_count == 0)
{
double randX = _random.nextDouble() * 2 - 1, randY = _random.nextDouble() + .5,
randZ = _random.nextDouble() * 2 - 1;
_fireworkLocation = _fireworkLocation.clone().add(randX, randY, randZ);
}
if (_count < 6 && _count % 2 == 0)
{
NormalParticle normalParticle = new NormalParticle(UtilParticle.ParticleType.FIREWORKS_SPARK,
_fireworkLocation.clone());
normalParticle.display();
_fireworkLocation = _fireworkLocation.clone().add(0, .2, 0);
}
// Displays the colored baby firework
else if (_count == 6)
{
ColoredParticle coloredParticle = new ColoredParticle(UtilParticle.ParticleType.RED_DUST,
new DustSpellColor(_fireworkColor), _fireworkLocation.clone());
coloredParticle.display();
}
else
{
ColoredParticle coloredParticle = new ColoredParticle(UtilParticle.ParticleType.RED_DUST,
new DustSpellColor(_fireworkColor), _fireworkLocation.clone());
// Y UP
coloredParticle.setLocation(_fireworkLocation.clone().add(0, (_fireworkCount * .125), 0));
coloredParticle.display();
// Y DOWN
coloredParticle.setLocation(_fireworkLocation.clone().add(0, (_fireworkCount * .125) * -1, 0));
coloredParticle.display();
// X POSITIVE
coloredParticle.setLocation(_fireworkLocation.clone().add((_fireworkCount * .125), 0, 0));
coloredParticle.display();
// X NEGATIVE
coloredParticle.setLocation(_fireworkLocation.clone().add((_fireworkCount * .125) * -1, 0, 0));
coloredParticle.display();
// Z POSITIVE
coloredParticle.setLocation(_fireworkLocation.clone().add(0, 0, (_fireworkCount * .125)));
coloredParticle.display();
// Z NEGATIVE
coloredParticle.setLocation(_fireworkLocation.clone().add(0, 0, (_fireworkCount * .125) * -1));
coloredParticle.display();
_fireworkCount++;
if (_multipleColors)
{
if (_fireworkColor == Color.RED)
_fireworkColor = Color.WHITE;
else if (_fireworkColor == Color.WHITE)
_fireworkColor = Color.BLUE;
else
_fireworkColor = Color.RED;
}
}
_count++;
}
}

View File

@ -0,0 +1,56 @@
package mineplex.core.gadget.gadgets.particle.unrelated;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public abstract class Effect
{
public int _ticksToRun = 20, _ticks = 0, _task;
public long _delay = 1;
public EffectLocation _effectLocation;
protected JavaPlugin _javaPlugin;
public Effect(int ticks, EffectLocation effectLocation, JavaPlugin javaPlugin)
{
_ticksToRun = ticks;
_effectLocation = effectLocation;
_javaPlugin = javaPlugin;
}
public Effect(int ticks, EffectLocation effectLocation, JavaPlugin javaPlugin, long delay)
{
_ticksToRun = ticks;
_effectLocation = effectLocation;
_javaPlugin = javaPlugin;
_delay = delay;
}
public void start()
{
_task = Bukkit.getScheduler().scheduleSyncRepeatingTask(_javaPlugin, new Runnable()
{
@Override
public void run()
{
runEffect();
update();
}
}, 1, _delay);
}
public void stop()
{
Bukkit.getScheduler().cancelTask(_task);
}
private void update()
{
_ticks++;
if (_ticks == _ticksToRun)
Bukkit.getScheduler().cancelTask(_task);
}
public abstract void runEffect();
}

View File

@ -0,0 +1,40 @@
package mineplex.core.gadget.gadgets.particle.unrelated;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
public class EffectLocation
{
private Location _location;
private Entity _entity;
public EffectLocation(Location location)
{
_location = location;
_entity = null;
}
public EffectLocation(Entity entity)
{
_location = entity.getLocation();
_entity = entity;
}
public Location getLocation()
{
if (_entity != null && _entity.isValid() && !_entity.isDead())
return _entity.getLocation().clone();
if (_location != null)
return _location.clone();
return null;
}
public Location getFixedLocation()
{
if (_location != null)
return _location.clone();
return null;
}
}

View File

@ -0,0 +1,50 @@
package mineplex.core.gadget.gadgets.particle.unrelated;
import java.awt.*;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
public class FreedomFireworkEffect extends Effect
{
private Color _fireworkColor = Color.RED;
private int _count = 0, _max = -1;
private boolean _increaseY;
private Entity _playerEntity;
public FreedomFireworkEffect(Entity entity, JavaPlugin javaPlugin, boolean increaseY)
{
super(-1, new EffectLocation(entity), javaPlugin, 15);
_increaseY = increaseY;
_playerEntity = entity;
}
@Override
public void runEffect()
{
if (_playerEntity.isDead() || !_playerEntity.isValid())
{
this.stop();
return;
}
if (_count == _max)
{
this.stop();
return;
}
Location location = _effectLocation.getLocation().clone().add(0, (_increaseY) ? 1 : 0, 0);
BabyFireworkEffect babyFireworkEffect = new BabyFireworkEffect(location, _javaPlugin, _fireworkColor);
babyFireworkEffect.start();
_count++;
if (_fireworkColor == null)
_fireworkColor = Color.RED;
if (_fireworkColor == Color.RED)
_fireworkColor = Color.WHITE;
else if (_fireworkColor == Color.WHITE)
_fireworkColor = Color.BLUE;
else if (_fireworkColor == Color.BLUE)
_fireworkColor = null;
}
}

View File

@ -0,0 +1,85 @@
package mineplex.core.gadget.gadgets.particle.unrelated;
import java.awt.Color;
import mineplex.core.common.util.UtilFirework;
import mineplex.core.common.util.UtilParticle;
import mineplex.core.common.util.particles.ColoredParticle;
import mineplex.core.common.util.particles.DustSpellColor;
import org.bukkit.*;
import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;
public class FreedomTrailEffect extends Effect
{
private Color _color = Color.RED;
private long _count, _jumpingTimer = 0;
private boolean _isJumping = false;
private Entity _entity;
public FreedomTrailEffect(Entity entity, JavaPlugin javaPlugin)
{
super(-1, new EffectLocation(entity), javaPlugin);
_entity = entity;
}
@Override
public void runEffect()
{
if (!_entity.isValid() || _entity.isDead())
{
stop();
return;
}
ColoredParticle coloredParticle = new ColoredParticle(UtilParticle.ParticleType.RED_DUST,
new DustSpellColor(_color), _effectLocation.getLocation().clone().add(0, .5, 0));
for (int i = 0; i < 7; i++)
{
coloredParticle.setLocation(_effectLocation.getLocation().clone().add(0, .5, 0));
coloredParticle.display();
if (_isJumping)
{
coloredParticle.setLocation(_effectLocation.getLocation().clone().add(.25, .5, 0));
coloredParticle.display();
coloredParticle.setLocation(_effectLocation.getLocation().clone().add(0, .5, .25));
coloredParticle.display();
}
}
if (_isJumping)
{
_jumpingTimer++;
if (_jumpingTimer >= 30)
{
setJumping(false);
_jumpingTimer = 0;
}
}
_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;
}
public void setJumping(boolean jumping)
{
_isJumping = jumping;
if (_isJumping)
{
int r = (int) (Math.random() * 3);
UtilFirework.launchFirework(_effectLocation.getLocation().clone(), FireworkEffect.Type.BALL, (r == 0) ?
org.bukkit.Color.RED : (r == 1) ? org.bukkit.Color.WHITE : org.bukkit.Color.BLUE, false, false,
new Vector(0, 0.01, 0), 1);
}
}
}

View File

@ -62,19 +62,21 @@ public class WinEffectPodium extends WinEffectGadget
}
if(event.getType() != UpdateType.FAST) return;
spawnFirework(event.getTick());
Location loc = getBaseLocation();
for(int i = 0; i < 3; i++)
{
double r = 3;
double rad = (((Math.PI*2)/3.0)*i) + ((event.getTick()%240) * Math.PI/120.0);
double x = Math.sin(rad) * r;
double z = Math.cos(rad) * r;
Location l = loc.clone().add(x, 0, z);
UtilFirework.launchFirework(l, Type.BALL, Color.fromRGB(UtilMath.r(255*255*255)), false, true, new Vector(0, 0.01, 0), 1);
}
// Location loc = getBaseLocation();
//
// for(int i = 0; i < 3; i++)
// {
// double r = 3;
// double rad = (((Math.PI*2)/3.0)*i) + ((event.getTick()%240) * Math.PI/120.0);
// double x = Math.sin(rad) * r;
// double z = Math.cos(rad) * r;
//
// Location l = loc.clone().add(x, 0, z);
// UtilFirework.launchFirework(l, Type.BALL, Color.fromRGB(UtilMath.r(255*255*255)), false, true, new Vector(0, 0.01, 0), 1);
// }
}
@Override

View File

@ -8,7 +8,7 @@ import mineplex.core.common.util.BukkitFuture;
import mineplex.core.database.PlayerKeyValueRepository;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.types.Gadget;
import mineplex.core.gadget.types.GadgetGameModifier;
import mineplex.core.gadget.types.GameModifierGadget;
import mineplex.core.gadget.types.GadgetType;
import mineplex.core.gadget.types.OutfitGadget;
import org.bukkit.entity.Player;
@ -32,12 +32,15 @@ public class UserGadgetPersistence
{
for (Gadget gadget : _manager.getAllGadgets())
{
if (!gadget.ownsGadget(player))
continue;
GadgetType gadgetType = gadget.getGadgetType();
switch (gadgetType)
{
case MusicDisc:
case Item:
case Morph:
case Balloon:
break;
case Costume:
OutfitGadget outfitGadget = (OutfitGadget) gadget;
@ -45,24 +48,24 @@ public class UserGadgetPersistence
if (!values.containsKey(key))
continue;
if (values.get(key).equals(gadget.getName()))
gadget.enable(player);
gadget.enable(player, false);
break;
case GameModifier:
GadgetGameModifier gadgetGameModifier = (GadgetGameModifier) gadget;
if (gadgetGameModifier.canAllowMultiple())
GameModifierGadget gameModifierGadget = (GameModifierGadget) gadget;
if (gameModifierGadget.canAllowMultiple())
{
if (!values.containsKey(gadget.getName()))
continue;
if (values.get(gadget.getName()).equals("enabled"))
gadget.enable(player);
gadget.enable(player, false);
}
else
{
String dataKey = "activeModifier" + gadgetGameModifier.getGameType().getName().replace(" ", "");
String dataKey = "activeModifier" + gameModifierGadget.getGameType().getName().replace(" ", "");
if (!values.containsKey(dataKey))
continue;
if (values.get(dataKey).equals(gadget.getName()))
gadget.enable(player);
gadget.enable(player, false);
}
break;
default:

View File

@ -0,0 +1,22 @@
package mineplex.core.gadget.set;
import mineplex.core.gadget.GadgetManager;
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.particle.freedom.ParticleFreedom;
import mineplex.core.gadget.types.GadgetSet;
public class SetFreedom extends GadgetSet
{
public SetFreedom(GadgetManager manager)
{
super(manager, "Freedom Set", "Coming soon...",
manager.getGadget(ArrowTrailFreedom.class),
manager.getGadget(DeathFreedom.class),
manager.getGadget(DoubleJumpFreedom.class),
manager.getGadget(ParticleFreedom.class));
}
}

View File

@ -14,6 +14,7 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import org.bukkit.inventory.ItemStack;
public abstract class ArrowEffectGadget extends Gadget
{

View File

@ -0,0 +1,64 @@
package mineplex.core.gadget.types;
import java.util.*;
import mineplex.core.gadget.GadgetManager;
import org.bukkit.Material;
import org.bukkit.entity.Player;
public abstract class BalloonGadget extends Gadget
{
protected static final Map<UUID, List<BalloonGadget>> PLAYER_BALLOONS = new HashMap<>();
protected final Random _random;
public BalloonGadget(GadgetManager manager, String name, String[] desc, int cost, Material material, byte data, String... altNames)
{
super(manager, GadgetType.Balloon, name, desc, cost, material, data, 1, altNames);
_random = new Random();
}
protected boolean canSpawnBalloon(Player player)
{
if (PLAYER_BALLOONS.containsKey(player.getUniqueId()))
{
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
return balloonGadgets.size() < 10;
}
return true;
}
protected void addPlayerBalloon(Player player)
{
if (canSpawnBalloon(player))
{
PLAYER_BALLOONS.computeIfAbsent(player.getUniqueId(), list -> new ArrayList<>());
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.get(player.getUniqueId());
balloonGadgets.add(this);
PLAYER_BALLOONS.put(player.getUniqueId(), balloonGadgets);
}
}
protected void removePlayerBalloon(Player player)
{
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.computeIfPresent(player.getUniqueId(), (uuid, list) -> list);
if (balloonGadgets.contains(this))
{
balloonGadgets.remove(this);
}
if (balloonGadgets.size() >= 1)
PLAYER_BALLOONS.put(player.getUniqueId(), balloonGadgets);
else
PLAYER_BALLOONS.remove(player.getUniqueId());
}
protected double getNewHeight(Player player)
{
List<BalloonGadget> balloonGadgets = PLAYER_BALLOONS.computeIfPresent(player.getUniqueId(), (uuid, list) -> list);
if (balloonGadgets != null)
return balloonGadgets.size() * _random.nextDouble() * (_random.nextInt(1) + 2);
return 3;
}
}

View File

@ -93,16 +93,22 @@ public abstract class Gadget extends SalesPackageBase implements Listener
public void enable(Player player)
{
GadgetEnableEvent gadgetEvent = new GadgetEnableEvent(player, this);
enable(player, true);
}
public void enable(Player player, boolean message)
{
GadgetEnableEvent gadgetEvent = new GadgetEnableEvent(player, this);
Bukkit.getServer().getPluginManager().callEvent(gadgetEvent);
if (gadgetEvent.isCancelled())
{
UtilPlayer.message(player, F.main("Inventory", getName() + " is not enabled."));
return;
}
System.out.println(player.getName() + " has activated " + Name);
if (message)
System.out.println(player.getName() + " has activated " + Name);
Manager.setActive(player, this);
enableCustom(player);

View File

@ -16,7 +16,8 @@ public enum GadgetType
Hat("Hats", "activeHat"),
Taunt("Taunts", "activeTaunt"),
WinEffect("Win Effects", "activeWinEffect"),
GameModifier("Game Modifiers", "");
GameModifier("Game Modifiers", ""),
Balloon("Balloons", "");
private String _name;
private String _databaseKey;

View File

@ -11,7 +11,7 @@ import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType;
/**
* An abstract wrapper for Gadgets of the type GameModifiers
*/
public abstract class GadgetGameModifier extends Gadget
public abstract class GameModifierGadget extends Gadget
{
protected final GameModifierType _type;
@ -26,7 +26,7 @@ public abstract class GadgetGameModifier extends Gadget
* @param mat The display material used in GUIs
* @param data The display data used in GUIs
*/
public GadgetGameModifier(GadgetManager manager, GameModifierType type, String name, String[] desc, int cost, Material mat, byte data, boolean allowMultiple)
public GameModifierGadget(GadgetManager manager, GameModifierType type, String name, String[] desc, int cost, Material mat, byte data, boolean allowMultiple)
{
super(manager, GadgetType.GameModifier, name, desc, cost, mat, data);
_type = type;

View File

@ -1,5 +1,6 @@
package mineplex.core.gadget.types;
import mineplex.core.gadget.gadgets.hat.HatType;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -16,16 +17,23 @@ public abstract class HatGadget extends OutfitGadget
{
private ItemStack _hat;
private HatType _hatType;
public HatGadget(GadgetManager manager, String name, String[] desc, int cost, ItemStack item, String... altNames)
public HatGadget(GadgetManager manager, HatType type)
{
super(manager, name, desc, cost, ArmorSlot.Helmet, item.getType(), item.getData().getData(), altNames);
_hat = item;
super(manager, type.getName(), type.getLore(), type.getCost(), ArmorSlot.Helmet, type.getHat().getType(), type.getHat().getData().getData(), type.getAltNames());
_hat = type.getHat();
_hatType = type;
ItemMeta im = _hat.getItemMeta();
im.setDisplayName(C.cGreen + C.Bold + name);
im.setDisplayName(C.cGreen + C.Bold + type.getName());
_hat.setItemMeta(im);
}
public HatGadget(GadgetManager manager, String name, String[] desc, int cost, ItemStack item)
{
super(manager, name, desc, cost, ArmorSlot.Helmet, item.getType(), item.getData().getData());
}
public HatGadget(GadgetManager manager, String name, String[] desc, int cost, String playerName)
{
@ -92,7 +100,9 @@ public abstract class HatGadget extends OutfitGadget
removeArmor(player);
}
public HatType getHatType()
{
return _hatType;
}
}

View File

@ -14,7 +14,7 @@ public abstract class MorphGadget extends Gadget
public MorphGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data)
{
super(manager, GadgetType.Morph, name, desc, cost, mat, data);
}
}
public void ApplyArmor(Player player)
{

View File

@ -79,20 +79,4 @@ public abstract class OutfitGadget extends Gadget
else if (_slot == ArmorSlot.Legs) player.getInventory().setLeggings(null);
else if (_slot == ArmorSlot.Boots) player.getInventory().setBoots(null);
}
public String getDatabaseKey()
{
switch (_slot)
{
case Helmet:
return "activeCostumeHelmet";
case Chest:
return "activeCostumeChestplate";
case Legs:
return "activeCostumeLeggings";
case Boots:
return "activeCostumeBoots";
}
return "";
}
}

View File

@ -35,6 +35,7 @@ public abstract class ParticleGadget extends Gadget
{
Manager.removeGadgetType(player, GadgetType.Particle, this);
_active.add(player);
startEffect(player);
UtilPlayer.message(player, F.main("Gadget", "You summoned " + F.elem(getName()) + "."));
}
@ -42,7 +43,10 @@ public abstract class ParticleGadget extends Gadget
public void disableCustom(Player player)
{
if (_active.remove(player))
{
stopEffect(player);
UtilPlayer.message(player, F.main("Gadget", "You unsummoned " + F.elem(getName()) + "."));
}
}
public boolean shouldDisplay(Player player)
@ -74,4 +78,16 @@ public abstract class ParticleGadget extends Gadget
* @param event The update event
*/
public abstract void playParticle(Player player, UpdateEvent event);
/**
* Called when the effect starts
* @param player The player that activated it
*/
public void startEffect(Player player){}
/**
* Called when the effect ends
* @param player The player that disabled it
*/
public void stopEffect(Player player){}
}

View File

@ -1,5 +1,6 @@
package mineplex.core.gadget.types;
import java.awt.*;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
@ -7,9 +8,8 @@ import java.util.List;
import java.util.UUID;
import mineplex.core.common.util.*;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.*;
import org.bukkit.Color;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.ArmorStand;
@ -28,6 +28,7 @@ import mineplex.core.common.block.schematic.UtilSchematic;
import mineplex.core.disguise.disguises.DisguisePlayer;
import mineplex.core.gadget.GadgetManager;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector;
/**
* A wrapper for different win effects
@ -79,12 +80,12 @@ public abstract class WinEffectGadget extends Gadget
* @param mat The display material of the WinEffect
* @param data The display data of the WinEffect
* @param free Sets the gadget to be free for all the players by default
* @param alternativesalepackageNames Alternative packet names used to check if the player owns this WinEffect
* @param altName Alternative package names used to check if the player owns this WinEffect
*/
public WinEffectGadget(GadgetManager manager, String name, String[] desc, int cost, Material mat, byte data,
boolean free, String... alternativesalepackageNames)
boolean free, String... altName)
{
super(manager, GadgetType.WinEffect, name, desc, cost, mat, data, 1, free, alternativesalepackageNames);
super(manager, GadgetType.WinEffect, name, desc, cost, mat, data, 1, free, altName);
}
public void runPlay()
@ -319,4 +320,38 @@ public abstract class WinEffectGadget extends Gadget
}
}
public void spawnFirework(int tick, Color fireworkColor)
{
Location loc = getBaseLocation();
for(int i = 0; i < 3; i++)
{
double r = 3;
double rad = (((Math.PI * 2) / 3.0) * i) + ((tick % 240) * Math.PI / 120.0);
double x = Math.sin(rad) * r;
double z = Math.cos(rad) * r;
Location l = loc.clone().add(x, 0, z);
UtilFirework.launchFirework(l, FireworkEffect.Type.BALL, fireworkColor, false,
true, new Vector(0, 0.01, 0), 1);
}
}
public void spawnFirework(int tick)
{
Location loc = getBaseLocation();
for(int i = 0; i < 3; i++)
{
double r = 3;
double rad = (((Math.PI * 2) / 3.0) * i) + ((tick % 240) * Math.PI / 120.0);
double x = Math.sin(rad) * r;
double z = Math.cos(rad) * r;
Location l = loc.clone().add(x, 0, z);
UtilFirework.launchFirework(l, FireworkEffect.Type.BALL, Color.fromRGB(UtilMath.r(255 * 255 * 255)), false,
true, new Vector(0, 0.01, 0), 1);
}
}
}

View File

@ -16,7 +16,7 @@ public class DragonMount extends Mount<DragonData>
}
@Override
public void EnableCustom(final Player player)
public void enableCustom(final Player player)
{
player.leaveVehicle();
player.eject();
@ -36,7 +36,7 @@ public class DragonMount extends Mount<DragonData>
}
@Override
public void Disable(Player player)
public void disable(Player player)
{
DragonData data = _active.remove(player);
if (data != null)

View File

@ -82,7 +82,7 @@ public class HorseMount extends Mount<SingleEntityMountData<Horse>>
}
}
public void EnableCustom(Player player)
public void enableCustom(Player player)
{
player.leaveVehicle();
player.eject();
@ -117,7 +117,7 @@ public class HorseMount extends Mount<SingleEntityMountData<Horse>>
_active.put(player, mount);
}
public void Disable(Player player)
public void disable(Player player)
{
SingleEntityMountData<Horse> mount = _active.remove(player);
if (mount != null)

View File

@ -41,7 +41,7 @@ public abstract class Mount<T extends MountData> extends SalesPackageBase implem
}
public final void Enable(Player player)
public final void enable(Player player)
{
MountActivateEvent gadgetEvent = new MountActivateEvent(player, this);
Bukkit.getServer().getPluginManager().callEvent(gadgetEvent);
@ -52,56 +52,56 @@ public abstract class Mount<T extends MountData> extends SalesPackageBase implem
return;
}
EnableCustom(player);
enableCustom(player);
Manager.setActive(player, this);
}
public abstract void EnableCustom(Player player);
public abstract void Disable(Player player);
public abstract void enableCustom(Player player);
public abstract void disable(Player player);
public void DisableForAll()
public void disableForAll()
{
for (Player player : UtilServer.getPlayers())
Disable(player);
disable(player);
}
@EventHandler
public void PlayerJoin(PlayerJoinEvent event)
public void playerJoin(PlayerJoinEvent event)
{
if (event.getPlayer().isOp())
_owners.add(event.getPlayer());
}
@EventHandler
public void PlayerQuit(PlayerQuitEvent event)
public void playerQuit(PlayerQuitEvent event)
{
_owners.remove(event.getPlayer());
Disable(event.getPlayer());
disable(event.getPlayer());
}
public HashSet<Player> GetOwners()
public HashSet<Player> getOwners()
{
return _owners;
}
public HashMap<Player, T> GetActive()
public HashMap<Player, T> getActive()
{
return _active;
}
public boolean IsActive(Player player)
public boolean isActive(Player player)
{
return _active.containsKey(player);
}
public boolean HasMount(Player player)
public boolean hasMount(Player player)
{
return _owners.contains(player);
}
public T getMountData(Entity ent)
{
for(T data : GetActive().values())
for(T data : getActive().values())
{
if(data.isPartOfMount(ent)) return data;
}

View File

@ -3,6 +3,7 @@ package mineplex.core.mount;
import java.util.ArrayList;
import java.util.List;
import mineplex.core.mount.types.*;
import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@ -23,17 +24,6 @@ import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.donation.DonationManager;
import mineplex.core.mount.types.MountBabyReindeer;
import mineplex.core.mount.types.MountCart;
import mineplex.core.mount.types.MountDragon;
import mineplex.core.mount.types.MountFrost;
import mineplex.core.mount.types.MountMule;
import mineplex.core.mount.types.MountSlime;
import mineplex.core.mount.types.MountSpider;
import mineplex.core.mount.types.MountTitan;
import mineplex.core.mount.types.MountUndead;
import mineplex.core.mount.types.MountValentinesSheep;
import mineplex.core.mount.types.MountZombie;
public class MountManager extends MiniPlugin
{
@ -72,6 +62,7 @@ public class MountManager extends MiniPlugin
_types.add(new MountTitan(this));
_types.add(new MountBabyReindeer(this));
_types.add(new MountValentinesSheep(this));
_types.add(new MountFreedomHorse(this));
//_types.add(new MountSheep(this));
}
@ -84,7 +75,7 @@ public class MountManager extends MiniPlugin
public void DeregisterAll(Player player)
{
for (Mount<?> mount : _types)
mount.Disable(player);
mount.disable(player);
}
@EventHandler
@ -125,13 +116,13 @@ public class MountManager extends MiniPlugin
{
for (Mount<?> mount : _types)
for (Player player : UtilServer.getPlayers())
mount.Disable(player);
mount.disable(player);
}
public void DisableAll(Player player)
{
for (Mount<?> mount : _types)
mount.Disable(player);
mount.disable(player);
}
@EventHandler
@ -200,6 +191,17 @@ public class MountManager extends MiniPlugin
return null;
}
public Mount<?> getMount(String name)
{
Mount<?> fMount = null;
for (Mount<?> mount : _types)
{
if (mount.getName().equalsIgnoreCase(name))
fMount = mount;
}
return fMount;
}
public boolean isMount(Entity ent)
{
return getMount(ent) != null;

View File

@ -37,9 +37,9 @@ public class MountBabyReindeer extends HorseMount
}
@Override
public void EnableCustom(Player player) {
super.EnableCustom(player);
Horse horse = GetActive().get(player).getEntity();
public void enableCustom(Player player) {
super.enableCustom(player);
Horse horse = getActive().get(player).getEntity();
horse.setBaby();
horse.setMaxHealth(20);
}
@ -49,7 +49,7 @@ public class MountBabyReindeer extends HorseMount
{
if(event.getType() != UpdateType.TICK) return;
for(SingleEntityMountData<Horse> horse : GetActive().values())
for(SingleEntityMountData<Horse> horse : getActive().values())
{
if(horse.getEntity().getPassenger() != horse.getOwner()) continue;
@ -66,7 +66,7 @@ public class MountBabyReindeer extends HorseMount
@EventHandler
public void onClick(PlayerInteractEntityEvent event)
{
if(!IsActive(event.getPlayer())) return;
if(!isActive(event.getPlayer())) return;
SingleEntityMountData<Horse>data = getMountData(event.getRightClicked());
if(data == null) return;
if(data.getOwner() != event.getPlayer()) return;

View File

@ -36,7 +36,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
KnownPackage = false;
}
public void EnableCustom(Player player)
public void enableCustom(Player player)
{
player.leaveVehicle();
player.eject();
@ -53,7 +53,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
_active.put(player, mount);
}
public void Disable(Player player)
public void disable(Player player)
{
SingleEntityMountData<Minecart> mount = _active.remove(player);
if (mount != null)
@ -88,10 +88,10 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
@EventHandler
public void target(EntityTargetEvent event)
{
if (!GetActive().containsKey(event.getTarget()))
if (!getActive().containsKey(event.getTarget()))
return;
if (!GetActive().get(event.getTarget()).equals(event.getEntity()))
if (!getActive().get(event.getTarget()).equals(event.getEntity()))
event.setCancelled(true);
}
@ -102,7 +102,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
return;
//Bounce
for (SingleEntityMountData<Minecart> cartData : GetActive().values())
for (SingleEntityMountData<Minecart> cartData : getActive().values())
{
Minecart cart = cartData.getEntity();
@ -124,7 +124,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
}
//Collide
for (SingleEntityMountData<Minecart> cartData : GetActive().values())
for (SingleEntityMountData<Minecart> cartData : getActive().values())
{
Minecart cart = cartData.getEntity();
@ -139,7 +139,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
if (!Recharge.Instance.usable(player, getName() + " Collide"))
continue;
for (SingleEntityMountData<Minecart> otherData : GetActive().values())
for (SingleEntityMountData<Minecart> otherData : getActive().values())
{
Minecart other = otherData.getEntity();
if (other.equals(cart))
@ -178,7 +178,7 @@ public class MountCart extends Mount<SingleEntityMountData<Minecart>>
@EventHandler
public void cancelBreak(VehicleDamageEvent event)
{
if (GetActive().values().contains(event.getVehicle()))
if (getActive().values().contains(event.getVehicle()))
event.setCancelled(true);
}
}

View File

@ -38,7 +38,7 @@ public class MountDragon extends DragonMount
{
if (event.getType() == UpdateType.TICK)
{
for (DragonData data : GetActive().values())
for (DragonData data : getActive().values())
{
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, data.Dragon.getLocation().add(0, 1, 0),
1f, 1f, 1f, 0f, 20,
@ -53,14 +53,14 @@ public class MountDragon extends DragonMount
if (event.getType() != UpdateType.TICK)
return;
for (DragonData data : GetActive().values())
for (DragonData data : getActive().values())
data.Move();
HashSet<Player> toRemove = new HashSet<Player>();
for (Player player : GetActive().keySet())
for (Player player : getActive().keySet())
{
DragonData data = GetActive().get(player);
DragonData data = getActive().get(player);
if (data == null)
{
toRemove.add(player);
@ -76,25 +76,25 @@ public class MountDragon extends DragonMount
}
for (Player player : toRemove)
Disable(player);
disable(player);
}
@EventHandler
public void DragonTargetCancel(EntityTargetEvent event)
{
if (GetActive().containsValue(event.getEntity()))
if (getActive().containsValue(event.getEntity()))
event.setCancelled(true);
}
public void SetName(String news)
{
for (DragonData dragon : GetActive().values())
for (DragonData dragon : getActive().values())
dragon.Dragon.setCustomName(news);
}
public void setHealthPercent(double healthPercent)
{
for (DragonData dragon : GetActive().values())
for (DragonData dragon : getActive().values())
{
double health = healthPercent * dragon.Dragon.getMaxHealth();
if (health <= 0.0)

View File

@ -0,0 +1,80 @@
package mineplex.core.mount.types;
import java.util.*;
import java.util.List;
import mineplex.core.common.util.C;
import mineplex.core.common.util.LineFormat;
import mineplex.core.common.util.UtilText;
import mineplex.core.gadget.gadgets.particle.unrelated.FreedomTrailEffect;
import mineplex.core.mount.HorseMount;
import mineplex.core.mount.MountManager;
import mineplex.core.mount.SingleEntityMountData;
import mineplex.core.recharge.Recharge;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.HorseJumpEvent;
import org.bukkit.inventory.ItemStack;
public class MountFreedomHorse extends HorseMount
{
private Map<SingleEntityMountData<Horse>, FreedomTrailEffect> _trailMap = new HashMap<>();
public MountFreedomHorse(MountManager manager)
{
super(manager, "Freedom Mount",
UtilText.splitLineToArray(UtilText.colorWords("The British might be coming, but with this impressive mount you have nothing to fear.",
ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE),
Material.FIREWORK, (byte) 0, -7, Horse.Color.WHITE, Horse.Style.WHITE, Horse.Variant.HORSE, 1, null);
}
@Override
public void enableCustom(Player player)
{
super.enableCustom(player);
SingleEntityMountData<Horse> horseData = getActive().get(player);
horseData.getEntity().getInventory().setArmor(new ItemStack(Material.DIAMOND_BARDING));
_trailMap.put(horseData, new FreedomTrailEffect(horseData.getEntity(), Manager.getPlugin()));
_trailMap.get(horseData).start();
}
@Override
public void disable(Player player)
{
super.disable(player);
List<SingleEntityMountData<Horse>> toRemove = new ArrayList<>();
for (SingleEntityMountData<Horse> horseData : _trailMap.keySet())
{
if (horseData.getOwner().equals(player))
toRemove.add(horseData);
}
for (SingleEntityMountData<Horse> horseData : toRemove)
{
_trailMap.get(horseData).stop();
_trailMap.remove(horseData);
}
}
@EventHandler
public void horseJump(HorseJumpEvent event)
{
for (SingleEntityMountData<Horse> horseData : _trailMap.keySet())
{
if (horseData.getEntity().equals(event.getEntity()))
{
if (!Recharge.Instance.use(horseData.getOwner(), getName(), 2500, false, false, "Cosmetics"))
{
event.setPower(0f);
event.setCancelled(true);
return;
}
_trailMap.get(horseData).setJumping(true);
}
}
}
}

View File

@ -36,7 +36,7 @@ public class MountFrost extends HorseMount
public void Trail(UpdateEvent event)
{
if (event.getType() == UpdateType.TICK)
for (SingleEntityMountData<Horse> horseData : GetActive().values())
for (SingleEntityMountData<Horse> horseData : getActive().values())
{
Horse horse = horseData.getEntity();
UtilParticle.PlayParticleToAll(ParticleType.SNOW_SHOVEL, horse.getLocation().add(0, 1, 0),

View File

@ -36,7 +36,7 @@ public class MountSheep extends HorseMount
}
@Override
public void EnableCustom(Player player)
public void enableCustom(Player player)
{
player.leaveVehicle();
player.eject();
@ -69,7 +69,7 @@ public class MountSheep extends HorseMount
if (event.getType() != UpdateType.TICK)
return;
for (SingleEntityMountData<Horse> horseData : GetActive().values())
for (SingleEntityMountData<Horse> horseData : getActive().values())
{
Horse horse = horseData.getEntity();

View File

@ -37,7 +37,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
KnownPackage = false;
}
public void EnableCustom(Player player)
public void enableCustom(Player player)
{
player.leaveVehicle();
player.eject();
@ -57,7 +57,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
_active.put(player, mount);
}
public void Disable(Player player)
public void disable(Player player)
{
SingleEntityMountData<Slime> mount = _active.remove(player);
if (mount != null)
@ -77,7 +77,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
if (event.getRightClicked() == null)
return;
SingleEntityMountData<Slime> data = GetActive().get(event.getPlayer());
SingleEntityMountData<Slime> data = getActive().get(event.getPlayer());
if(data == null) return;
@ -94,10 +94,10 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
@EventHandler
public void target(EntityTargetEvent event)
{
if (!GetActive().containsKey(event.getTarget()))
if (!getActive().containsKey(event.getTarget()))
return;
if (!GetActive().get(event.getTarget()).equals(event.getEntity()))
if (!getActive().get(event.getTarget()).equals(event.getEntity()))
event.setCancelled(true);
}
@ -108,7 +108,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
return;
//Bounce
for (SingleEntityMountData<Slime> slimeData : GetActive().values())
for (SingleEntityMountData<Slime> slimeData : getActive().values())
{
Slime slime = slimeData.getEntity();
@ -139,7 +139,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
}
//Collide
for (SingleEntityMountData<Slime> slimeData : GetActive().values())
for (SingleEntityMountData<Slime> slimeData : getActive().values())
{
Slime slime = slimeData.getEntity();
if (slime.getPassenger() == null)
@ -153,7 +153,7 @@ public class MountSlime extends Mount<SingleEntityMountData<Slime>>
if (!Recharge.Instance.usable(player, getName() + " Collide"))
continue;
for (SingleEntityMountData<Slime> otherSlime : GetActive().values())
for (SingleEntityMountData<Slime> otherSlime : getActive().values())
{
Slime other = otherSlime.getEntity();

View File

@ -55,7 +55,7 @@ public class MountSpider extends HorseMount
}
@Override
public void EnableCustom(Player player)
public void enableCustom(Player player)
{
player.leaveVehicle();
player.eject();
@ -105,9 +105,9 @@ public class MountSpider extends HorseMount
return;
ArrayList<Horse> used = new ArrayList<Horse>();
for (Player player : GetActive().keySet())
for (Player player : getActive().keySet())
{
Horse horse = GetActive().get(player).getEntity();
Horse horse = getActive().get(player).getEntity();
used.add(horse);
@ -128,7 +128,7 @@ public class MountSpider extends HorseMount
if (event.getType() != UpdateType.TICK)
return;
for (Entry<Player, SingleEntityMountData<Horse>> entry : GetActive().entrySet())
for (Entry<Player, SingleEntityMountData<Horse>> entry : getActive().entrySet())
{
Player player = entry.getKey();
Horse horse = entry.getValue().getEntity();
@ -194,9 +194,9 @@ public class MountSpider extends HorseMount
if (event.getType() != UpdateType.TICK)
return;
for (Player player : GetActive().keySet())
for (Player player : getActive().keySet())
{
final Horse horse = GetActive().get(player).getEntity();
final Horse horse = getActive().get(player).getEntity();
if (horse.getPassenger() != player)
continue;

View File

@ -31,9 +31,9 @@ public class MountTitan extends Mount<MountTitanData>
}
@Override
public void EnableCustom(Player player)
public void enableCustom(Player player)
{
if(GetActive().size() >= 3)
if(getActive().size() >= 3)
{
UtilPlayer.message(player, F.main("Mount", "The maximum amount of simultaneous " + F.elem(getName()) + " in this lobby has been reached."));
return;
@ -53,7 +53,7 @@ public class MountTitan extends Mount<MountTitanData>
}
@Override
public void Disable(Player player)
public void disable(Player player)
{
MountTitanData data = _active.remove(player);
if (data != null)
@ -85,7 +85,7 @@ public class MountTitan extends Mount<MountTitanData>
if (event.getRightClicked() == null)
return;
for(MountTitanData mount : GetActive().values())
for(MountTitanData mount : getActive().values())
{
if(mount.isPartOfMount(event.getRightClicked()))
{
@ -94,10 +94,10 @@ public class MountTitan extends Mount<MountTitanData>
}
}
if (!GetActive().containsKey(event.getPlayer()))
if (!getActive().containsKey(event.getPlayer()))
return;
if (!GetActive().get(event.getPlayer()).ownsMount(event.getPlayer()))
if (!getActive().get(event.getPlayer()).ownsMount(event.getPlayer()))
{
UtilPlayer.message(event.getPlayer(), F.main("Mount", "This is not your Mount!"));
return;
@ -106,7 +106,7 @@ public class MountTitan extends Mount<MountTitanData>
event.getPlayer().leaveVehicle();
event.getPlayer().eject();
GetActive().get(event.getPlayer()).mount(event.getPlayer(), event.getRightClicked());
getActive().get(event.getPlayer()).mount(event.getPlayer(), event.getRightClicked());
}
@EventHandler
@ -115,10 +115,10 @@ public class MountTitan extends Mount<MountTitanData>
if (!(event.getEntity() instanceof Player))
return;
if (!GetActive().containsKey(event.getTarget()))
if (!getActive().containsKey(event.getTarget()))
return;
if (!GetActive().get(event.getTarget()).ownsMount((Player)event.getEntity()))
if (!getActive().get(event.getTarget()).ownsMount((Player)event.getEntity()))
event.setCancelled(true);
}

View File

@ -35,7 +35,7 @@ public class MountUndead extends HorseMount
public void Trail(UpdateEvent event)
{
if (event.getType() == UpdateType.TICK)
for (SingleEntityMountData<Horse> horseData : GetActive().values())
for (SingleEntityMountData<Horse> horseData : getActive().values())
{
Horse horse = horseData.getEntity();
UtilParticle.PlayParticleToAll(ParticleType.FLAME, horse.getLocation().add(0, 1, 0),
@ -43,7 +43,7 @@ public class MountUndead extends HorseMount
}
if (event.getType() == UpdateType.FAST)
for (SingleEntityMountData<Horse> horseData : GetActive().values())
for (SingleEntityMountData<Horse> horseData : getActive().values())
{
Horse horse = horseData.getEntity();
UtilParticle.PlayParticleToAll(ParticleType.LAVA, horse.getLocation().add(0, 1, 0),

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