From e9fea233826d6f3360a53bb7ce1cc6364166a960 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:28:39 -0400 Subject: [PATCH 01/34] Add gaussian methods to UtilMath --- .../mineplex/core/common/util/UtilMath.java | 118 ++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/Plugins/Mineplex.Core.Common.Base/src/mineplex/core/common/util/UtilMath.java b/Plugins/Mineplex.Core.Common.Base/src/mineplex/core/common/util/UtilMath.java index 5e37e0ac5..1b3b40835 100644 --- a/Plugins/Mineplex.Core.Common.Base/src/mineplex/core/common/util/UtilMath.java +++ b/Plugins/Mineplex.Core.Common.Base/src/mineplex/core/common/util/UtilMath.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; import org.bukkit.Location; import org.bukkit.entity.Entity; @@ -13,6 +14,8 @@ import org.bukkit.util.Vector; public class UtilMath { + public static final double TAU = Math.PI * 2D; + public static double trim(int degree, double d) { String format = "#.#"; @@ -332,4 +335,119 @@ public class UtilMath return min; } + + /** + * Creates an array of points, arranged in a circle normal to a vector. + * + * @param center The center of the circle. + * @param normal A vector normal to the circle. + * @param radius The radius of the circle. + * @param points How many points to make up the circle. + * + * @return An array of points of the form double[point #][x=0, y=1, z=3]. + */ + public static double[][] normalCircle(Location center, Vector normal, double radius, int points) + { + return normalCircle(center.toVector(), normal, radius, points); + } + + /** + * Creates an array of points, arranged in a circle normal to a vector. + * + * @param center The center of the circle. + * @param normal A vector normal to the circle. + * @param radius The radius of the circle. + * @param points How many points to make up the circle. + * + * @return An array of points of the form double[point #][x=0, y=1, z=3]. + */ + public static double[][] normalCircle(Vector center, Vector normal, double radius, int points) + { + Vector n = normal.clone().normalize(); + Vector a = n.clone().add(new Vector(1, 1, 1)).crossProduct(n).normalize(); + Vector b = n.getCrossProduct(a).normalize(); + + double[][] data = new double[points][3]; + + double interval = TAU / points; + double theta = 0; + + for (int i = 0; i < points; i++) + { + data[i][0] = center.getX() + (radius * ((Math.cos(theta) * a.getX()) + (Math.sin(theta) * b.getX()))); + data[i][1] = center.getY() + (radius * ((Math.cos(theta) * a.getY()) + (Math.sin(theta) * b.getY()))); + data[i][2] = center.getZ() + (radius * ((Math.cos(theta) * a.getZ()) + (Math.sin(theta) * b.getZ()))); + theta += interval; + } + + return data; + } + + /** + * Slightly randomize a location with a standard deviation of one. + * + * @param location The location to randomize. + * + * @return The original location, now gaussian-randomized. + */ + public static Location gauss(Location location) + { + return gauss(location, 1, 1, 1); + } + + /** + * Slightly randomize a vector with a standard deviation of one. + * + * @param vector The location to randomize. + * + * @return The randomized vector, now gaussian-randomized. + */ + public static Vector gauss(Vector vector) + { + return gauss(vector, 1, 1, 1); + } + + /** + * Slightly randomize a location with a standard deviation of one.
+ * + * This method only accepts positive values for all of its arguments.
+ * + * A good parameter set for small offsets is (loc, 10, 10, 10). + * + * @param location The location to randomize. + * @param x A granularity control for the x-axis, higher numbers = less randomness + * @param y A granularity control for the y-axis, higher numbers = less randomness + * @param z A granularity control for the z-axis, higher numbers = less randomness + * + * @return The original location, now gaussian-randomized + */ + public static Location gauss(Location location, double x, double y, double z) + { + return location.clone().add( + x <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / x), + y <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / y), + z <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / z)); + } + + /** + * Slightly randomize a vector with a standard deviation of one.
+ * + * This method only accepts positive values for all of its arguments.
+ * + * A good parameter set for small offsets is (loc, 10, 10, 10). + * + * @param vector The location to randomize. + * @param x A granularity control for the x-axis, higher numbers = less randomness + * @param y A granularity control for the y-axis, higher numbers = less randomness + * @param z A granularity control for the z-axis, higher numbers = less randomness + * + * @return The randomized vector, now gaussian-randomized + */ + public static Vector gauss(Vector vector, double x, double y, double z) + { + return vector.clone().add(new Vector( + x <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / x), + y <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / y), + z <= 0 ? 0 : (ThreadLocalRandom.current().nextGaussian() / z))); + } } From 845e96109b2be51bfe7254582812f23e0e7c3e59 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:29:02 -0400 Subject: [PATCH 02/34] Add Hat skin data --- .../src/mineplex/core/common/skin/SkinData.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java index f803154ce..6b7b7a675 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java @@ -78,6 +78,8 @@ public class SkinData public static final SkinData LARISSA = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTc0NjE0MTUxMzQsInByb2ZpbGVJZCI6Ijg1MmE4YWNmNzMzNzQwZDc5OWVjYjA4ZmQ5OTY1MGI1IiwicHJvZmlsZU5hbWUiOiJLaW5nQ3JhenlfIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9jYThjNDRhOWVmZTY3NzExMDYzMjM5ODEwNDRmOTdjYmM1OWJmZmRlOGI1ODdlMGQzMWE4N2ViMDhhMmExZiJ9fX0=", "Lyac51CrnMK/CI2dWgGQLowAm/ZnQMpf0Ict/gqVrUgJVlGWDIVG77Rd1JyMQDEeESvTmoyivH+usiO0ePW95qjisqT3R43YEmLi85CqctGYqLKeSYpGYwYRz8Euw57LwJAALKOMLhVc2s4h2Or9nTecunG8KSmkCuZc4H1qh3frU+ltuV4HLqgdFUULbIHTggyvqiINov2tBqkkXeEjT7sOcTJCJNgNYU2O7//qg5kJmhso2CKHlRLpmy9LsaUK/Z+BzUmoRbwQgSwr3mz7dFAdlVWWKvKNcgX3nt1et0DIig3JKYmrnQX2Fprg+kWcr3nuizzLgjVwAlADC48P3DN0s/VBty2AYoWie16VNPIM+CV4BF2JRQ34GxZ8XceXbCKURrOjoCBgLGHvIhRW35eicoh26xp3/mwLvk5anPi5StJ/qEuzWJALeWcNbLsnt21m2MZp9h/MxaY6ftWOTzjTr5CYVd/teJyscMnGK4+lcV1dlt12lhbDMv6I+iz8iG9NIzuW5OvGkax90dA/Gq+Cd9FXVThPY4ufxWttHcTqgPB64GfMn6rywRm1B0eO1pJpYc/KlJZlW/PuaO8L1assyJs5KkOypBSy3zc6TO6pzgeOZv+VpQfA/UWpogv6ofmTpgdtwpjLFGSzIKTDXvF6FftALKVlYypG0fYbssA="); public static final SkinData ROWENA = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTc0Njk1MTcxOTgsInByb2ZpbGVJZCI6Ijg1MmE4YWNmNzMzNzQwZDc5OWVjYjA4ZmQ5OTY1MGI1IiwicHJvZmlsZU5hbWUiOiJLaW5nQ3JhenlfIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9jNDY1OGExODY4YzNhNjhhZWVhZmZkOTUxZDQyYmZkN2QxYTRjNGZjNDJjZDI2YTlmYzhkNTNmOTkxMTM1ZCJ9fX0=", "OqXMyH9SMmQ/Pwmb21In29YnCxbsN6yqUxfudN6KNgDwRUK6y072XhW6TIoTh9JQLAUKftpeVB53tk0LxHIxnsuBMrIHvETPDQFysIc/6xq3ABogs+zqFzcp5jk6S73HiD78JxLq5pzfUzhgDPMPuZP5Q/u2q1rYbe6B9lVEJ5sUcxBLUTossgucoR4qXYAlWVQdHRhq85Ol8a+OU7ruw3HackNGto6wt6u2MigCtiHVTt9XhJ/AJE4ScodQ3XwW4L6urpl/lV2OMCsr3mCjjjEz2EMhDbCWxrAorQ9aPpMbDkHBS+4TC1tbMGUlKhj5n+EZBYVaeLr4NGPACPSdT35p/2Zra49+DXn9Xn+681yNEB0ghTdsnsgwXg76+HVPHPqRHQMuTBQGQyGZaaTX/zE0tFjH+osMElLdb8dmz3dC7kQA4A13B2phj3YbMSF1FoU4GvnPKIQn6JIuEd6hd+pRLUW7Y+mgYIHHX1FT0ihrXAyVO6lQQ6rs92gSQr7sxC7tnhPSMFcmh7OcJYcbRpn97GMubthPLanOhVy7CKqjmwIkEVtYgP28idigKwNJ+sJuUONrOu7nMKl1UTD5EEapOacc/np6UhdSw8yW+LnWD/x9ueYz9ksnyRrJgcOa41izo/WCbjPK/j3JVezr9Q3x1yveWuFmdl7CGYdXngw="); public static final SkinData BIFF = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTc0NjEzMDQzNjYsInByb2ZpbGVJZCI6Ijg1MmE4YWNmNzMzNzQwZDc5OWVjYjA4ZmQ5OTY1MGI1IiwicHJvZmlsZU5hbWUiOiJLaW5nQ3JhenlfIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9mOWMyMTE3ZDY0ZWE0ZmUxMWZiY2NhZmE2YzU5YzhlZjY3NDVkZjVkMTZjM2QwMmI4NmI2OTlmZWJjNTA0OGI1In19fQ==", "mJMpEvQ4A02z0S/chgLm5bKrrrd+zmp7A0012AB7b3KlyIHoLKEDDz+ZJgJtvN6skOqed3P+yNVqkxitugXaZZP8Af9J+/TseHn+vOy6CTK5tykRSY3Zb8Zmw1kn36v/SARAVtDIHD53yuPgJayYSAbVB7aknj1Q8XBQGUmZRMRxWWxeD7rQTOwgRYI4YJeKFf4UL9i6zxvOJuHsOAouJ7scu7VohG8vgR77Js/Z8rSu8/aSG+O9AQdzP6h9ixYNFkkQOHm7DseK/5tsWKHM4FYBgjIDKt3ApQokSbhThzGB55BA1qjXZkfCoOb13y1nOMC8WoIL6Ees1qzxG3VloGx2WAZLh+Q+/irwrFDMxk1zeU5fIRuj1c/UIM2HKdxxWgoRdrZ8ww/Jrll6maiOBx7geMn/0aOUbJ2U7gkTif6RG6YNS5YN9ZQDLh72l/akJMxF3SlmuAPmLs2kBghQ6eD2YQKuxWR/Hf1yS1YXtogFVNsGnzC1nda7F48EGL3zI+kCajbDlAGQ32aRt0btbEQ+Gj575kir3Aa53qiZ0YOIYQlhgZdOsTN2NE2s8uuy/15Rgc6K3ydgEmSZfdqyMyW0Dy7pE5TfVL8DumKRVRXdOceT5WfnW7MyqSmdorP5ab1fw2wLOnAVzhJmW8oXXNSs77WJ1/PURclxOWB4IF8="); + public static final SkinData CANADA_HAT = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTg2MDE5MDYwNzYsInByb2ZpbGVJZCI6IjdkYTJhYjNhOTNjYTQ4ZWU4MzA0OGFmYzNiODBlNjhlIiwicHJvZmlsZU5hbWUiOiJHb2xkYXBmZWwiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2M2MTExNTNmODdmMjZjMzRmOTdkODIxM2ZmOTk1ZGJlNjcyZWJkNGM0NjRkNGFkNzM5MWFlNDNjMWU3YTllIn19fQ", "QMw6e1FXl/Xrt+BbfPKsz3OHyOxL9CEPffS9grxRLD6gbLbMD84OT3+bge5V9lBFn9PPnTyID+WTF24qHj4ADTTgK94ykNedCEO6R1wS0FZKPI1UjwOxMhIG5ZeVr7+HxITgGU4Xz94IigBkvW//f2ZGelMvS0GLCrm4iCovEBMUzyYJ2dZ4xgzFSH6v+9efK4/SBAJaj8mHjXpDxU58/vskTGI3T9t5sWlZLXgId9vHcMj0GH3Un6yvUXiMkh38V/rAEM8/R8q08xUVyW0e2R38qWQV2+eKvsG8GmJmgkU/78wA9cKGZdrEz0pnr80eGNCbvXqQvC/czYhEhDapgxfndcHLX8q/Zk3I8msNr340E4ZrQL61Yl7KcVC1qEUQVu3cosq5A6ckXLGvv//HSwXVO8M9ThUbuEC8QjiS/fMFufnVa18lHrVulnfb/2KQ4yPsoCHK/zvGtRkWtD1sLOIfehN+sxCLiaz80ILBiwN0oHITfNHpJzoa4kF/OrxxCualp4Sv5o5TXBv7aWsO18v9ixb9o9CmJKKE8MUl5xmRVz4HQD4dyOfcwtPuxmfcYjJrxqBijdQMrcgLzqqMs+DUqcZZlxM7M5GaNUoEvL9tJNGpZaB2OrBw0DTk5wx15XfANCH4egx8X4+Iy2RUoFthHX3BsVazG7fjSiDnUtI="); + public static final SkinData AMERICA_HAT = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTg2MDI3MjMyODgsInByb2ZpbGVJZCI6IjNlMjZiMDk3MWFjZDRjNmQ5MzVjNmFkYjE1YjYyMDNhIiwicHJvZmlsZU5hbWUiOiJOYWhlbGUiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzYzMjI0MDhkYzBiZjMxNjU4N2RiNDJiN2Q5ZmViZTUwYWQ4MGY0OGU4Njc5YzI0NTFkOTk3MTdjZmVjNTdkYWQifX19","oRo6DIuhOTaXDkFsgwJ488LWqx5d1QpwtglwG1SdEvkbX1aCMGdZyDm9YIopQRjfBg0uYKQFetOZ1ZkdMmc/aKC5/dm0+Ema7g8AUzjwf4OaSLH1r4C1UJ4ruaNG5diBxNTkYnMa7yT8zvyEr22CA7lUOIgTh8ymBfSGK35RPhsn8jM0hDjdhjemBAlxKpiioByfmAQbwokNBOrXfh/PnKq+iJYg4WpMSZ1zo5Rr0CzLXwu+/T3dvrb6mg7qry7J3Lj5/qn6iIdBcjJBeyvy1sCo45jQ3Rzc6oL/84Vu5Dpn395EqUK8Sa7mdpVpATTcj56TCjkNNtDapXNqyO/IIQuzU4wnBKNQmZefaxRl6LV0DhZ8n8YQaPj6hH/mr2oDsd23+jejjqu6Y95ReTyukp06mIGqgekmrdZV2etML2oMAOTv9ieVvqtfo5gEomYs+NFAL7rMmzjAlhd17VOgqNRMpmJazAHWOYKl8KdOH99wGDe5XcyKHysh+qyHKMvhPJztIeAEaosynF/aGHghH2PM354KCuUVNmdR5G7UZUoG9ZA5ZU3EzZ854jeqxcqw3jzb6qL7A83QNuFqOsb87ugL/jO3QEDdQ9drdf3WAQauQGkU3nYBrls5wxoMrQ+Ceth+FtZw9a1v7dc+DEWOeJKCtOAIskb29pv6OcRe0Wk="); // Comments this out for now, so it doesn't load the player profile // A better way to do this would check for the properties when getting the skull or the skin From b7a094f4729de79483c40b0cb46c81b00c98ed82 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:30:29 -0400 Subject: [PATCH 03/34] Create flag gadget type --- .../core/common/util/banner/CountryFlag.java | 57 +++++++++-- .../cosmetic/ui/button/open/OpenFlags.java | 25 +++++ .../core/cosmetic/ui/page/FlagPage.java | 62 ++++++++++++ .../core/cosmetic/ui/page/GadgetPage.java | 15 ++- .../mineplex/core/cosmetic/ui/page/Menu.java | 84 +++++++++++----- .../core/gadget/types/FlagGadget.java | 95 +++++++++++++++++++ .../core/gadget/types/GadgetType.java | 3 +- 7 files changed, 302 insertions(+), 39 deletions(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/open/OpenFlags.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java index d4e48144f..54626d736 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java @@ -1,17 +1,30 @@ package mineplex.core.common.util.banner; import org.bukkit.DyeColor; +import org.bukkit.Material; import org.bukkit.block.banner.Pattern; import org.bukkit.block.banner.PatternType; import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.BannerMeta; + +import static org.bukkit.DyeColor.*; +import static org.bukkit.block.banner.PatternType.*; public enum CountryFlag { + // Vetted + MINEPLEX("Mineplex", "Mineplexian", BLACK, new Pattern(ORANGE, TRIANGLE_TOP), new Pattern(BLACK, TRIANGLES_TOP), + new Pattern(ORANGE, STRIPE_LEFT), new Pattern(ORANGE, STRIPE_RIGHT), new Pattern(BLACK, BORDER), + new Pattern(BLACK, STRIPE_BOTTOM)), + USA("The United States of America", "American", RED, new Pattern(WHITE, STRIPE_SMALL), new Pattern(BLUE, SQUARE_TOP_RIGHT), + new Pattern(BLUE, SQUARE_TOP_RIGHT), new Pattern(BLUE, SQUARE_TOP_RIGHT)), + + CANADA("Canada", "Canadian", WHITE, new Pattern(RED, CROSS), new Pattern(WHITE, STRIPE_LEFT), new Pattern(RED, STRIPE_MIDDLE), + new Pattern(WHITE, BORDER), new Pattern(RED, STRIPE_TOP), new Pattern(RED, STRIPE_BOTTOM)), + + // Not Vetted BRAZIL(DyeColor.GREEN, new Pattern(DyeColor.YELLOW, PatternType.RHOMBUS_MIDDLE), new Pattern(DyeColor.BLUE, PatternType.CIRCLE_MIDDLE)), - 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)), @@ -54,17 +67,47 @@ public enum CountryFlag 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; + private final String _country; + private final String _adjective; + private final DyeColor _baseColor; + private final Pattern[] _patterns; - CountryFlag(DyeColor baseColor, Pattern... patterns){ + CountryFlag(String country, String adjective, DyeColor baseColor, Pattern... patterns) + { + _country = country; + _adjective = adjective; _baseColor = baseColor; _patterns = patterns; } + CountryFlag(DyeColor baseColor, Pattern... patterns) + { + this("", "", baseColor, patterns); + } + public ItemStack getBanner() { - return UtilBanner.createBanner(_baseColor, _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; + } + + public String getCountryName() + { + return _country; + } + + public String getCountryAdjective() + { + return _adjective; } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/open/OpenFlags.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/open/OpenFlags.java new file mode 100644 index 000000000..987d549ac --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/button/open/OpenFlags.java @@ -0,0 +1,25 @@ +package mineplex.core.cosmetic.ui.button.open; + +import mineplex.core.cosmetic.ui.page.FlagPage; +import mineplex.core.cosmetic.ui.page.HatPage; +import mineplex.core.cosmetic.ui.page.Menu; +import mineplex.core.gadget.types.Gadget; +import org.bukkit.entity.Player; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class OpenFlags extends OpenPageButton +{ + public OpenFlags(Menu menu, Gadget active) + { + super(menu, active); + } + + @Override + protected void leftClick(Player player) + { + getMenu().getShop().openPageForPlayer(player, new FlagPage(getMenu().getPlugin(), getMenu().getShop(), getMenu().getClientManager(), getMenu().getDonationManager(), "Flags", player)); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java new file mode 100644 index 000000000..1a2b98635 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java @@ -0,0 +1,62 @@ +package mineplex.core.cosmetic.ui.page; + +import mineplex.core.account.CoreClientManager; +import mineplex.core.common.util.C; +import mineplex.core.cosmetic.CosmeticManager; +import mineplex.core.cosmetic.ui.CosmeticShop; +import mineplex.core.donation.DonationManager; +import mineplex.core.gadget.types.Gadget; +import mineplex.core.gadget.types.GadgetType; +import mineplex.core.shop.item.IButton; +import mineplex.core.shop.item.ShopItem; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.ClickType; + +import java.util.List; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class FlagPage extends GadgetPage +{ + public FlagPage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, + Player player) + { + super(plugin, shop, clientManager, donationManager, name, player); + } + + @Override + protected void buildPage() + { + int slot = 10; + + List list = getPlugin().getGadgetManager().getGadgets(GadgetType.FLAG); + if(list != null) + for (Gadget gadget : list) + { + addGadget(gadget, slot); + + if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.FLAG) == gadget) + { + addGlow(slot); + } + + slot++; + + if (slot % 9 == 8) + { + slot += 2; + } + } + + addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() + { + public void onClick(Player player, ClickType clickType) + { + getShop().openPageForPlayer(getPlayer(), new Menu(getPlugin(), getShop(), getClientManager(), getDonationManager(), player)); + } + }); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java index 657d98b30..12523a911 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java @@ -8,6 +8,7 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; +import mineplex.core.gadget.types.FlagGadget; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; @@ -60,12 +61,16 @@ public class GadgetPage extends ShopPageBase addGadget(gadget, slot); if (getPlugin().getInventoryManager().Get(getPlayer()).getItemCount(gadget.getDisplayName()) > 0) + { addGlow(slot); + } slot++; - if (slot == 17 || slot == 26) + if (slot % 9 == 8) + { slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() @@ -366,7 +371,7 @@ public class GadgetPage extends ShopPageBase meta.setLore(itemLore); gadgetItemStack.setItemMeta(meta); - if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH + /*if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH || gadget.getGadgetType() == GadgetType.PARTICLE || gadget.getGadgetType() == GadgetType.DOUBLE_JUMP) { if (gadget.getCost(GlobalCurrency.TREASURE_SHARD) == -8) @@ -377,7 +382,7 @@ public class GadgetPage extends ShopPageBase bannerMeta.setLore(meta.getLore()); gadgetItemStack.setItemMeta(bannerMeta); } - } + }*/ addButton(slot, new ShopItem(gadgetItemStack, false, false).hideInfo(), new DeactivateGadgetButton(gadget, this)); } @@ -389,7 +394,7 @@ public class GadgetPage extends ShopPageBase meta.setLore(itemLore); gadgetItemStack.setItemMeta(meta); - if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH + /*if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH || gadget.getGadgetType() == GadgetType.PARTICLE || gadget.getGadgetType() == GadgetType.DOUBLE_JUMP) { if (gadget.getCost(GlobalCurrency.TREASURE_SHARD) == -8) @@ -400,7 +405,7 @@ public class GadgetPage extends ShopPageBase bannerMeta.setLore(meta.getLore()); gadgetItemStack.setItemMeta(bannerMeta); } - } + }*/ /*if (gadget instanceof MorphStray) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java index 8a27df36e..084025a09 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java @@ -1,11 +1,17 @@ package mineplex.core.cosmetic.ui.page; import java.util.ArrayList; +import java.util.Arrays; import java.util.EnumMap; import java.util.List; import java.util.Map; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.cosmetic.ui.button.open.OpenFlags; +import mineplex.core.itemstack.ItemBuilder; +import org.bukkit.DyeColor; import org.bukkit.Material; +import org.bukkit.block.Banner; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -40,6 +46,10 @@ import mineplex.core.mount.Mount; import mineplex.core.pet.PetType; import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.page.ShopPageBase; +import org.bukkit.inventory.ItemFlag; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.BannerMeta; +import org.bukkit.inventory.meta.ItemMeta; public class Menu extends ShopPageBase { @@ -64,35 +74,46 @@ public class Menu extends ShopPageBase List shardLore = new ArrayList(); shardLore.add(" "); - shardLore.add(C.cGray + "This seems like it might come in"); - shardLore.add(C.cGray + "handy. Maybe I can collect more!"); + shardLore.add(C.cGray + "These seem like they might come in"); + shardLore.add(C.cGray + "handy. Maybe I should collect more!"); ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false); - // Cosmetic Items - int[] slots = UtilUI.getIndicesFor(15, 0, 5, 1); - /*int particleSlot = 9;//slots[0]; - int arrowSlot = 11;//slots[1]; - int jumpSlot = 13;//slots[2]; - int deathSlot = 15;//slots[3]; - int gadgetSlot = 27;//slots[4]; - int morphSlot = 29;//slots[5]; - int mountSlot = 31;//slots[6]; - int petSlot = 33;//slots[7]; - int hatSlot = 35;//slots[8]; - int costumeSlot = 45;//slots[9]; - int musicSlot = 47;//slots[10]; - int tauntSlot = 49;//slots[11]; - int winEffectSlot = 51; - int gameModifierSlot = 53;*/ - int particleSlot = slots[0], arrowSlot = slots[1], jumpSlot = slots[2], - deathSlot = slots[3], gadgetSlot = slots[4], morphSlot = slots[5], - mountSlot = slots[6], petSlot = slots[7], hatSlot = slots[8], - costumeSlot = slots[9], musicSlot = slots[10], tauntSlot = slots[11], - winEffectSlot = slots[12], gameModifierSlot = slots[13], balloonsSlot = slots[14], - kitSelectorSlot = balloonsSlot + 4; + int deathSlot = 1; + int jumpSlot = 28; + int particleSlot = 10; + int winEffectSlot = 13; + int shardSlot = 22; + int arrowSlot = 19; + int tauntSlot = 31; + int gameModifierSlot = 21; + int kitSelectorSlot = 23; + int musicSlot = 48; + int mountSlot = 50; + int balloonsSlot = 47; + int petSlot = 51; + int gadgetSlot = 49; + int hatSlot = 7; + int flagSlot = 34; + int morphSlot = 25; + int costumeSlot = 16; + + addItem(shardSlot, shards); + + ItemStack pane = new ItemBuilder(Material.STAINED_GLASS_PANE).setData((byte)15).setTitle("").build(); + for (int i = 0; i <= 45; i += 9) addItem(i, pane.clone()); + for (int i = 8; i <= 53; i += 9) addItem(i, pane.clone()); + for (int i = 37; i <= 43; ++i) addItem(i, pane.clone()); + for (int i = 2; i <= 6; ++i) addItem(i, pane.clone()); + for (int i = 11; i <= 29; i += 9) addItem(i, pane.clone()); + for (int i = 15; i <= 33; i += 9) addItem(i, pane.clone()); + addItem(12, pane.clone()); + addItem(14, pane.clone()); + addItem(30, pane.clone()); + addItem(32, pane.clone()); + addItem(46, pane.clone()); + addItem(52, pane.clone()); - addItem(kitSelectorSlot + 2, shards); EnumMap ownedCount = new EnumMap<>(GadgetType.class); EnumMap maxCount = new EnumMap<>(GadgetType.class); @@ -187,7 +208,7 @@ public class Menu extends ShopPageBase if (petActive != null) addGlow(petSlot); type = GadgetType.HAT; - lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the ladies.", VISIBILITY_HUB, enabled.get(type)); + lore = getLore(ownedCount.get(type), maxCount.get(type), "Hats are in this year. Wear them on your head to impress the others.", VISIBILITY_HUB, enabled.get(type)); addButton(hatSlot, new ShopItem(Material.GOLD_HELMET, "Hats", lore, 1, false), new OpenHats(this, enabled.get(type))); if (enabled.containsKey(type)) addGlow(hatSlot); @@ -227,6 +248,17 @@ public class Menu extends ShopPageBase lore = getLore(ownedCount.get(type), maxCount.get(type), "Click here to select different particles to indicate which kit you have selected!", VISIBILITY_GAME_HUB, enabled.get(type)); addButton(kitSelectorSlot, new ShopItem(Material.LEVER, "Kit Selector Particles", lore, 1, false), new OpenKitSelector(this, enabled.get(type))); if (enabled.containsKey(type)) addGlow(kitSelectorSlot); + + type = GadgetType.FLAG; + lore = getLore(ownedCount.get(type), maxCount.get(type), "Show off your country's flag!", VISIBILITY_HUB, enabled.get(type)); + addButton(flagSlot, new ShopItem(Material.BANNER, "Flags", lore, 1, false), new OpenFlags(this, enabled.get(type))); + if (enabled.containsKey(type)) addGlow(flagSlot); + BannerMeta banner = (BannerMeta) CountryFlag.MINEPLEX.getBanner().getItemMeta(); + BannerMeta meta = ((BannerMeta) getItem(flagSlot).getItemMeta()); + meta.setBaseColor(banner.getBaseColor()); + meta.setPatterns(banner.getPatterns()); + meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS); + getItem(flagSlot).setItemMeta(meta); } private String[] getLore(int ownedCount, int maxCount, String info, String visibility, Gadget enabled) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java new file mode 100644 index 000000000..d28b45a17 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java @@ -0,0 +1,95 @@ +package mineplex.core.gadget.types; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.disguise.disguises.DisguiseSkeleton; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.flag.FlagType; +import mineplex.core.gadget.gadgets.morph.managers.UtilMorph; +import mineplex.core.itemstack.ItemBuilder; +import org.bukkit.Color; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.entity.Skeleton; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.inventory.meta.LeatherArmorMeta; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class FlagGadget extends Gadget +{ + private final FlagType _flag; + + public FlagGadget(GadgetManager manager, FlagType flag) + { + super(manager, GadgetType.FLAG, flag.getFlag().getCountryAdjective() + " Flag", + UtilText.splitLineToArray(C.cGray + "The flag of " + C.cWhite + flag.getFlag().getCountryName(), LineFormat.LORE), + flag.getCost(), Material.WOOL, (byte) 0); + + setDisplayItem(flag.getFlag().getBanner()); + _flag = flag; + } + + public void applyArmor(Player player, boolean message) + { + Manager.removeGadgetType(player, GadgetType.MORPH, this); + Manager.removeGadgetType(player, GadgetType.FLAG, this); + Manager.removeOutfit(player, OutfitGadget.ArmorSlot.HELMET); + + _active.add(player); + + if (message) + { + UtilPlayer.message(player, F.main("Gadget", "You unfurled your " + F.elem(getName()) + ".")); + } + } + + public void removeArmor(Player player) + { + if (_active.remove(player)) + { + UtilPlayer.message(player, F.main("Gadget", "You put away your " + F.elem(getName()) + ".")); + } + } + + @Override + public void enableCustom(Player player, boolean message) + { + applyArmor(player, message); + ItemStack flag = _flag.getFlag().getBanner(); + ItemMeta meta = flag.getItemMeta(); + meta.setDisplayName(getDisplayName()); + flag.setItemMeta(meta); + player.getInventory().setHelmet(flag); + player.updateInventory(); + } + + @Override + public void disableCustom(Player player, boolean message) + { + removeArmor(player); + player.getInventory().setHelmet(new ItemStack(Material.AIR)); + player.updateInventory(); + } + + @EventHandler(priority = EventPriority.LOWEST) + public void playerDeath(PlayerDeathEvent event) + { + disable(event.getEntity()); + } + + public FlagType getFlagType() + { + return _flag; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java index edc823e6d..386f764a4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/GadgetType.java @@ -18,7 +18,8 @@ public enum GadgetType WIN_EFFECT("Win Effects", "activeWinEffect"), GAME_MODIFIER("Game Modifiers", ""), BALLOON("Balloons", ""), - KIT_SELECTOR("Kit Selectors", "activeKitSelector"); + KIT_SELECTOR("Kit Selectors", "activeKitSelector"), + FLAG("Flags", "activeFlag"); private String _name; private String _databaseKey; From c1765aaf20f765db16faa6dd2def752bd16b20da Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:30:56 -0400 Subject: [PATCH 04/34] Allow UtilParticle to accept java awt colors --- .../core/common/util/UtilParticle.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java index a87bb2565..cc58f5d0d 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/UtilParticle.java @@ -418,4 +418,22 @@ public class UtilParticle PlayParticleToAll(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist); } + public static void playColoredParticle(java.awt.Color color, ParticleType particleType, Location location, int count, ViewDist dist, Player... players) + { + if (particleType != ParticleType.RED_DUST + && particleType != ParticleType.MOB_SPELL_AMBIENT) + return; + PlayParticle(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist, players); + } + + public static void playColoredParticleToAll(java.awt.Color color, ParticleType particleType, Location location, int count, ViewDist dist) + { + if (particleType != ParticleType.RED_DUST && particleType != ParticleType.MOB_SPELL_AMBIENT) + { + return; + } + + PlayParticleToAll(particleType, location, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1f, count, dist); + } + } \ No newline at end of file From 78445551a1f22717db0ab85c2ec8e1cd4cbf6321 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:31:54 -0400 Subject: [PATCH 05/34] Reduce lag on Molten Snake --- .../src/mineplex/core/mount/types/MountTitanData.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountTitanData.java b/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountTitanData.java index 137ae9bbe..ff998efee 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountTitanData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/mount/types/MountTitanData.java @@ -39,7 +39,7 @@ public class MountTitanData extends MountData //Nodes _nodes = new ArrayList(); - for (int i=0 ; i<30 ; i++) + for (int i=0 ; i<20 ; i++) { ArmorStand node = loc.getWorld().spawn(loc, ArmorStand.class); @@ -81,7 +81,7 @@ public class MountTitanData extends MountData Location infront = _head.getLocation().add(0, -1.5, 0); //Move - for (int i=0 ; i<30 ; i++) + for (int i=0 ; i<20 ; i++) { ArmorStand node = _nodes.get(i); From 1b39a540434c0e3474653f3f06a1ef98cdfe546c Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:33:03 -0400 Subject: [PATCH 06/34] Fix gadget pages --- .../core/cosmetic/ui/page/ArrowTrailPage.java | 10 +++++++--- .../core/cosmetic/ui/page/BalloonsPage.java | 6 +++++- .../core/cosmetic/ui/page/DeathEffectPage.java | 10 +++++++--- .../core/cosmetic/ui/page/DoubleJumpPage.java | 12 ++++++++---- .../src/mineplex/core/cosmetic/ui/page/HatPage.java | 12 ++++++++---- .../core/cosmetic/ui/page/KitSelectorPage.java | 6 +++++- .../mineplex/core/cosmetic/ui/page/MorphPage.java | 12 +++++++++--- .../mineplex/core/cosmetic/ui/page/MountPage.java | 4 +++- .../mineplex/core/cosmetic/ui/page/MusicPage.java | 4 +++- .../core/cosmetic/ui/page/ParticlePage.java | 12 ++++++++---- .../src/mineplex/core/cosmetic/ui/page/PetPage.java | 13 ++++++++++--- .../mineplex/core/cosmetic/ui/page/TauntPage.java | 12 ++++++++---- .../core/cosmetic/ui/page/WinEffectPage.java | 12 ++++++++---- .../ui/page/custompet/name/CustomPetTagPage.java | 6 ++++++ 14 files changed, 95 insertions(+), 36 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ArrowTrailPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ArrowTrailPage.java index 80db4bcd6..e4d1333f9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ArrowTrailPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ArrowTrailPage.java @@ -33,12 +33,16 @@ public class ArrowTrailPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.ARROW_TRAIL) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - if (slot == 17) - slot += 2; + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/BalloonsPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/BalloonsPage.java index fd0b3cf08..3208e5a05 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/BalloonsPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/BalloonsPage.java @@ -32,12 +32,16 @@ public class BalloonsPage extends GadgetPage addGadget(gadget, slot); if (gadget.isActive(getPlayer())) + { addGlow(slot); + } slot++; - if (slot == 17 || slot == 26) + if (slot % 9 == 8) + { slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DeathEffectPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DeathEffectPage.java index 07dbee136..a54b7f840 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DeathEffectPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DeathEffectPage.java @@ -33,12 +33,16 @@ public class DeathEffectPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.DEATH) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - if (slot == 17) - slot += 2; + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DoubleJumpPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DoubleJumpPage.java index f9748cb06..8ecddc541 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DoubleJumpPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/DoubleJumpPage.java @@ -33,12 +33,16 @@ public class DoubleJumpPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.DOUBLE_JUMP) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - - if (slot == 17) - slot += 2; + + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/HatPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/HatPage.java index 37f472616..a21f31cea 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/HatPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/HatPage.java @@ -38,12 +38,16 @@ public class HatPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.HAT) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - - if (slot == 17) - slot += 2; + + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitSelectorPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitSelectorPage.java index 26b399783..6ce7f5ebd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitSelectorPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/KitSelectorPage.java @@ -31,12 +31,16 @@ public class KitSelectorPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.KIT_SELECTOR) == gadget) + { addGlow(slot); + } slot++; - if (slot == 17 || slot == 26 || slot == 35) + if (slot % 9 == 8) + { slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java index 682140891..0689b3f07 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MorphPage.java @@ -32,13 +32,19 @@ public class MorphPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.MORPH) == gadget) - if (!(gadget instanceof MorphBlock)) - addGlow(slot); + { + if (!(gadget instanceof MorphBlock)) + { + addGlow(slot); + } + } slot++; - if (slot == 17 || slot == 26 || slot == 35) + if (slot % 9 == 8) + { slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java index 6e670effc..0c2b2cd60 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MountPage.java @@ -46,8 +46,10 @@ public class MountPage extends ShopPageBase addMount(mount, slot); slot++; - if (slot == 17 || slot == 26) + if (slot % 9 == 8) + { slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java index 54ff244d7..97f32d027 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java @@ -34,8 +34,10 @@ public class MusicPage extends GadgetPage slot++; - if (slot == 17) + if (slot % 9 == 8) + { slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java index a488c922c..168741d0a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/ParticlePage.java @@ -31,12 +31,16 @@ public class ParticlePage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.PARTICLE) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - - if (slot == 17 || slot == 26 || slot == 35) - slot += 2; + + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java index e7bf684cb..264f73dbe 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java @@ -231,16 +231,23 @@ public class PetPage extends ShopPageBase slot++; - if (slot == 17 || slot == 26) + if (slot % 9 == 8) + { slot += 2; + } } slot = 49; for (PetExtra petExtra : PetExtra.values()) { List itemLore = new ArrayList(); - - if (!getPlugin().getPetManager().hasActivePet(getPlayer().getName())) + + if (getPlugin().getPunishManager().GetClient(_player.getName()).IsMuted()) + { + itemLore.add(C.cRed + "You may not rename pets while muted!"); + getInventory().setItem(slot, new ShopItem(petExtra.getMaterial(), (byte)0, C.cRed + petExtra.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).getHandle()); + } + else if (!getPlugin().getPetManager().hasActivePet(getPlayer().getName())) { itemLore.add(C.cWhite + "You must have an active pet to use this!"); getInventory().setItem(slot, new ShopItem(petExtra.getMaterial(), (byte)0, C.cRed + petExtra.getName(), itemLore.toArray(new String[itemLore.size()]), 1, true, false).getHandle()); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TauntPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TauntPage.java index 687516e0f..63ef90b24 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TauntPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/TauntPage.java @@ -38,12 +38,16 @@ public class TauntPage extends GadgetPage addGadget(gadget, slot); if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.TAUNT) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - - if (slot == 26) - slot += 2; + + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/WinEffectPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/WinEffectPage.java index cc116cbac..e66674be4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/WinEffectPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/WinEffectPage.java @@ -49,12 +49,16 @@ public class WinEffectPage extends GadgetPage } if (getPlugin().getGadgetManager().getActive(getPlayer(), GadgetType.WIN_EFFECT) == gadget) - addGlow(slot); + { + addGlow(slot); + } slot++; - - if (slot == 17 || slot == 26) - slot += 2; + + if (slot % 9 == 8) + { + slot += 2; + } } addButton(4, new ShopItem(Material.BED, C.cGray + " \u21FD Go Back", new String[]{}, 1, false), new IButton() diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/custompet/name/CustomPetTagPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/custompet/name/CustomPetTagPage.java index 774ecf2d0..2350f8eba 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/custompet/name/CustomPetTagPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/custompet/name/CustomPetTagPage.java @@ -1,9 +1,14 @@ package mineplex.core.cosmetic.ui.page.custompet.name; +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilItem; +import mineplex.core.itemstack.ItemBuilder; +import mineplex.core.punish.PunishClient; import net.minecraft.server.v1_8_R3.ItemStack; import net.minecraft.server.v1_8_R3.Items; import org.bukkit.ChatColor; +import org.bukkit.Material; import org.bukkit.entity.Player; import mineplex.core.account.CoreClientManager; @@ -34,6 +39,7 @@ public class CustomPetTagPage extends ShopPageBase Date: Wed, 28 Jun 2017 01:34:51 -0400 Subject: [PATCH 07/34] Reorganize packages --- .../core/gadget/commands/LockInfusedCommand.java | 12 ++++++------ .../arrowtrail/{vampire => }/ArrowTrailBlood.java | 2 +- .../{candycane => }/ArrowTrailCandyCane.java | 2 +- .../arrowtrail/{party => }/ArrowTrailConfetti.java | 2 +- .../arrowtrail/{cupidslove => }/ArrowTrailCupid.java | 2 +- .../arrowtrail/{emerald => }/ArrowTrailEmerald.java | 2 +- .../arrowtrail/{wisdom => }/ArrowTrailEnchant.java | 2 +- .../arrowtrail/{freedom => }/ArrowTrailFreedom.java | 2 +- .../{frostlord => }/ArrowTrailFrostLord.java | 2 +- .../{halloween => }/ArrowTrailHalloween.java | 2 +- .../arrowtrail/{music => }/ArrowTrailMusic.java | 2 +- .../arrowtrail/{shadow => }/ArrowTrailShadow.java | 2 +- .../arrowtrail/{spring => }/ArrowTrailSpring.java | 2 +- .../{howlingwinds => }/ArrowTrailStorm.java | 2 +- .../arrowtrail/{titan => }/ArrowTrailTitan.java | 2 +- .../gadgets/death/{vampire => }/DeathBlood.java | 2 +- .../death/{candycane => }/DeathCandyCane.java | 2 +- .../{cupidslove => }/DeathCupidsBrokenHeart.java | 2 +- .../gadgets/death/{emerald => }/DeathEmerald.java | 2 +- .../gadgets/death/{wisdom => }/DeathEnchant.java | 2 +- .../gadgets/death/{freedom => }/DeathFreedom.java | 2 +- .../death/{frostlord => }/DeathFrostLord.java | 2 +- .../gadget/gadgets/death/{music => }/DeathMusic.java | 2 +- .../gadgets/death/{party => }/DeathPinataBurst.java | 2 +- .../death/{christmas => }/DeathPresentDanger.java | 2 +- .../gadgets/death/{shadow => }/DeathShadow.java | 2 +- .../gadgets/death/{spring => }/DeathSpring.java | 2 +- .../gadgets/death/{howlingwinds => }/DeathStorm.java | 2 +- .../gadget/gadgets/death/{titan => }/DeathTitan.java | 2 +- .../doublejump/{vampire => }/DoubleJumpBlood.java | 2 +- .../{candycane => }/DoubleJumpCandyCane.java | 2 +- .../{cupidslove => }/DoubleJumpCupidsWings.java | 2 +- .../doublejump/{emerald => }/DoubleJumpEmerald.java | 2 +- .../doublejump/{wisdom => }/DoubleJumpEnchant.java | 2 +- .../{party => }/DoubleJumpFirecracker.java | 2 +- .../doublejump/{freedom => }/DoubleJumpFreedom.java | 4 ++-- .../{frostlord => }/DoubleJumpFrostLord.java | 2 +- .../{halloween => }/DoubleJumpHalloween.java | 2 +- .../doublejump/{music => }/DoubleJumpMusic.java | 2 +- .../doublejump/{shadow => }/DoubleJumpShadow.java | 2 +- .../doublejump/{spring => }/DoubleJumpSpring.java | 2 +- .../{howlingwinds => }/DoubleJumpStorm.java | 2 +- .../doublejump/{titan => }/DoubleJumpTitan.java | 2 +- .../src/mineplex/core/gadget/set/SetCandyCane.java | 6 +++--- .../src/mineplex/core/gadget/set/SetCupidsLove.java | 6 +++--- .../src/mineplex/core/gadget/set/SetEmerald.java | 6 +++--- .../src/mineplex/core/gadget/set/SetFreedom.java | 9 +++++---- .../src/mineplex/core/gadget/set/SetFrostLord.java | 6 +++--- .../mineplex/core/gadget/set/SetHowlingWinds.java | 6 +++--- .../src/mineplex/core/gadget/set/SetMusic.java | 6 +++--- .../src/mineplex/core/gadget/set/SetParty.java | 6 +++--- .../src/mineplex/core/gadget/set/SetShadow.java | 6 +++--- .../src/mineplex/core/gadget/set/SetSpring.java | 6 +++--- .../src/mineplex/core/gadget/set/SetTitan.java | 6 +++--- .../src/mineplex/core/gadget/set/SetVampire.java | 6 +++--- .../src/mineplex/core/gadget/set/SetWisdom.java | 6 +++--- 56 files changed, 90 insertions(+), 89 deletions(-) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{vampire => }/ArrowTrailBlood.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{candycane => }/ArrowTrailCandyCane.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{party => }/ArrowTrailConfetti.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{cupidslove => }/ArrowTrailCupid.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{emerald => }/ArrowTrailEmerald.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{wisdom => }/ArrowTrailEnchant.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{freedom => }/ArrowTrailFreedom.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{frostlord => }/ArrowTrailFrostLord.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{halloween => }/ArrowTrailHalloween.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{music => }/ArrowTrailMusic.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{shadow => }/ArrowTrailShadow.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{spring => }/ArrowTrailSpring.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{howlingwinds => }/ArrowTrailStorm.java (94%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/{titan => }/ArrowTrailTitan.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{vampire => }/DeathBlood.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{candycane => }/DeathCandyCane.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{cupidslove => }/DeathCupidsBrokenHeart.java (94%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{emerald => }/DeathEmerald.java (93%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{wisdom => }/DeathEnchant.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{freedom => }/DeathFreedom.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{frostlord => }/DeathFrostLord.java (93%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{music => }/DeathMusic.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{party => }/DeathPinataBurst.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{christmas => }/DeathPresentDanger.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{shadow => }/DeathShadow.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{spring => }/DeathSpring.java (98%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{howlingwinds => }/DeathStorm.java (94%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/{titan => }/DeathTitan.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{vampire => }/DoubleJumpBlood.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{candycane => }/DoubleJumpCandyCane.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{cupidslove => }/DoubleJumpCupidsWings.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{emerald => }/DoubleJumpEmerald.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{wisdom => }/DoubleJumpEnchant.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{party => }/DoubleJumpFirecracker.java (95%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{freedom => }/DoubleJumpFreedom.java (92%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{frostlord => }/DoubleJumpFrostLord.java (94%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{halloween => }/DoubleJumpHalloween.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{music => }/DoubleJumpMusic.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{shadow => }/DoubleJumpShadow.java (94%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{spring => }/DoubleJumpSpring.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{howlingwinds => }/DoubleJumpStorm.java (94%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/{titan => }/DoubleJumpTitan.java (96%) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java index fef74b9fd..a91dcdb3e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java @@ -9,12 +9,12 @@ import org.bukkit.entity.Player; import mineplex.core.command.CommandBase; import mineplex.core.common.Rank; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane; -import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord; -import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane; -import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord; -import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane; -import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; +import mineplex.core.gadget.gadgets.death.DeathCandyCane; +import mineplex.core.gadget.gadgets.death.DeathFrostLord; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; import mineplex.core.gadget.gadgets.hat.HatType; import mineplex.core.gadget.gadgets.item.ItemCoal; import mineplex.core.gadget.gadgets.item.ItemFreezeCannon; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/vampire/ArrowTrailBlood.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailBlood.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/vampire/ArrowTrailBlood.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailBlood.java index f54c9ae92..180e336de 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/vampire/ArrowTrailBlood.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailBlood.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.vampire; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/candycane/ArrowTrailCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCandyCane.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/candycane/ArrowTrailCandyCane.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCandyCane.java index d45b1b023..58cbee4d9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/candycane/ArrowTrailCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCandyCane.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.candycane; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/party/ArrowTrailConfetti.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailConfetti.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/party/ArrowTrailConfetti.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailConfetti.java index d8f06ce45..be2cd9b90 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/party/ArrowTrailConfetti.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailConfetti.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.party; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/cupidslove/ArrowTrailCupid.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/cupidslove/ArrowTrailCupid.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java index c10562f6d..4249c19c3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/cupidslove/ArrowTrailCupid.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.cupidslove; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Color; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/emerald/ArrowTrailEmerald.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailEmerald.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/emerald/ArrowTrailEmerald.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailEmerald.java index 8592bc16b..b7b8a6df2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/emerald/ArrowTrailEmerald.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailEmerald.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.emerald; +package mineplex.core.gadget.gadgets.arrowtrail; import mineplex.core.common.util.*; import org.bukkit.Location; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/wisdom/ArrowTrailEnchant.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailEnchant.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/wisdom/ArrowTrailEnchant.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailEnchant.java index 00e47e049..b33723020 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/wisdom/ArrowTrailEnchant.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailEnchant.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.wisdom; +package mineplex.core.gadget.gadgets.arrowtrail; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/freedom/ArrowTrailFreedom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFreedom.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/freedom/ArrowTrailFreedom.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFreedom.java index 8921b26cc..fa5f7ade2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/freedom/ArrowTrailFreedom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFreedom.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.freedom; +package mineplex.core.gadget.gadgets.arrowtrail; import java.awt.Color; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/frostlord/ArrowTrailFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFrostLord.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/frostlord/ArrowTrailFrostLord.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFrostLord.java index 6ae8d9b43..3a7c910b5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/frostlord/ArrowTrailFrostLord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailFrostLord.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.frostlord; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/halloween/ArrowTrailHalloween.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailHalloween.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/halloween/ArrowTrailHalloween.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailHalloween.java index 112f272ad..bd5b62563 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/halloween/ArrowTrailHalloween.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailHalloween.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.halloween; +package mineplex.core.gadget.gadgets.arrowtrail; import java.awt.Color; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/music/ArrowTrailMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailMusic.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/music/ArrowTrailMusic.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailMusic.java index d535035af..6c6a3006e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/music/ArrowTrailMusic.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailMusic.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.music; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/shadow/ArrowTrailShadow.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailShadow.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/shadow/ArrowTrailShadow.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailShadow.java index aec688901..8db14cbdb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/shadow/ArrowTrailShadow.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailShadow.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.shadow; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/spring/ArrowTrailSpring.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailSpring.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/spring/ArrowTrailSpring.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailSpring.java index c335ce062..59cb064c4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/spring/ArrowTrailSpring.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailSpring.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.spring; +package mineplex.core.gadget.gadgets.arrowtrail; import java.util.ArrayList; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/howlingwinds/ArrowTrailStorm.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailStorm.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/howlingwinds/ArrowTrailStorm.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailStorm.java index a3cc14165..084611017 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/howlingwinds/ArrowTrailStorm.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailStorm.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.howlingwinds; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/titan/ArrowTrailTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailTitan.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/titan/ArrowTrailTitan.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailTitan.java index 956055929..29c39b7d0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/titan/ArrowTrailTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailTitan.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.arrowtrail.titan; +package mineplex.core.gadget.gadgets.arrowtrail; import org.bukkit.Material; import org.bukkit.entity.Arrow; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/vampire/DeathBlood.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathBlood.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/vampire/DeathBlood.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathBlood.java index 5365e3e14..7101aba36 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/vampire/DeathBlood.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathBlood.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.vampire; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/candycane/DeathCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCandyCane.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/candycane/DeathCandyCane.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCandyCane.java index 45a7028d0..2d100b3fe 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/candycane/DeathCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCandyCane.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.candycane; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/cupidslove/DeathCupidsBrokenHeart.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/cupidslove/DeathCupidsBrokenHeart.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java index 1c92abc02..d0053f9df 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/cupidslove/DeathCupidsBrokenHeart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.cupidslove; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/emerald/DeathEmerald.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathEmerald.java similarity index 93% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/emerald/DeathEmerald.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathEmerald.java index 79ea0b404..85fb2db18 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/emerald/DeathEmerald.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathEmerald.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.emerald; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/wisdom/DeathEnchant.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathEnchant.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/wisdom/DeathEnchant.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathEnchant.java index 7229b155d..35532906d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/wisdom/DeathEnchant.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathEnchant.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.wisdom; +package mineplex.core.gadget.gadgets.death; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/freedom/DeathFreedom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFreedom.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/freedom/DeathFreedom.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFreedom.java index 24d43eb0b..137b68207 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/freedom/DeathFreedom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFreedom.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.freedom; +package mineplex.core.gadget.gadgets.death; import org.bukkit.ChatColor; import org.bukkit.Location; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/frostlord/DeathFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFrostLord.java similarity index 93% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/frostlord/DeathFrostLord.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFrostLord.java index 0ce7b546f..72cd2c3cb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/frostlord/DeathFrostLord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathFrostLord.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.frostlord; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/music/DeathMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMusic.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/music/DeathMusic.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMusic.java index 2bf566254..d6c4176ad 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/music/DeathMusic.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMusic.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.music; +package mineplex.core.gadget.gadgets.death; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/party/DeathPinataBurst.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathPinataBurst.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/party/DeathPinataBurst.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathPinataBurst.java index 09ccfe10a..0adc3dfb8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/party/DeathPinataBurst.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathPinataBurst.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.party; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/christmas/DeathPresentDanger.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathPresentDanger.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/christmas/DeathPresentDanger.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathPresentDanger.java index e8db5ed6a..c1b07ce33 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/christmas/DeathPresentDanger.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathPresentDanger.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.christmas; +package mineplex.core.gadget.gadgets.death; import java.util.ArrayList; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/shadow/DeathShadow.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathShadow.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/shadow/DeathShadow.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathShadow.java index 3adb240f2..f80b4ad9b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/shadow/DeathShadow.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathShadow.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.shadow; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/spring/DeathSpring.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathSpring.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/spring/DeathSpring.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathSpring.java index eb15f5986..bae34473b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/spring/DeathSpring.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathSpring.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.spring; +package mineplex.core.gadget.gadgets.death; import java.util.ArrayList; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/howlingwinds/DeathStorm.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathStorm.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/howlingwinds/DeathStorm.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathStorm.java index 00cf6d607..c3cf2f0da 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/howlingwinds/DeathStorm.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathStorm.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.howlingwinds; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/titan/DeathTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathTitan.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/titan/DeathTitan.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathTitan.java index 00b64eace..0e56f8308 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/titan/DeathTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathTitan.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.death.titan; +package mineplex.core.gadget.gadgets.death; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/vampire/DoubleJumpBlood.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpBlood.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/vampire/DoubleJumpBlood.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpBlood.java index 882133687..2f910416c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/vampire/DoubleJumpBlood.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpBlood.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.vampire; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/candycane/DoubleJumpCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/candycane/DoubleJumpCandyCane.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java index d6a7620c7..62f3ad6c4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/candycane/DoubleJumpCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.candycane; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/cupidslove/DoubleJumpCupidsWings.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/cupidslove/DoubleJumpCupidsWings.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java index 71a7b66b5..81884a52b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/cupidslove/DoubleJumpCupidsWings.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.cupidslove; +package mineplex.core.gadget.gadgets.doublejump; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/emerald/DoubleJumpEmerald.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpEmerald.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/emerald/DoubleJumpEmerald.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpEmerald.java index 0453e0b57..f74859c2c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/emerald/DoubleJumpEmerald.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpEmerald.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.emerald; +package mineplex.core.gadget.gadgets.doublejump; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/wisdom/DoubleJumpEnchant.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpEnchant.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/wisdom/DoubleJumpEnchant.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpEnchant.java index ec1120f3b..d9d4db576 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/wisdom/DoubleJumpEnchant.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpEnchant.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.wisdom; +package mineplex.core.gadget.gadgets.doublejump; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/party/DoubleJumpFirecracker.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFirecracker.java similarity index 95% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/party/DoubleJumpFirecracker.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFirecracker.java index 06ee124f7..65ce9bd80 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/party/DoubleJumpFirecracker.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFirecracker.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.party; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/freedom/DoubleJumpFreedom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFreedom.java similarity index 92% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/freedom/DoubleJumpFreedom.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFreedom.java index 7f887e345..820ccd155 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/freedom/DoubleJumpFreedom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFreedom.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.freedom; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -18,7 +18,7 @@ public class DoubleJumpFreedom extends DoubleJumpEffectGadget { super(manager, "Leap of Freedom", UtilText.splitLineToArray(UtilText.colorWords("FREEEEEEEEEEEDOM!", ChatColor.RED, ChatColor.WHITE, ChatColor.BLUE), LineFormat.LORE), -8, Material.WOOL, - (byte) 14); + (byte) 0); setDisplayItem(CountryFlag.USA.getBanner()); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/frostlord/DoubleJumpFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFrostLord.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/frostlord/DoubleJumpFrostLord.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFrostLord.java index 62325731c..64cc9f962 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/frostlord/DoubleJumpFrostLord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpFrostLord.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.frostlord; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/halloween/DoubleJumpHalloween.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpHalloween.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/halloween/DoubleJumpHalloween.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpHalloween.java index 10155afbd..0f2cc13e8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/halloween/DoubleJumpHalloween.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpHalloween.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.halloween; +package mineplex.core.gadget.gadgets.doublejump; import java.awt.Color; import java.util.HashMap; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/music/DoubleJumpMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMusic.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/music/DoubleJumpMusic.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMusic.java index 5b7459f0d..2a4d5c1ba 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/music/DoubleJumpMusic.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMusic.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.music; +package mineplex.core.gadget.gadgets.doublejump; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/shadow/DoubleJumpShadow.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpShadow.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/shadow/DoubleJumpShadow.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpShadow.java index 005c3403c..c64052bca 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/shadow/DoubleJumpShadow.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpShadow.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.shadow; +package mineplex.core.gadget.gadgets.doublejump; import mineplex.core.common.util.C; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/spring/DoubleJumpSpring.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/spring/DoubleJumpSpring.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java index 63dabdaf9..c4d06c230 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/spring/DoubleJumpSpring.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.spring; +package mineplex.core.gadget.gadgets.doublejump; import java.util.ArrayList; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/howlingwinds/DoubleJumpStorm.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpStorm.java similarity index 94% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/howlingwinds/DoubleJumpStorm.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpStorm.java index 6b04d1f00..9cd07ef15 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/howlingwinds/DoubleJumpStorm.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpStorm.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.howlingwinds; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/titan/DoubleJumpTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpTitan.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/titan/DoubleJumpTitan.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpTitan.java index 336aaa5bc..9c81a3309 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/titan/DoubleJumpTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpTitan.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.doublejump.titan; +package mineplex.core.gadget.gadgets.doublejump; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java index e6f6f5707..9a2d9ce75 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane; -import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane; -import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; +import mineplex.core.gadget.gadgets.death.DeathCandyCane; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java index ccbaf0863..47f1552f7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.cupidslove.ArrowTrailCupid; -import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart; -import mineplex.core.gadget.gadgets.doublejump.cupidslove.DoubleJumpCupidsWings; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; +import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java index b34a8f88e..740174dba 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.emerald.ArrowTrailEmerald; -import mineplex.core.gadget.gadgets.death.emerald.DeathEmerald; -import mineplex.core.gadget.gadgets.doublejump.emerald.DoubleJumpEmerald; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; +import mineplex.core.gadget.gadgets.death.DeathEmerald; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java index 6196a145b..e8c300adf 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java @@ -1,9 +1,10 @@ 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.arrowtrail.ArrowTrailFreedom; +import mineplex.core.gadget.gadgets.death.DeathFreedom; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; +import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; import mineplex.core.gadget.types.GadgetSet; @@ -16,7 +17,7 @@ public class SetFreedom extends GadgetSet manager.getGadget(ArrowTrailFreedom.class), manager.getGadget(DeathFreedom.class), manager.getGadget(DoubleJumpFreedom.class), - manager.getGadget(ParticleFreedom.class)); + manager.getGadget(ParticleStarSpangled.class)); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java index 6112655a0..6050a0b00 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord; -import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord; -import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; +import mineplex.core.gadget.gadgets.death.DeathFrostLord; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java index 120a35c95..672f49bdc 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.howlingwinds.ArrowTrailStorm; -import mineplex.core.gadget.gadgets.death.howlingwinds.DeathStorm; -import mineplex.core.gadget.gadgets.doublejump.howlingwinds.DoubleJumpStorm; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; +import mineplex.core.gadget.gadgets.death.DeathStorm; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java index 9e606f0e2..fdd47eacd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.music.ArrowTrailMusic; -import mineplex.core.gadget.gadgets.death.music.DeathMusic; -import mineplex.core.gadget.gadgets.doublejump.music.DoubleJumpMusic; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; +import mineplex.core.gadget.gadgets.death.DeathMusic; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; import mineplex.core.gadget.gadgets.particle.music.ParticleMusic; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java index f9debaef0..0b99f9f2e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.party.ArrowTrailConfetti; -import mineplex.core.gadget.gadgets.death.party.DeathPinataBurst; -import mineplex.core.gadget.gadgets.doublejump.party.DoubleJumpFirecracker; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; +import mineplex.core.gadget.gadgets.death.DeathPinataBurst; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java index befc2e27c..1d5fad5dd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.shadow.ArrowTrailShadow; -import mineplex.core.gadget.gadgets.death.shadow.DeathShadow; -import mineplex.core.gadget.gadgets.doublejump.shadow.DoubleJumpShadow; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; +import mineplex.core.gadget.gadgets.death.DeathShadow; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpring.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpring.java index 77727b480..fb21b5f9e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpring.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetSpring.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.spring.ArrowTrailSpring; -import mineplex.core.gadget.gadgets.death.spring.DeathSpring; -import mineplex.core.gadget.gadgets.doublejump.spring.DoubleJumpSpring; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailSpring; +import mineplex.core.gadget.gadgets.death.DeathSpring; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpSpring; import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java index 7c66a8f6c..0d333818d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.titan.ArrowTrailTitan; -import mineplex.core.gadget.gadgets.death.titan.DeathTitan; -import mineplex.core.gadget.gadgets.doublejump.titan.DoubleJumpTitan; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan; +import mineplex.core.gadget.gadgets.death.DeathTitan; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan; import mineplex.core.gadget.gadgets.particle.titan.ParticleTitan; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java index b070122de..7ec9b7f7a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.vampire.ArrowTrailBlood; -import mineplex.core.gadget.gadgets.death.vampire.DeathBlood; -import mineplex.core.gadget.gadgets.doublejump.vampire.DoubleJumpBlood; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; +import mineplex.core.gadget.gadgets.death.DeathBlood; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood; import mineplex.core.gadget.types.GadgetSet; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java index 2d2ff0693..870b70d3f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java @@ -1,9 +1,9 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.wisdom.ArrowTrailEnchant; -import mineplex.core.gadget.gadgets.death.wisdom.DeathEnchant; -import mineplex.core.gadget.gadgets.doublejump.wisdom.DoubleJumpEnchant; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant; +import mineplex.core.gadget.gadgets.death.DeathEnchant; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant; import mineplex.core.gadget.types.GadgetSet; From 3c929a4b00250de2aa6122e4f61437f9b3949b22 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:35:22 -0400 Subject: [PATCH 08/34] Update hat and flag type enums --- .../core/gadget/gadgets/flag/FlagType.java | 34 +++++++++++++++++++ .../core/gadget/gadgets/hat/HatType.java | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java new file mode 100644 index 000000000..7e2c48e28 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java @@ -0,0 +1,34 @@ +package mineplex.core.gadget.gadgets.flag; + +import mineplex.core.common.util.banner.CountryFlag; + +/** + * @author J Teissler + * @date 6/27/17 + */ +public enum FlagType +{ + UNITED_STATES(CountryFlag.USA, -8), + CANADA(CountryFlag.CANADA, -8), + + ; + + private final CountryFlag _flag; + private final int _cost; + + FlagType(CountryFlag flag, int cost) + { + _flag = flag; + _cost = cost; + } + + public CountryFlag getFlag() + { + return _flag; + } + + public int getCost() + { + return _cost; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatType.java index c6f623e20..cabad2568 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatType.java @@ -22,7 +22,11 @@ public enum HatType 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), - PUMPKIN("Pumpkin Hat", UtilText.splitLineToArray(C.cGray + "Pumpkin on the head, don't end up dead!", LineFormat.LORE), -9, Material.PUMPKIN); + PUMPKIN("Pumpkin Hat", UtilText.splitLineToArray(C.cGray + "Pumpkin on the head, don't end up dead!", LineFormat.LORE), -9, Material.PUMPKIN), + CANADA("Warm Canadian Hat", UtilText.splitLineToArray(C.cGray + "Keep your ears nice and warm while up north.", LineFormat.LORE), -8, SkinData.CANADA_HAT), + AMERICA("Patriotic American Hat", UtilText.splitLineToArray(C.cGray + "Careful not to get a big head.", LineFormat.LORE), -8, SkinData.AMERICA_HAT), + + ; private final String _name; private final String[] _lore; From 3d430dedf6c91c50719dc00139286d339d874ce4 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:35:57 -0400 Subject: [PATCH 09/34] Add new cosmetic items --- .../core/common/shape/ShapeWings.java | 35 +++- .../arrowtrail/ArrowTrailRedWhite.java | 78 ++++++++ .../gadget/gadgets/death/DeathMapleLeaf.java | 44 +++++ .../gadgets/doublejump/DoubleJumpMaple.java | 114 ++++++++++++ .../particle/ParticleAuraNiceness.java | 176 ++++++++++++++++++ .../gadgets/particle/ParticleCanadian.java | 68 +++++++ .../particle/ParticleFreedomFireworks.java | 57 ++++++ .../particle/ParticleStarSpangled.java | 80 ++++++++ .../mineplex/core/gadget/set/SetCanadian.java | 26 +++ 9 files changed, 677 insertions(+), 1 deletion(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/shape/ShapeWings.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/shape/ShapeWings.java index 3c9a78a56..4026dad3f 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/shape/ShapeWings.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/shape/ShapeWings.java @@ -166,7 +166,40 @@ public class ShapeWings extends ShapeGrid implements CosmeticShape "0$#######$0", "$#########$" }; - + + public static final String[] MAPLE_LEAF = new String[] + { + "000000000000000000000000000$000000000000000000000000000", + "00000000000000000000000000$$$00000000000000000000000000", + "0000000000000000000000000$$#$$0000000000000000000000000", + "000000000000000000000000$$###$$000000000000000000000000", + "00000000000000000000000$$#####$$00000000000000000000000", + "0000000000000000$$$000$$#######$$000$$$0000000000000000", + "0000000000000000$#$$$$$#########$$$$$#$0000000000000000", + "0000000000000000$$###################$$0000000000000000", + "00000000000000000$###################$00000000000000000", + "00000000000$$0000$$#################$$0000$$00000000000", + "0$$$000000$$$$$000$#################$000$$$$$000000$$$0", + "00$$$$$$$$$###$$$0$$###############$$0$$$###$$$$$$$$$00", + "00$$############$$$$###############$$$$############$$00", + "000$$#############$$###############$$#############$$000", + "0000$$###########################################$$0000", + "00$$$#############################################$$$00", + "$$$#################################################$$$", + "00$$$$###########################################$$$$00", + "00000$$$#######################################$$$00000", + "00000000$$$$###############################$$$$00000000", + "00000000000$$$###########################$$$00000000000", + "0000000000000$$#########################$$0000000000000", + "0000000000000$$#########################$$0000000000000", + "0000000000000$##$$$$$$$$$$$#$$$$$$$$$$$##$0000000000000", + "000000000000$$$$$000000000$#$000000000$$$$$000000000000", + "00000000000000000000000000$#$00000000000000000000000000", + "00000000000000000000000000$#$00000000000000000000000000", + "00000000000000000000000000$#$00000000000000000000000000", + "00000000000000000000000000$#$00000000000000000000000000", + "00000000000000000000000000$$$00000000000000000000000000" + }; /** * Default rotation to give the wings a little tilt when displayed on players for instance diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java new file mode 100644 index 000000000..e9a3c19e1 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java @@ -0,0 +1,78 @@ +package mineplex.core.gadget.gadgets.arrowtrail; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ArrowEffectGadget; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.banner.Pattern; +import org.bukkit.entity.Arrow; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.BannerMeta; +import org.bukkit.util.Vector; + +import java.awt.*; + +public class ArrowTrailRedWhite extends ArrowEffectGadget +{ + public ArrowTrailRedWhite(GadgetManager manager) + { + super(manager, "Red & White Arrows", + UtilText.splitLineToArray(C.cRed + "Killing you nicely.", LineFormat.LORE), + -8, Material.WOOL, (byte)0); + + setDisplayItem(CountryFlag.CANADA.getBanner()); + } + + @Override + public void doTrail(Arrow arrow) + { + Vector v = arrow.getVelocity(); + Vector up = UtilAlg.getUp(v); + Vector left = UtilAlg.getLeft(v); + + Location loc = arrow.getLocation(); + + double amount = 2; + double ticks = 15; + + for(int i = 0; i < amount; i++) + { + double rad = Math.PI*2.0; + rad += i/amount * rad; + rad += Math.PI*2*(arrow.getTicksLived()%ticks)/ticks; + double l = -Math.sin(rad); + double u = Math.cos(rad); + + Vector vel = v.clone().add(up.clone().multiply(u)).add(left.clone().multiply(l)); + vel.multiply(0.4); + + if (i == 0) + { + for(int j = 0; j < 3; ++j) + { + UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, loc.clone().add(vel), 0, UtilParticle.ViewDist.NORMAL); + } + } + else + { + for(int j = 0; j < 3; ++j) + { + UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, loc.clone().add(vel), 0, UtilParticle.ViewDist.NORMAL); + } + } + } + } + + @Override + public void doHitEffect(Arrow arrow) + { + //UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, arrow.getLocation(), 0.35f, 0.35f, 0.35f, 1f, 15, UtilParticle.ViewDist.LONGER); + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, arrow.getLocation(), 0, 0, 0, 0, 3, UtilParticle.ViewDist.LONGER); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java new file mode 100644 index 000000000..b1a0e9955 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java @@ -0,0 +1,44 @@ +package mineplex.core.gadget.gadgets.death; + +import mineplex.core.blood.BloodEvent; +import mineplex.core.common.shape.ShapeWings; +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilShapes; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.DeathEffectGadget; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.util.Vector; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class DeathMapleLeaf extends DeathEffectGadget +{ + private final ShapeWings _leafOuter = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1.0, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); + private final ShapeWings _leafInner = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0.7, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); + + public DeathMapleLeaf(GadgetManager manager) + { + super(manager, "Fallen Maple Leaf", + UtilText.splitLineToArray(C.cGray + "When you die in " + C.cRed + "Canada" + C.cGray + " you die in real life.", LineFormat.LORE), + -8, Material.WOOL, (byte) 0); + + setDisplayItem(CountryFlag.CANADA.getBanner()); + } + + @Override + public void onBlood(Player player, BloodEvent event) + { + event.setCancelled(true); + Location loc = player.getLocation().add(0, 3, 0); + _leafOuter.display(loc); + _leafInner.display(loc); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java new file mode 100644 index 000000000..1b1396463 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java @@ -0,0 +1,114 @@ +package mineplex.core.gadget.gadgets.doublejump; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilAlg; +import mineplex.core.common.util.UtilColor; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.DoubleJumpEffectGadget; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import org.bukkit.Color; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.util.Vector; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +public class DoubleJumpMaple extends DoubleJumpEffectGadget +{ + /** + * Amount of particles played per tick as a player flies through the air. + */ + private static final int PARTICLES = 50; + + /** + * Vertical offset of the animation's center from the player's location. + */ + private static final float Y_OFFSET = 0.95f; + + /** + * Divisor of the gaussian distribution of particles as the player flies through the air. + */ + private static final int DISTRIBUTION = 2; + + /** + * Particle ring count when a player launches from the ground. + */ + private static final int LAUNCH_RINGS = 6; + + /** + * The distance between launch rings. + */ + private static final float RING_SPACING = 0.4f; + + /** + * Particles played per 1 unit radius. + */ + private static final int RING_DENSITY = 8; + + private HashMap _playerMap = new HashMap<>(); + + public DoubleJumpMaple(GadgetManager manager) + { + super(manager, "Maple Leap", + UtilText.splitLineToArray(C.cGray + "Jump higher than the maple trees!", LineFormat.LORE), + -8, Material.WOOL, (byte)0); + setDisplayItem(CountryFlag.CANADA.getBanner()); + } + + @Override + public void doEffect(Player player) + { + _playerMap.put(player, System.currentTimeMillis() + 1000); + + float limit = (LAUNCH_RINGS * RING_SPACING) + RING_SPACING; + + for (float r = RING_SPACING; r < limit; r++) + { + double[][] points = UtilMath.normalCircle(player.getLocation(), player.getVelocity(), r, Math.round(RING_DENSITY * r)); + + for (int i = 0; i < points.length; i++) + { + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, new Location(player.getWorld(), points[i][0], points[i][1], points[i][2]), + null, 0, 1, UtilParticle.ViewDist.NORMAL); + } + } + } + + @EventHandler + public void onUpdate(UpdateEvent event) + { + if(event.getType() != UpdateType.FASTEST) + { + return; + } + + for(Iterator> it = _playerMap.entrySet().iterator(); it.hasNext();) + { + Map.Entry e = it.next(); + + if(e.getValue() <= System.currentTimeMillis()) + { + it.remove(); + continue; + } + + Location loc = e.getKey().getLocation().add(0, Y_OFFSET, 0); + + for (int i = 0; i < PARTICLES; ++i) + { + UtilParticle.playColoredParticleToAll(java.awt.Color.RED, UtilParticle.ParticleType.RED_DUST, + UtilMath.gauss(loc, DISTRIBUTION, DISTRIBUTION, DISTRIBUTION), 0, UtilParticle.ViewDist.NORMAL); + } + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java new file mode 100644 index 000000000..39b20d946 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java @@ -0,0 +1,176 @@ +package mineplex.core.gadget.gadgets.particle; + +import mineplex.core.arcadeevents.CoreGameStartEvent; +import mineplex.core.arcadeevents.CoreGameStopEvent; +import mineplex.core.blockrestore.BlockRestore; +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilShapes; +import mineplex.core.common.util.UtilSound; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ParticleGadget; +import mineplex.core.treasure.event.TreasureFinishEvent; +import mineplex.core.treasure.event.TreasureStartEvent; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.block.BlockFadeEvent; +import org.bukkit.event.block.BlockPhysicsEvent; +import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.util.Vector; + +import java.awt.Color; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ThreadLocalRandom; +import java.util.stream.Collectors; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class ParticleAuraNiceness extends ParticleGadget +{ + /** Radius within which flowers not allowed near treasure chests */ + private static final int TREASURE_RADIUS = 4; + + private static final double H_FIELD = 0.5; + private static final double V_FIELD = 0.35; + private static final int ROSE_PROBABILITY = 30; + private static final double ROSE_RADIUS = 2.5; + + private final Set _blocks = new HashSet<>(); + + /** Locations at which treasure is currently being opened */ + private final Map _openingTreasure = new HashMap<>(); + + private boolean _enabled = true; + + public ParticleAuraNiceness(GadgetManager manager) + { + super(manager, "Aura of Niceness", + UtilText.splitLineToArray(C.cGray + "Canadians are always nice online.", LineFormat.LORE), -8, Material.WOOL, + (byte) 0); + + setDisplayItem(CountryFlag.CANADA.getBanner()); + } + + @Override + public void playParticle(Player player, UpdateEvent event) + { + if (event.getType() != UpdateType.FASTER) + { + return; + } + + for (Location location : _openingTreasure.values()) + { + if (location.toVector().isInSphere(player.getLocation().toVector(), TREASURE_RADIUS)) + { + return; + } + } + + UtilShapes.getCircle(player.getLocation().subtract(0, 0.5, 0), false, ROSE_RADIUS).stream().map(Location::getBlock) + .collect(Collectors.toSet()).forEach(block -> + { + if (ThreadLocalRandom.current().nextInt(ROSE_PROBABILITY) == 0) + { + Block b = block.getRelative(BlockFace.UP); + + if (b.isEmpty() && UtilBlock.fullSolid(block) && !UtilBlock.bottomSlab(block)) + { + Location loc = b.getLocation().add(H_FIELD, V_FIELD, H_FIELD); + + if (_enabled) + { + _blocks.add(b); + Manager.getBlockRestore().add(b, Material.RED_ROSE.getId(), (byte) 3, 5000); + } + + for (int i = 0; i < 20; ++i) + { + UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 4, 4, 4), 0, UtilParticle.ViewDist.NORMAL); + UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 4, 4, 4), 0, UtilParticle.ViewDist.NORMAL); + } + } + } + }); + + for(Iterator it = _blocks.iterator(); it.hasNext();) + { + Block b = it.next(); + + if (b.getType() != Material.RED_ROSE) + { + it.remove(); + Location loc = b.getLocation().add(H_FIELD, V_FIELD, H_FIELD); + for (int i = 0; i < 10; ++i) + { + UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 6, 6, 6), 0, UtilParticle.ViewDist.NORMAL); + UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 6, 6, 6), 0, UtilParticle.ViewDist.NORMAL); + } + } + } + } + + @EventHandler + public void onBlockFade(BlockPhysicsEvent event) + { + if (_blocks.contains(event.getBlock())) + { + event.setCancelled(true); + } + } + + /** + * Disable flowers in the area around treasure being opened. + */ + @EventHandler(priority = EventPriority.LOW) + public void disableOnTreasureStart(TreasureStartEvent event) + { + _openingTreasure.put(event.getPlayer().getUniqueId(), event.getPlayer().getLocation()); + Manager.getBlockRestore().restoreBlockAround(Material.CARPET, event.getPlayer().getLocation(), TREASURE_RADIUS); + } + + /** + * Enable flowers in the area around treasure no longer being opened. + */ + @EventHandler(priority = EventPriority.HIGH) + public void enableOnTreasureFinish(TreasureFinishEvent event) + { + if (_openingTreasure.containsKey(event.getPlayer().getUniqueId())) + { + _openingTreasure.remove(event.getPlayer().getUniqueId()); + } + } + + @EventHandler + public void onGameStart(CoreGameStartEvent event) + { + _enabled = false; + } + + @EventHandler + public void onGameEnd(CoreGameStopEvent event) + { + _enabled = true; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java new file mode 100644 index 000000000..10f87fe29 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java @@ -0,0 +1,68 @@ +package mineplex.core.gadget.gadgets.particle; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ParticleGadget; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.BannerMeta; + +import java.awt.Color; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class ParticleCanadian extends ParticleGadget +{ + private static final int STRAND_COUNT = 9; + private static final double STRAND_SPACING = 0.124; + private static final double DISTANCE_FROM_FLOOR = 0.43; + + public ParticleCanadian(GadgetManager manager) + { + super(manager, "Canadian Trail", + UtilText.splitLineToArray(C.cGray + "Lead the way to freedom!", LineFormat.LORE), + -8, Material.WOOL, (byte) 0); + + ItemStack stack = CountryFlag.CANADA.getBanner(); + System.out.println(((BannerMeta)stack.getItemMeta()).getBaseColor().getColor().toString()); + setDisplayItem(stack); + } + + @Override + public void playParticle(Player player, UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + { + return; + } + + Location center = player.getLocation().add(0, DISTANCE_FROM_FLOOR, 0); + + if (Manager.isMoving(player)) + { + for (int i = 0; i < STRAND_COUNT; i++) + { + if (i < 3 || i > 5) + { + UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, + center.add(0, STRAND_SPACING, 0), 0, UtilParticle.ViewDist.NORMAL); + } + else + { + UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, + center.add(0, STRAND_SPACING, 0), 0, UtilParticle.ViewDist.NORMAL); + } + } + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java new file mode 100644 index 000000000..92721b705 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java @@ -0,0 +1,57 @@ +package mineplex.core.gadget.gadgets.particle; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ParticleGadget; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.util.Vector; + +import java.util.concurrent.ThreadLocalRandom; + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class ParticleFreedomFireworks extends ParticleGadget +{ + private static final Material[] BLOCKTYPES = { + Material.REDSTONE_BLOCK, + Material.LAPIS_BLOCK, + Material.QUARTZ_BLOCK + }; + + public ParticleFreedomFireworks(GadgetManager manager) + { + super(manager, "Freedom Fireworks", + UtilText.splitLineToArray(C.cGray + "Keep your patriotism close.", LineFormat.LORE), + -8, Material.WOOL, (byte) 0); + + setDisplayItem(CountryFlag.USA.getBanner()); + } + + @Override + public void playParticle(Player player, UpdateEvent event) + { + if (event.getType() != UpdateType.FAST) + { + return; + } + + String particle = UtilParticle.ParticleType.BLOCK_CRACK.getParticle(BLOCKTYPES[ThreadLocalRandom.current().nextInt(0, BLOCKTYPES.length)], 0); + Location location = UtilMath.gauss(player.getEyeLocation(), 1, 1, 1); + + for (int i = 0; i < 20; ++i) + { + UtilParticle.PlayParticleToAll(particle, location, null, 3.0f, 1, UtilParticle.ViewDist.NORMAL); + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java new file mode 100644 index 000000000..ead0bc411 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java @@ -0,0 +1,80 @@ +package mineplex.core.gadget.gadgets.particle; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.ParticleGadget; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import net.minecraft.server.v1_8_R3.MinecraftServer; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Player; + +import java.awt.*; + + +/** + * @author J Teissler + * @date 6/26/17 + */ +public class ParticleStarSpangled extends ParticleGadget +{ + private static final int STRAND_COUNT = 9; + private static final double STRAND_SPACING = 0.124; + private static final double DISTANCE_FROM_FLOOR = 0.43; + + private static final Color BLUE = new Color(29, 26, 120); + + public ParticleStarSpangled(GadgetManager manager) + { + super(manager, "Star Spangled Stripe", + UtilText.splitLineToArray(C.cGray + "Blaze a trail of freedom!", LineFormat.LORE), + -8, Material.WOOL, (byte) 0); + setDisplayItem(CountryFlag.USA.getBanner()); + } + + @Override + public void playParticle(Player player, UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + { + return; + } + + Location center = player.getLocation().add(0, DISTANCE_FROM_FLOOR, 0); + + if (Manager.isMoving(player)) + { + for (int i = 0; i < STRAND_COUNT; i++) + { + if (i == 3 || i == 7) + { + if (player.getTicksLived() % 3 == 0) + { + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.FIREWORKS_SPARK, + center.add(0, STRAND_SPACING, 0), 0f, 0f, 0f, 0f, 0, UtilParticle.ViewDist.NORMAL); + continue; + } + } + else if (i == 5) + { + if (player.getTicksLived() + 1 % 3 == 0) + { + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.FIREWORKS_SPARK, + center.add(0, STRAND_SPACING, 0), 0f, 0f, 0f, 0f, 0, UtilParticle.ViewDist.NORMAL); + continue; + } + } + + UtilParticle.playColoredParticleToAll(BLUE, UtilParticle.ParticleType.RED_DUST, + center.add(0, STRAND_SPACING, 0), 0, UtilParticle.ViewDist.NORMAL); + } + } + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java new file mode 100644 index 000000000..a295bb9da --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java @@ -0,0 +1,26 @@ +package mineplex.core.gadget.set; + +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; +import mineplex.core.gadget.gadgets.death.DeathFreedom; +import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; +import mineplex.core.gadget.gadgets.particle.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; +import mineplex.core.gadget.types.GadgetSet; + +public class SetCanadian extends GadgetSet +{ + + public SetCanadian(GadgetManager manager) + { + super(manager, "Canadian", "2x Holiday Points while active (Titles)", + manager.getGadget(ArrowTrailRedWhite.class), + manager.getGadget(DeathMapleLeaf.class), + manager.getGadget(DoubleJumpMaple.class), + manager.getGadget(ParticleCanadian.class)); + } + +} From e599f1653c63bc606ffa1ed8b35431fcc4294ba6 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:36:21 -0400 Subject: [PATCH 10/34] Allow Flags to interact with costumes and hats correctly --- .../src/mineplex/core/gadget/types/HatGadget.java | 2 +- .../src/mineplex/core/gadget/types/MorphGadget.java | 3 ++- .../src/mineplex/core/gadget/types/OutfitGadget.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java index b6becadc1..38df4c367 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/HatGadget.java @@ -47,7 +47,7 @@ public abstract class HatGadget extends OutfitGadget public void applyArmor(Player player, boolean message) { Manager.removeGadgetType(player, GadgetType.MORPH, this); - + Manager.removeGadgetType(player, GadgetType.FLAG, this); Manager.removeOutfit(player, _slot); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java index 4fb2b5ed9..7240ed1d5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/MorphGadget.java @@ -26,7 +26,8 @@ public abstract class MorphGadget extends Gadget public void applyArmor(Player player, boolean message) { Manager.removeGadgetType(player, GadgetType.MORPH, this); - Manager.removeGadgetType(player, GadgetType.COSTUME); + Manager.removeGadgetType(player, GadgetType.COSTUME, this); + Manager.removeGadgetType(player, GadgetType.FLAG, this); _active.add(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java index 6ce4d70b7..e5ab85cb3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java @@ -60,7 +60,7 @@ public abstract class OutfitGadget extends Gadget public void applyArmor(Player player, boolean message) { Manager.removeGadgetType(player, GadgetType.MORPH, this); - + Manager.removeGadgetType(player, GadgetType.FLAG, this); Manager.removeOutfit(player, _slot); _active.add(player); From 3d4fc5fa9c5968fde0096d8c795ee7668fa8e6b9 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:36:49 -0400 Subject: [PATCH 11/34] Add cosmetics to chests --- .../core/cosmetic/CosmeticManager.java | 26 ++- .../mineplex/core/gadget/GadgetManager.java | 163 +++++++++++------- .../mineplex/core/reward/RewardManager.java | 112 +++++++----- .../core/treasure/gui/TreasurePage.java | 66 +++++-- 4 files changed, 249 insertions(+), 118 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java index d1ae7b491..9f0552d86 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java @@ -1,5 +1,7 @@ package mineplex.core.cosmetic; +import mineplex.core.chat.Chat; +import mineplex.core.punish.Punish; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -41,19 +43,23 @@ import mineplex.core.twofactor.TwoFactorAuth; public class CosmeticManager extends MiniPlugin { private final TwoFactorAuth _twofactor = Managers.require(TwoFactorAuth.class); - private InventoryManager _inventoryManager; - private GadgetManager _gadgetManager; - private MountManager _mountManager; - private PetManager _petManager; - private TreasureManager _treasureManager; - private BoosterManager _boosterManager; + private final InventoryManager _inventoryManager; + private final GadgetManager _gadgetManager; + private final MountManager _mountManager; + private final PetManager _petManager; + private final TreasureManager _treasureManager; + private final BoosterManager _boosterManager; + private final Punish _punish; private CosmeticShop _shop; private boolean _showInterface = true; private int _interfaceSlot = 4; - public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager, PetManager petManager, TreasureManager treasureManager, BoosterManager boosterManager) + public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, + InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager, + PetManager petManager, TreasureManager treasureManager, BoosterManager boosterManager, + Punish punish) { super("Cosmetic Manager", plugin); @@ -63,6 +69,7 @@ public class CosmeticManager extends MiniPlugin _petManager = petManager; _treasureManager = treasureManager; _boosterManager = boosterManager; + _punish = punish; _shop = new CosmeticShop(this, clientManager, donationManager, _moduleName); } @@ -242,6 +249,11 @@ public class CosmeticManager extends MiniPlugin { return _boosterManager; } + + public Punish getPunishManager() + { + return _punish; + } public void displayUI(Player player) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index e0d211e34..18afeb5f7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -10,7 +10,18 @@ import java.util.Set; import java.util.UUID; import java.util.function.Predicate; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; +import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; +import mineplex.core.gadget.gadgets.flag.FlagType; import mineplex.core.gadget.gadgets.morph.MorphBobRoss; +import mineplex.core.gadget.gadgets.particle.ParticleAuraNiceness; +import mineplex.core.gadget.gadgets.particle.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.ParticleFreedomFireworks; +import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; +import mineplex.core.gadget.set.SetCanadian; +import mineplex.core.gadget.types.FlagGadget; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -47,50 +58,50 @@ import mineplex.core.gadget.event.GadgetCollideEntityEvent; import mineplex.core.gadget.event.GadgetEnableEvent; import mineplex.core.gadget.event.PlayerToggleSwimEvent; import mineplex.core.gadget.event.TauntCommandEvent; -import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane; -import mineplex.core.gadget.gadgets.arrowtrail.cupidslove.ArrowTrailCupid; -import mineplex.core.gadget.gadgets.arrowtrail.emerald.ArrowTrailEmerald; -import mineplex.core.gadget.gadgets.arrowtrail.freedom.ArrowTrailFreedom; -import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord; -import mineplex.core.gadget.gadgets.arrowtrail.halloween.ArrowTrailHalloween; -import mineplex.core.gadget.gadgets.arrowtrail.howlingwinds.ArrowTrailStorm; -import mineplex.core.gadget.gadgets.arrowtrail.music.ArrowTrailMusic; -import mineplex.core.gadget.gadgets.arrowtrail.party.ArrowTrailConfetti; -import mineplex.core.gadget.gadgets.arrowtrail.shadow.ArrowTrailShadow; -import mineplex.core.gadget.gadgets.arrowtrail.spring.ArrowTrailSpring; -import mineplex.core.gadget.gadgets.arrowtrail.titan.ArrowTrailTitan; -import mineplex.core.gadget.gadgets.arrowtrail.vampire.ArrowTrailBlood; -import mineplex.core.gadget.gadgets.arrowtrail.wisdom.ArrowTrailEnchant; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailHalloween; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailSpring; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant; import mineplex.core.gadget.gadgets.balloons.BalloonItem; import mineplex.core.gadget.gadgets.balloons.BalloonType; -import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane; -import mineplex.core.gadget.gadgets.death.christmas.DeathPresentDanger; -import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart; -import mineplex.core.gadget.gadgets.death.emerald.DeathEmerald; -import mineplex.core.gadget.gadgets.death.freedom.DeathFreedom; -import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord; -import mineplex.core.gadget.gadgets.death.howlingwinds.DeathStorm; -import mineplex.core.gadget.gadgets.death.music.DeathMusic; -import mineplex.core.gadget.gadgets.death.party.DeathPinataBurst; -import mineplex.core.gadget.gadgets.death.shadow.DeathShadow; -import mineplex.core.gadget.gadgets.death.spring.DeathSpring; -import mineplex.core.gadget.gadgets.death.titan.DeathTitan; -import mineplex.core.gadget.gadgets.death.vampire.DeathBlood; -import mineplex.core.gadget.gadgets.death.wisdom.DeathEnchant; -import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane; -import mineplex.core.gadget.gadgets.doublejump.cupidslove.DoubleJumpCupidsWings; -import mineplex.core.gadget.gadgets.doublejump.emerald.DoubleJumpEmerald; -import mineplex.core.gadget.gadgets.doublejump.freedom.DoubleJumpFreedom; -import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord; -import mineplex.core.gadget.gadgets.doublejump.halloween.DoubleJumpHalloween; -import mineplex.core.gadget.gadgets.doublejump.howlingwinds.DoubleJumpStorm; -import mineplex.core.gadget.gadgets.doublejump.music.DoubleJumpMusic; -import mineplex.core.gadget.gadgets.doublejump.party.DoubleJumpFirecracker; -import mineplex.core.gadget.gadgets.doublejump.shadow.DoubleJumpShadow; -import mineplex.core.gadget.gadgets.doublejump.spring.DoubleJumpSpring; -import mineplex.core.gadget.gadgets.doublejump.titan.DoubleJumpTitan; -import mineplex.core.gadget.gadgets.doublejump.vampire.DoubleJumpBlood; -import mineplex.core.gadget.gadgets.doublejump.wisdom.DoubleJumpEnchant; +import mineplex.core.gadget.gadgets.death.DeathCandyCane; +import mineplex.core.gadget.gadgets.death.DeathPresentDanger; +import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; +import mineplex.core.gadget.gadgets.death.DeathEmerald; +import mineplex.core.gadget.gadgets.death.DeathFreedom; +import mineplex.core.gadget.gadgets.death.DeathFrostLord; +import mineplex.core.gadget.gadgets.death.DeathStorm; +import mineplex.core.gadget.gadgets.death.DeathMusic; +import mineplex.core.gadget.gadgets.death.DeathPinataBurst; +import mineplex.core.gadget.gadgets.death.DeathShadow; +import mineplex.core.gadget.gadgets.death.DeathSpring; +import mineplex.core.gadget.gadgets.death.DeathTitan; +import mineplex.core.gadget.gadgets.death.DeathBlood; +import mineplex.core.gadget.gadgets.death.DeathEnchant; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpSpring; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; import mineplex.core.gadget.gadgets.gamemodifiers.GameModifierType; import mineplex.core.gadget.gadgets.gamemodifiers.gemhunters.GameModifierMount; import mineplex.core.gadget.gadgets.gamemodifiers.gemhunters.MountType; @@ -366,6 +377,7 @@ public class GadgetManager extends MiniPlugin addSet(new SetMusic(this)); addSet(new SetFreedom(this)); addSet(new SetSpring(this)); + addSet(new SetCanadian(this)); } private void createGadgets() @@ -459,31 +471,40 @@ public class GadgetManager extends MiniPlugin // Particles addGadget(new ParticleFoot(this)); - addGadget(new ParticleFireRings(this)); - addGadget(new ParticleFairy(this)); - addGadget(new ParticleLegend(this)); - addGadget(new ParticleFrostLord(this)); - addGadget(new ParticleTitan(this)); - addGadget(new ParticleCandyCane(this)); - addGadget(new ParticleCoalFumes(this)); - addGadget(new ParticlePartyTime(this)); - addGadget(new ParticleHeart(this)); addGadget(new ParticleEmerald(this)); - addGadget(new ParticleWingsDemons(this)); - addGadget(new ParticleEnchant(this)); addGadget(new ParticleRain(this)); addGadget(new ParticleBlood(this)); + addGadget(new ParticleEnchant(this)); addGadget(new ParticleMusic(this)); - addGadget(new ParticleWingsAngel(this)); - addGadget(new ParticleWingsInfernal(this)); - addGadget(new ParticleWingsPixie(this)); + addGadget(new ParticlePartyTime(this)); + + addGadget(new ParticleHeart(this)); + addGadget(new ParticleCandyCane(this)); + addGadget(new ParticleFrostLord(this)); + addGadget(new ParticleLegend(this)); + addGadget(new ParticleTitan(this)); addGadget(new ParticleYinYang(this)); - addGadget(new ParticleFreedom(this)); - addGadget(new ParticleChristmasTree(this)); + addGadget(new ParticleKing(this, _castleManager)); + + addGadget(new ParticleWingsPixie(this)); + addGadget(new ParticleWingsDemons(this)); + addGadget(new ParticleWingsInfernal(this)); + addGadget(new ParticleWingsAngel(this)); addGadget(new ParticleWingsLove(this)); + addGadget(new ParticleFireRings(this)); + addGadget(new ParticleFairy(this)); + + addGadget(new ParticleChristmasTree(this)); + addGadget(new ParticleCoalFumes(this)); addGadget(new ParticleSpringHalo(this)); addGadget(new ParticleWingsBee(this)); - addGadget(new ParticleKing(this, _castleManager)); + + addGadget(new ParticleFreedom(this)); + addGadget(new ParticleFreedomFireworks(this)); + addGadget(new ParticleStarSpangled(this)); + addGadget(new ParticleAuraNiceness(this)); + addGadget(new ParticleCanadian(this)); + // Arrow Trails addGadget(new ArrowTrailFrostLord(this)); @@ -500,6 +521,7 @@ public class GadgetManager extends MiniPlugin addGadget(new ArrowTrailFreedom(this)); addGadget(new ArrowTrailHalloween(this)); addGadget(new ArrowTrailSpring(this)); + addGadget(new ArrowTrailRedWhite(this)); // Death Effect addGadget(new DeathFrostLord(this)); @@ -516,6 +538,7 @@ public class GadgetManager extends MiniPlugin addGadget(new DeathFreedom(this)); addGadget(new DeathPresentDanger(this)); addGadget(new DeathSpring(this)); + addGadget(new DeathMapleLeaf(this)); // Double Jump addGadget(new DoubleJumpFrostLord(this)); @@ -532,6 +555,7 @@ public class GadgetManager extends MiniPlugin addGadget(new DoubleJumpFreedom(this)); addGadget(new DoubleJumpHalloween(this)); addGadget(new DoubleJumpSpring(this)); + addGadget(new DoubleJumpMaple(this)); // Hat for (HatType hatType : HatType.values()) @@ -625,6 +649,10 @@ public class GadgetManager extends MiniPlugin addGadget(new BlowAKissTaunt(this)); addGadget(new RainbowTaunt(this)); + // Flags + addGadget(new FlagGadget(this, FlagType.UNITED_STATES)); + addGadget(new FlagGadget(this, FlagType.CANADA)); + // Kit Selectors addGadget(new WaterWingsKitSelector(this)); addGadget(new HaloKitSelector(this)); @@ -830,6 +858,23 @@ public class GadgetManager extends MiniPlugin return null; } + public FlagGadget getFlagGadget(FlagType type) + { + for (Gadget gadget : getGadgets(GadgetType.FLAG)) + { + if(gadget instanceof FlagGadget) + { + FlagGadget flagGadget = (FlagGadget) gadget; + + if (type.equals(flagGadget.getFlagType())) + { + return flagGadget; + } + } + } + return null; + } + public BalloonGadget getBalloonGadget(BalloonType balloonType) { for (Gadget gadget : getGadgets(GadgetType.BALLOON)) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java index 5f4e5fb16..eabf8e7e4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java @@ -5,6 +5,14 @@ import java.util.EnumMap; import java.util.List; import java.util.Random; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; +import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; +import mineplex.core.gadget.gadgets.flag.FlagType; +import mineplex.core.gadget.gadgets.particle.ParticleAuraNiceness; +import mineplex.core.gadget.gadgets.particle.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.ParticleFreedomFireworks; +import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -15,46 +23,46 @@ import mineplex.core.common.Rank; import mineplex.core.common.util.banner.CountryFlag; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.halloween.ArrowTrailHalloween; -import mineplex.core.gadget.gadgets.arrowtrail.candycane.ArrowTrailCandyCane; -import mineplex.core.gadget.gadgets.arrowtrail.cupidslove.ArrowTrailCupid; -import mineplex.core.gadget.gadgets.arrowtrail.emerald.ArrowTrailEmerald; -import mineplex.core.gadget.gadgets.arrowtrail.freedom.ArrowTrailFreedom; -import mineplex.core.gadget.gadgets.arrowtrail.frostlord.ArrowTrailFrostLord; -import mineplex.core.gadget.gadgets.arrowtrail.howlingwinds.ArrowTrailStorm; -import mineplex.core.gadget.gadgets.arrowtrail.music.ArrowTrailMusic; -import mineplex.core.gadget.gadgets.arrowtrail.party.ArrowTrailConfetti; -import mineplex.core.gadget.gadgets.arrowtrail.shadow.ArrowTrailShadow; -import mineplex.core.gadget.gadgets.arrowtrail.spring.ArrowTrailSpring; -import mineplex.core.gadget.gadgets.arrowtrail.vampire.ArrowTrailBlood; -import mineplex.core.gadget.gadgets.arrowtrail.wisdom.ArrowTrailEnchant; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailHalloween; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailSpring; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant; import mineplex.core.gadget.gadgets.balloons.BalloonType; -import mineplex.core.gadget.gadgets.death.candycane.DeathCandyCane; -import mineplex.core.gadget.gadgets.death.christmas.DeathPresentDanger; -import mineplex.core.gadget.gadgets.death.cupidslove.DeathCupidsBrokenHeart; -import mineplex.core.gadget.gadgets.death.emerald.DeathEmerald; -import mineplex.core.gadget.gadgets.death.freedom.DeathFreedom; -import mineplex.core.gadget.gadgets.death.frostlord.DeathFrostLord; -import mineplex.core.gadget.gadgets.death.howlingwinds.DeathStorm; -import mineplex.core.gadget.gadgets.death.music.DeathMusic; -import mineplex.core.gadget.gadgets.death.party.DeathPinataBurst; -import mineplex.core.gadget.gadgets.death.shadow.DeathShadow; -import mineplex.core.gadget.gadgets.death.spring.DeathSpring; -import mineplex.core.gadget.gadgets.death.vampire.DeathBlood; -import mineplex.core.gadget.gadgets.death.wisdom.DeathEnchant; -import mineplex.core.gadget.gadgets.doublejump.halloween.DoubleJumpHalloween; -import mineplex.core.gadget.gadgets.doublejump.candycane.DoubleJumpCandyCane; -import mineplex.core.gadget.gadgets.doublejump.cupidslove.DoubleJumpCupidsWings; -import mineplex.core.gadget.gadgets.doublejump.emerald.DoubleJumpEmerald; -import mineplex.core.gadget.gadgets.doublejump.freedom.DoubleJumpFreedom; -import mineplex.core.gadget.gadgets.doublejump.frostlord.DoubleJumpFrostLord; -import mineplex.core.gadget.gadgets.doublejump.howlingwinds.DoubleJumpStorm; -import mineplex.core.gadget.gadgets.doublejump.music.DoubleJumpMusic; -import mineplex.core.gadget.gadgets.doublejump.party.DoubleJumpFirecracker; -import mineplex.core.gadget.gadgets.doublejump.shadow.DoubleJumpShadow; -import mineplex.core.gadget.gadgets.doublejump.spring.DoubleJumpSpring; -import mineplex.core.gadget.gadgets.doublejump.vampire.DoubleJumpBlood; -import mineplex.core.gadget.gadgets.doublejump.wisdom.DoubleJumpEnchant; +import mineplex.core.gadget.gadgets.death.DeathCandyCane; +import mineplex.core.gadget.gadgets.death.DeathPresentDanger; +import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; +import mineplex.core.gadget.gadgets.death.DeathEmerald; +import mineplex.core.gadget.gadgets.death.DeathFreedom; +import mineplex.core.gadget.gadgets.death.DeathFrostLord; +import mineplex.core.gadget.gadgets.death.DeathStorm; +import mineplex.core.gadget.gadgets.death.DeathMusic; +import mineplex.core.gadget.gadgets.death.DeathPinataBurst; +import mineplex.core.gadget.gadgets.death.DeathShadow; +import mineplex.core.gadget.gadgets.death.DeathSpring; +import mineplex.core.gadget.gadgets.death.DeathBlood; +import mineplex.core.gadget.gadgets.death.DeathEnchant; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpHalloween; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpSpring; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; import mineplex.core.gadget.gadgets.gamemodifiers.minestrike.MineStrikeSkin; import mineplex.core.gadget.gadgets.hat.HatType; import mineplex.core.gadget.gadgets.item.ItemBatGun; @@ -318,6 +326,10 @@ public class RewardManager addHat(Type.WINTER_HOLIDAY, HatType.PRESENT, rarity, 5); addHat(Type.WINTER_HOLIDAY, HatType.SNOWMAN, rarity, 5); + // FREEDOM + addGadget(Type.FREEDOM, getGadget(ArrowTrailRedWhite.class), rarity, 150); + addGadget(Type.FREEDOM, getGadget(ArrowTrailFreedom.class), rarity, 150); + // Omega items addMusicReward(Type.OMEGA, "Blocks Disc", rarity, 25); addMusicReward(Type.OMEGA, "Cat Disc", rarity, 25); @@ -484,9 +496,12 @@ public class RewardManager // FREEDOM addHat(Type.FREEDOM, HatType.UNCLE_SAM, rarity, 100); + addHat(Type.FREEDOM, HatType.AMERICA, rarity, 120); + addHat(Type.FREEDOM, HatType.CANADA, rarity, 120); addGadget(Type.FREEDOM, getGadget(DoubleJumpFreedom.class), rarity, 50); - addGadget(Type.FREEDOM, getGadget(ArrowTrailFreedom.class), rarity, 10); + addGadget(Type.FREEDOM, getGadget(DoubleJumpMaple.class), rarity, 50); addGadget(Type.FREEDOM, getGadget(DeathFreedom.class), rarity, 75); + addGadget(Type.FREEDOM, getGadget(DeathMapleLeaf.class), rarity, 75); // Omega Chest addGadget(Type.OMEGA, getGadget(DoubleJumpFreedom.class), rarity, 5); @@ -758,6 +773,12 @@ public class RewardManager addMount(Type.FREEDOM, getMount(MountFreedomHorse.class), rarity, 1); addGadget(Type.FREEDOM, getGadget(MorphUncleSam.class), rarity, 5); addGadget(Type.FREEDOM, getGadget(ParticleFreedom.class), rarity, 50); + addGadget(Type.FREEDOM, getGadget(ParticleFreedomFireworks.class), rarity, 95); + addGadget(Type.FREEDOM, getGadget(ParticleAuraNiceness.class), rarity, 40); + addGadget(Type.FREEDOM, getGadget(ParticleCanadian.class), rarity, 10); + addGadget(Type.FREEDOM, getGadget(ParticleStarSpangled.class), rarity, 10); + addFlag(Type.FREEDOM, FlagType.CANADA, rarity, 35); + addFlag(Type.FREEDOM, FlagType.UNITED_STATES, rarity, 35); // Omega items addPetReward(Type.OMEGA, PetType.VILLAGER, rarity, 1); @@ -1013,6 +1034,17 @@ public class RewardManager return addGadget(type, gadget, gadget.getDisplayName(), rarity, weight, shards); } + public UnknownPackageReward addFlag(Type type, FlagType flagType, RewardRarity rarity, int weight) + { + return addFlag(type, flagType, rarity, weight, getShards(rarity)); + } + + public UnknownPackageReward addFlag(Type type, FlagType flagType, RewardRarity rarity, int weight, int shards) + { + Gadget gadget = _gadgetManager.getFlagGadget(flagType); + return addGadget(type, gadget, gadget.getDisplayName(), rarity, weight, shards); + } + public UnknownPackageReward addBalloon(Type type, BalloonType balloonType, RewardRarity rarity, int weight) { return addBalloon(type, balloonType, rarity, weight, getShards(rarity)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java index 030e3dc1d..de56e4730 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java @@ -4,6 +4,15 @@ import java.io.File; import java.util.ArrayList; import java.util.List; +import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; +import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; +import mineplex.core.gadget.gadgets.flag.FlagType; +import mineplex.core.gadget.gadgets.hat.HatType; +import mineplex.core.gadget.gadgets.particle.ParticleAuraNiceness; +import mineplex.core.gadget.gadgets.particle.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.ParticleFreedomFireworks; +import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -20,9 +29,9 @@ import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilText; import mineplex.core.donation.DonationManager; 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.arrowtrail.ArrowTrailFreedom; +import mineplex.core.gadget.gadgets.death.DeathFreedom; +import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; import mineplex.core.gadget.gadgets.morph.MorphUncleSam; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; import mineplex.core.gadget.types.Gadget; @@ -141,7 +150,7 @@ public class TreasurePage extends ShopPageBase int springCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.SPRING.getItemName()); boolean availableChristmas = false; - boolean availableFreedom = false; + boolean availableFreedom = true; boolean availableHaunted = false; boolean availableTrick = false; boolean availableThank = false; @@ -152,8 +161,8 @@ public class TreasurePage extends ShopPageBase List shardLore = new ArrayList<>(); shardLore.add(" "); - shardLore.add(C.cGray + "This seems like it might come in"); - shardLore.add(C.cGray + "handy. Maybe I can collect more!"); + shardLore.add(C.cGray + "These seem like they might come in"); + shardLore.add(C.cGray + "handy. Maybe I should collect more!"); List basicLore = new ArrayList<>(); basicLore.add(" "); @@ -254,14 +263,36 @@ public class TreasurePage extends ShopPageBase freedomLore.add(C.cGray + "carved this chest himself from the wood"); freedomLore.add(C.cGray + "of the apple tree he cut down..."); freedomLore.add(" "); - if (freedomCount > 0 && !hasAllFreedomItems(getPlayer())) - freedomLore.add(C.cGreen + "Click to Open!"); + + if (freedomCount > 0) + { + if (hasAllFreedomItems(getPlayer())) + { + freedomLore.add(C.cWhite + "You own all treasures from this chest."); + } + else + { + freedomLore.add(C.cGreen + "Click to Open!"); + } + } else { - freedomLore.add(C.cRed + "This item is no longer available!"); + if (!availableFreedom) + { + freedomLore.add(C.cRed + "This item is no longer available!"); + } + else if (hasAllFreedomItems(getPlayer())) + { + freedomLore.add(C.cWhite + "You own all treasures from this chest."); + } + else + { + freedomLore.add(ChatColor.RESET + "Purchase at: " + C.cYellow + "www.mineplex.com/shop"); + } } + freedomLore.add(" "); - freedomLore.add(ChatColor.RESET + C.cGreen + getFreedomUnlockedAmount(getPlayer()) + "/7 Unlocked"); + freedomLore.add(ChatColor.RESET + C.cGreen + getFreedomUnlockedAmount(getPlayer()) + "/18 Unlocked"); List omegaLore = new ArrayList<>(); omegaLore.add(" "); @@ -699,7 +730,7 @@ public class TreasurePage extends ShopPageBase public int getFreedomUnlockedAmount(Player player) { if (hasAllFreedomItems(player)) - return 7; + return 18; int amount = 0; Gadget[] gadgets = new Gadget[] { @@ -708,7 +739,18 @@ public class TreasurePage extends ShopPageBase _gadgetManager.getGadget(ArrowTrailFreedom.class), _gadgetManager.getGadget(DoubleJumpFreedom.class), _gadgetManager.getGadget(DeathFreedom.class), - _gadgetManager.getGadget(MorphUncleSam.class) + _gadgetManager.getGadget(MorphUncleSam.class), + _gadgetManager.getGadget(ArrowTrailRedWhite.class), + _gadgetManager.getGadget(DeathMapleLeaf.class), + _gadgetManager.getGadget(DoubleJumpMaple.class), + _gadgetManager.getGadget(ParticleAuraNiceness.class), + _gadgetManager.getGadget(ParticleCanadian.class), + _gadgetManager.getGadget(ParticleFreedomFireworks.class), + _gadgetManager.getGadget(ParticleStarSpangled.class), + _gadgetManager.getHatGadget(HatType.AMERICA), + _gadgetManager.getHatGadget(HatType.CANADA), + _gadgetManager.getFlagGadget(FlagType.CANADA), + _gadgetManager.getFlagGadget(FlagType.UNITED_STATES), }; Mount freedomMount = _gadgetManager.getMountManager().getMount("Freedom Mount"); if (freedomMount != null) From bfca6603c17c3c5b30d031f92f3b5dcd715224c8 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:37:06 -0400 Subject: [PATCH 12/34] Disallow eternal taunt disguising an already disguised player --- .../gadget/gadgets/taunts/EternalTaunt.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java index 103efacd2..1e0c943b7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +import mineplex.core.disguise.disguises.DisguiseBase; import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -41,7 +42,8 @@ public class EternalTaunt extends TauntGadget private static final int COOLDOWN = 30000; private static final int PVP_COOLDOWN = 10000; - private Map> _clocks = new HashMap<>(); + private final Map> _clocks = new HashMap<>(); + private final Map _disguises = new HashMap<>(); public EternalTaunt(GadgetManager manager) { @@ -68,8 +70,12 @@ public class EternalTaunt extends TauntGadget Bukkit.broadcastMessage(F.main("Taunt", F.name(player.getName()) + " waited so long they turned to bones.")); - DisguiseSkeleton disguiseSkeleton = new DisguiseSkeleton(player); - UtilMorph.disguise(player, disguiseSkeleton, Manager); + if (!Manager.getDisguiseManager().isDisguised(player)) + { + DisguiseSkeleton disguiseSkeleton = new DisguiseSkeleton(player); + UtilMorph.disguise(player, disguiseSkeleton, Manager); + _disguises.put(player.getUniqueId(), disguiseSkeleton); + } } @Override @@ -114,7 +120,11 @@ public class EternalTaunt extends TauntGadget @Override public void onFinish(Player player) { - UtilMorph.undisguise(player, Manager.getDisguiseManager()); + if (_disguises.containsKey(player.getUniqueId())) + { + Manager.getDisguiseManager().undisguise(_disguises.remove(player.getUniqueId())); + } + if (_clocks.containsKey(player.getUniqueId())) { _clocks.get(player.getUniqueId()).forEach(c -> c.remove()); From 082a197e8b0a0086a35857eab032854c3c8d7bfd Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:37:20 -0400 Subject: [PATCH 13/34] Overhaul legend particle --- .../gadgets/particle/ParticleLegend.java | 182 +++++++++++++++++- 1 file changed, 180 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java index f99338a75..51911de42 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java @@ -1,6 +1,9 @@ package mineplex.core.gadget.gadgets.particle; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; import org.bukkit.Effect; +import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -16,13 +19,46 @@ import mineplex.core.inventory.ClientItem; import mineplex.core.inventory.data.Item; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; +import org.bukkit.util.Vector; + +import java.awt.Color; +import java.util.Random; public class ParticleLegend extends ParticleGadget { + private static final double PI = Math.PI; + private static final int BASE_PILLARS = 9; + private static final int PILLAR_VARIANCE = 7; + private static final int COLOR_VARIANCE = 5; + private static final int MOVING_PARTICLES = 8; + private static final double VERTICAL_SPEED = 0.1; + private static final double HEIGHT_VARIANCE = 0.8; + private static final double ROTATIONAL_SPEED = .03; + private static final double RADIAL_VARIANCE = 0.09; + private static final double DARK_PARTICLE_CHANCE = 0.5; + private static final double BASE_RADIUS = 1.30; + private static final double HEIGHT_MODIFIER_BASE = 0.1; + private static final double HEIGHT_MODIFIER_MAX = 1.3; + private static final double HEIGHT_MODIFIER_INTERVAL = 0.2; + private static final Color[] SELECTABLE_COLORS = { + new Color(170, 100, 170), + new Color(50, 10, 60), + new Color(120, 10, 170), + new Color(65, 20, 80) + }; + + private final int _pillars = pillars(); + private final Color[] _colors = colors(); + private final double[] _heights = heights(); + private final double[] _verticals = verticals(); + private final double[] _variance = variances(); + private final double[] _thetas = thetas(); + private final double[] _radii = radii(); + public ParticleLegend(GadgetManager manager) { super(manager, "Legendary Aura", - UtilText.splitLineToArray(C.cGray + "This particle will be updated soon! Yay!", LineFormat.LORE), + UtilText.splitLineToArray(C.cGray + "Let the energy of the End protect you.", LineFormat.LORE), -1, Material.ENDER_PORTAL_FRAME, (byte)0); } @@ -31,9 +67,151 @@ public class ParticleLegend extends ParticleGadget public void playParticle(Player player, UpdateEvent event) { if (event.getType() != UpdateType.TICK) + { return; + } - player.getWorld().playEffect(player.getLocation().add(0, 1, 0), Effect.ENDER_SIGNAL, 0); + if (Manager.isMoving(player)) + { + Location loc = player.getLocation().add(0, 1.5, 0); + + for (int i = 0; i < MOVING_PARTICLES; i++) + { + UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST, + UtilMath.gauss(loc, 8, 4, 8), 0, UtilParticle.ViewDist.NORMAL); + } + } + else + { + if (event.getTick() % (ROTATIONAL_SPEED * 100) == 0) + { + for (int i = 0; i < _pillars; i++) + { + _thetas[i] = rollover(_thetas[i], ROTATIONAL_SPEED); + _heights[i] = rollover(_heights[i], _verticals[i]); + + double x = (_radii[i] * Math.cos(_thetas[i])) + player.getLocation().getX(); + double z = (_radii[i] * Math.sin(_thetas[i])) + player.getLocation().getZ(); + double y = (Math.sin(_heights[i]) * _variance[i]) + player.getLocation().getY(); + + for (double h = HEIGHT_MODIFIER_BASE; h <= HEIGHT_MODIFIER_MAX; h+= HEIGHT_MODIFIER_INTERVAL) + { + UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST, + new Location(player.getWorld(), x, y + h, z), 0, UtilParticle.ViewDist.NORMAL); + + if (Math.random() < DARK_PARTICLE_CHANCE) + { + UtilParticle.playColoredParticleToAll(Color.BLACK, UtilParticle.ParticleType.RED_DUST, + new Location(player.getWorld(), x, y + h, z), 0, UtilParticle.ViewDist.NORMAL); + } + } + } + } + } + } + + private double[] heights() + { + double[] array = new double[_pillars]; + + for (int i = 0; i < _pillars; i++) + { + array[i] = 6.28 * Math.random(); + } + + return array; + } + + private double[] variances() + { + double[] array = new double[_pillars]; + + for (int i = 0; i < _pillars; i++) + { + array[i] = Math.random() * HEIGHT_VARIANCE; + } + + return array; + } + + private double[] verticals() + { + double[] array = new double[_pillars]; + + for (int i = 0; i < _pillars; i++) + { + array[i] = Math.random() * VERTICAL_SPEED; + } + + return array; + } + + private double[] thetas() + { + double[] array = new double[_pillars]; + double theta = 0; + double interval = (2 * PI) / _pillars; + + for (int i = 0; i < _pillars; i++) + { + array[i] = theta; + theta += interval; + } + + return array; + } + + private double[] radii() + { + double[] array = new double[_pillars]; + + for (int i = 0; i < _pillars; i++) + { + array[i] = BASE_RADIUS + (Math.random() * RADIAL_VARIANCE); + } + + return array; + } + + private Color[] colors() + { + Random random = new Random(); + + Color[] array = new Color[_pillars]; + + for (int i = 0; i < _pillars; i++) + { + Color color = SELECTABLE_COLORS[i % SELECTABLE_COLORS.length]; + + int r = color.getRed() + (int) (random.nextGaussian() * COLOR_VARIANCE); + int g = color.getGreen() + (int) (random.nextGaussian() * COLOR_VARIANCE); + int b = color.getBlue() + (int) (random.nextGaussian() * COLOR_VARIANCE); + + r = Math.min(255, Math.max(0, r)); + g = Math.min(255, Math.max(0, g)); + b = Math.min(255, Math.max(0, b)); + + array[i] = new Color(r, g, b); + } + + return array; + } + + private int pillars() + { + return BASE_PILLARS + (int) ((Math.random() * PILLAR_VARIANCE) - (PILLAR_VARIANCE / 2)); + } + + private double rollover(double value, double additive) + { + value += additive; + + if (value >= 2 * PI) + { + value = value - (2 * PI); + } + + return value; } @EventHandler From 9d1c3930b394f55523f68461d86928f51eebfcfd Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:37:33 -0400 Subject: [PATCH 14/34] Update hubs with new CosmeticManager constructor --- .../Mineplex.Hub.Clans/src/mineplex/clanshub/HubManager.java | 2 +- Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java | 2 +- .../Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java | 2 +- .../mavericks-review-hub/src/mineplex/mavericks/review/Hub.java | 2 +- .../src/mineplex/gemhunters/GemHunters.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/HubManager.java b/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/HubManager.java index 29e6ab472..b02d21718 100644 --- a/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/HubManager.java +++ b/Plugins/Mineplex.Hub.Clans/src/mineplex/clanshub/HubManager.java @@ -233,7 +233,7 @@ public class HubManager extends MiniPlugin implements IChatMessageFormatter _treasureManager.addTreasureLocation(loc); } - new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager, boosterManager); + new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager, boosterManager, punish); new MenuManager(_plugin); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java index 070cd582a..a1281af14 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/HubManager.java @@ -236,7 +236,7 @@ public class HubManager extends MiniClientPlugin implements IChatMess _bonusManager = new BonusManager(plugin, null, playWireManager, clientManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager, facebookManager, youtubeManager, _gadgetManager, thankManager, "Carl"); _treasureManager = new TreasureManager(_plugin, clientManager, serverStatusManager, donationManager, _inventoryManager, petManager, _gadgetManager, _blockRestore, hologramManager, statsManager, _bonusManager.getRewardManager()); - CosmeticManager cosmeticManager = new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager, boosterManager); + CosmeticManager cosmeticManager = new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager, boosterManager, punish); _mavericksManager = new MavericksManager(plugin, cosmeticManager, hologramManager, this); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java index 197d76ff0..87c4ec8ab 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/Arcade.java @@ -203,7 +203,7 @@ public class Arcade extends JavaPlugin GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito, castleManager); ThankManager thankManager = new ThankManager(this, _clientManager, _donationManager); BoosterManager boosterManager = new BoosterManager(this, _serverConfiguration.getServerGroup().getBoosterGroup(), _clientManager, _donationManager, inventoryManager, thankManager); - CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, null, boosterManager); + CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, null, boosterManager, punish); cosmeticManager.setInterfaceSlot(6); gadgetManager.setActiveItemSlot(3); cosmeticManager.disableTeamArmor(); diff --git a/Plugins/mavericks-review-hub/src/mineplex/mavericks/review/Hub.java b/Plugins/mavericks-review-hub/src/mineplex/mavericks/review/Hub.java index ebc01ac9c..4fbb830fa 100644 --- a/Plugins/mavericks-review-hub/src/mineplex/mavericks/review/Hub.java +++ b/Plugins/mavericks-review-hub/src/mineplex/mavericks/review/Hub.java @@ -138,7 +138,7 @@ public class Hub extends JavaPlugin RewardManager rewardManager = new RewardManager(_clientManager, _donationManager, inventoryManager, petManager, gadgetManager, statsManager); TreasureManager treasureManager = new TreasureManager(this, _clientManager, serverStatusManager, _donationManager, inventoryManager, petManager, gadgetManager, blockRestore, hologramManager, statsManager, rewardManager); CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, - mountManager, petManager, treasureManager, boosterManager); + mountManager, petManager, treasureManager, boosterManager, punish); cosmeticManager.setInterfaceSlot(7); cosmeticManager.disableTeamArmor(); diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java index 9b8256d80..db3fefddd 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java @@ -260,7 +260,7 @@ public class GemHunters extends JavaPlugin GadgetManager gadgetManager = new GadgetManager(this, clientManager, donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito, castleManager); ThankManager thankManager = new ThankManager(this, clientManager, donationManager); BoosterManager boosterManager = new BoosterManager(this, null, clientManager, donationManager, inventoryManager, thankManager); - CosmeticManager cosmeticManager = new CosmeticManager(this, clientManager, donationManager, inventoryManager, gadgetManager, mountManager, petManager, null, boosterManager); + CosmeticManager cosmeticManager = new CosmeticManager(this, clientManager, donationManager, inventoryManager, gadgetManager, mountManager, petManager, null, boosterManager, punish); cosmeticManager.setActive(false); cosmeticManager.setHideParticles(true); From fbd347ff41dd5b6509991c4f33d6208a676db892 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 01:40:46 -0400 Subject: [PATCH 15/34] Remove unnecessary packages --- .../mineplex/core/gadget/GadgetManager.java | 31 +++++++++---------- .../gadget/commands/LockInfusedCommand.java | 2 +- .../particle/{vampire => }/ParticleBlood.java | 2 +- .../{candycane => }/ParticleCandyCane.java | 2 +- .../{emerald => }/ParticleEmerald.java | 2 +- .../{wisdom => }/ParticleEnchant.java | 2 +- .../particle/{shadow => }/ParticleFoot.java | 2 +- .../{frostlord => }/ParticleFrostLord.java | 2 +- .../{cupidslove => }/ParticleHeart.java | 2 +- .../particle/{music => }/ParticleMusic.java | 2 +- .../{party => }/ParticlePartyTime.java | 2 +- .../{howlingwinds => }/ParticleRain.java | 2 +- .../particle/{titan => }/ParticleTitan.java | 2 +- .../{ => freedom}/ParticleAuraNiceness.java | 2 +- .../{ => freedom}/ParticleCanadian.java | 2 +- .../ParticleFreedomFireworks.java | 2 +- .../{ => freedom}/ParticleStarSpangled.java | 2 +- .../mineplex/core/gadget/set/SetCanadian.java | 6 +--- .../core/gadget/set/SetCandyCane.java | 2 +- .../core/gadget/set/SetCupidsLove.java | 2 +- .../mineplex/core/gadget/set/SetEmerald.java | 2 +- .../mineplex/core/gadget/set/SetFreedom.java | 3 +- .../core/gadget/set/SetFrostLord.java | 2 +- .../core/gadget/set/SetHowlingWinds.java | 2 +- .../mineplex/core/gadget/set/SetMusic.java | 2 +- .../mineplex/core/gadget/set/SetParty.java | 2 +- .../mineplex/core/gadget/set/SetShadow.java | 2 +- .../mineplex/core/gadget/set/SetTitan.java | 2 +- .../mineplex/core/gadget/set/SetVampire.java | 2 +- .../mineplex/core/gadget/set/SetWisdom.java | 2 +- .../mineplex/core/reward/RewardManager.java | 28 ++++++++--------- .../core/treasure/gui/TreasurePage.java | 8 ++--- 32 files changed, 62 insertions(+), 68 deletions(-) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{vampire => }/ParticleBlood.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{candycane => }/ParticleCandyCane.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{emerald => }/ParticleEmerald.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{wisdom => }/ParticleEnchant.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{shadow => }/ParticleFoot.java (98%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{frostlord => }/ParticleFrostLord.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{cupidslove => }/ParticleHeart.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{music => }/ParticleMusic.java (98%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{party => }/ParticlePartyTime.java (98%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{howlingwinds => }/ParticleRain.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{titan => }/ParticleTitan.java (98%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{ => freedom}/ParticleAuraNiceness.java (98%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{ => freedom}/ParticleCanadian.java (97%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{ => freedom}/ParticleFreedomFireworks.java (96%) rename Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/{ => freedom}/ParticleStarSpangled.java (97%) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 18afeb5f7..69e331174 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -10,16 +10,15 @@ import java.util.Set; import java.util.UUID; import java.util.function.Predicate; -import mineplex.core.common.util.banner.CountryFlag; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; import mineplex.core.gadget.gadgets.flag.FlagType; import mineplex.core.gadget.gadgets.morph.MorphBobRoss; -import mineplex.core.gadget.gadgets.particle.ParticleAuraNiceness; -import mineplex.core.gadget.gadgets.particle.ParticleCanadian; -import mineplex.core.gadget.gadgets.particle.ParticleFreedomFireworks; -import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleAuraNiceness; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedomFireworks; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled; import mineplex.core.gadget.set.SetCanadian; import mineplex.core.gadget.types.FlagGadget; import org.bukkit.Bukkit; @@ -196,19 +195,19 @@ import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal; import mineplex.core.gadget.gadgets.particle.ParticleWingsLove; import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie; import mineplex.core.gadget.gadgets.particle.ParticleYinYang; -import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane; -import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart; -import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald; +import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; +import mineplex.core.gadget.gadgets.particle.ParticleHeart; +import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; -import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord; -import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain; -import mineplex.core.gadget.gadgets.particle.music.ParticleMusic; -import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime; -import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot; +import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; +import mineplex.core.gadget.gadgets.particle.ParticleRain; +import mineplex.core.gadget.gadgets.particle.ParticleMusic; +import mineplex.core.gadget.gadgets.particle.ParticlePartyTime; +import mineplex.core.gadget.gadgets.particle.ParticleFoot; import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo; -import mineplex.core.gadget.gadgets.particle.titan.ParticleTitan; -import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood; -import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant; +import mineplex.core.gadget.gadgets.particle.ParticleTitan; +import mineplex.core.gadget.gadgets.particle.ParticleBlood; +import mineplex.core.gadget.gadgets.particle.ParticleEnchant; import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt; import mineplex.core.gadget.gadgets.taunts.EternalTaunt; import mineplex.core.gadget.gadgets.taunts.RainbowTaunt; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java index a91dcdb3e..d57b89228 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockInfusedCommand.java @@ -21,7 +21,7 @@ import mineplex.core.gadget.gadgets.item.ItemFreezeCannon; import mineplex.core.gadget.gadgets.item.ItemPartyPopper; import mineplex.core.gadget.gadgets.item.ItemSnowball; import mineplex.core.gadget.gadgets.morph.MorphSnowman; -import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord; +import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; import mineplex.core.gadget.types.Gadget; import mineplex.core.mount.Mount; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/vampire/ParticleBlood.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleBlood.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/vampire/ParticleBlood.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleBlood.java index a33078067..0c3c3546a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/vampire/ParticleBlood.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleBlood.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.vampire; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/candycane/ParticleCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/candycane/ParticleCandyCane.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java index 4d8b223fc..5f31b13fb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/candycane/ParticleCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.candycane; +package mineplex.core.gadget.gadgets.particle; import java.util.HashMap; import java.util.UUID; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/emerald/ParticleEmerald.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEmerald.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/emerald/ParticleEmerald.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEmerald.java index 417587dbb..f81361c66 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/emerald/ParticleEmerald.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEmerald.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.emerald; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/wisdom/ParticleEnchant.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEnchant.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/wisdom/ParticleEnchant.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEnchant.java index f8d734e74..706c32fbd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/wisdom/ParticleEnchant.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleEnchant.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.wisdom; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/shadow/ParticleFoot.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFoot.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/shadow/ParticleFoot.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFoot.java index 9c3b8be54..fd315fc04 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/shadow/ParticleFoot.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFoot.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.shadow; +package mineplex.core.gadget.gadgets.particle; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/frostlord/ParticleFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFrostLord.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/frostlord/ParticleFrostLord.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFrostLord.java index 62c1388b3..32f947e47 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/frostlord/ParticleFrostLord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFrostLord.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.frostlord; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Material; import org.bukkit.Sound; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/cupidslove/ParticleHeart.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/cupidslove/ParticleHeart.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java index dea6a85aa..ca008bc75 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/cupidslove/ParticleHeart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.cupidslove; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Material; import org.bukkit.entity.Player; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/music/ParticleMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleMusic.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/music/ParticleMusic.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleMusic.java index 04874fffc..e0bbb3537 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/music/ParticleMusic.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleMusic.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.music; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/party/ParticlePartyTime.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticlePartyTime.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/party/ParticlePartyTime.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticlePartyTime.java index 3aab6f928..a3944317c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/party/ParticlePartyTime.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticlePartyTime.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.party; +package mineplex.core.gadget.gadgets.particle; import java.util.Arrays; import java.util.Collections; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/howlingwinds/ParticleRain.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleRain.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/howlingwinds/ParticleRain.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleRain.java index f2c45007c..4311666c0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/howlingwinds/ParticleRain.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleRain.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.howlingwinds; +package mineplex.core.gadget.gadgets.particle; import java.util.ArrayList; import java.util.List; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/titan/ParticleTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleTitan.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/titan/ParticleTitan.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleTitan.java index b5f02de23..7d062f713 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/titan/ParticleTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleTitan.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle.titan; +package mineplex.core.gadget.gadgets.particle; import org.bukkit.Location; import org.bukkit.Material; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java similarity index 98% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java index 39b20d946..8b72b935c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleAuraNiceness.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle; +package mineplex.core.gadget.gadgets.particle.freedom; import mineplex.core.arcadeevents.CoreGameStartEvent; import mineplex.core.arcadeevents.CoreGameStopEvent; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java index 10f87fe29..7984af254 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCanadian.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle; +package mineplex.core.gadget.gadgets.particle.freedom; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java similarity index 96% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java index 92721b705..4234a257b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleFreedomFireworks.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle; +package mineplex.core.gadget.gadgets.particle.freedom; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java similarity index 97% rename from Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java rename to Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java index ead0bc411..cf65cb0dd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleStarSpangled.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java @@ -1,4 +1,4 @@ -package mineplex.core.gadget.gadgets.particle; +package mineplex.core.gadget.gadgets.particle.freedom; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java index a295bb9da..0b18eca18 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCanadian.java @@ -1,14 +1,10 @@ package mineplex.core.gadget.set; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; -import mineplex.core.gadget.gadgets.death.DeathFreedom; import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; -import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; -import mineplex.core.gadget.gadgets.particle.ParticleCanadian; -import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian; import mineplex.core.gadget.types.GadgetSet; public class SetCanadian extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java index 9a2d9ce75..c9b059480 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCandyCane.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCandyCane; import mineplex.core.gadget.gadgets.death.DeathCandyCane; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCandyCane; -import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane; +import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; import mineplex.core.gadget.types.GadgetSet; public class SetCandyCane extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java index 47f1552f7..dca2f191c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetCupidsLove.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailCupid; import mineplex.core.gadget.gadgets.death.DeathCupidsBrokenHeart; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpCupidsWings; -import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart; +import mineplex.core.gadget.gadgets.particle.ParticleHeart; import mineplex.core.gadget.types.GadgetSet; public class SetCupidsLove extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java index 740174dba..26df2fd6f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetEmerald.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEmerald; import mineplex.core.gadget.gadgets.death.DeathEmerald; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEmerald; -import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald; +import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.types.GadgetSet; public class SetEmerald extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java index e8c300adf..a64e2caf3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFreedom.java @@ -4,8 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFreedom; import mineplex.core.gadget.gadgets.death.DeathFreedom; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFreedom; -import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; -import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled; import mineplex.core.gadget.types.GadgetSet; public class SetFreedom extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java index 6050a0b00..311600e5e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetFrostLord.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailFrostLord; import mineplex.core.gadget.gadgets.death.DeathFrostLord; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFrostLord; -import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord; +import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; import mineplex.core.gadget.types.GadgetSet; public class SetFrostLord extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java index 672f49bdc..668503111 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetHowlingWinds.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailStorm; import mineplex.core.gadget.gadgets.death.DeathStorm; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpStorm; -import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain; +import mineplex.core.gadget.gadgets.particle.ParticleRain; import mineplex.core.gadget.types.GadgetSet; public class SetHowlingWinds extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java index fdd47eacd..50eef82a0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetMusic.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailMusic; import mineplex.core.gadget.gadgets.death.DeathMusic; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMusic; -import mineplex.core.gadget.gadgets.particle.music.ParticleMusic; +import mineplex.core.gadget.gadgets.particle.ParticleMusic; import mineplex.core.gadget.types.GadgetSet; public class SetMusic extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java index 0b99f9f2e..f22ce959e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetParty.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailConfetti; import mineplex.core.gadget.gadgets.death.DeathPinataBurst; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpFirecracker; -import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime; +import mineplex.core.gadget.gadgets.particle.ParticlePartyTime; import mineplex.core.gadget.types.GadgetSet; public class SetParty extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java index 1d5fad5dd..80b751d7d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetShadow.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailShadow; import mineplex.core.gadget.gadgets.death.DeathShadow; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpShadow; -import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot; +import mineplex.core.gadget.gadgets.particle.ParticleFoot; import mineplex.core.gadget.types.GadgetSet; public class SetShadow extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java index 0d333818d..360d86270 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetTitan.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailTitan; import mineplex.core.gadget.gadgets.death.DeathTitan; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpTitan; -import mineplex.core.gadget.gadgets.particle.titan.ParticleTitan; +import mineplex.core.gadget.gadgets.particle.ParticleTitan; import mineplex.core.gadget.types.GadgetSet; public class SetTitan extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java index 7ec9b7f7a..1a5541085 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetVampire.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailBlood; import mineplex.core.gadget.gadgets.death.DeathBlood; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpBlood; -import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood; +import mineplex.core.gadget.gadgets.particle.ParticleBlood; import mineplex.core.gadget.types.GadgetSet; public class SetVampire extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java index 870b70d3f..5bbae55da 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/set/SetWisdom.java @@ -4,7 +4,7 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailEnchant; import mineplex.core.gadget.gadgets.death.DeathEnchant; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpEnchant; -import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant; +import mineplex.core.gadget.gadgets.particle.ParticleEnchant; import mineplex.core.gadget.types.GadgetSet; public class SetWisdom extends GadgetSet diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java index eabf8e7e4..783e16317 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java @@ -9,10 +9,10 @@ import mineplex.core.gadget.gadgets.arrowtrail.ArrowTrailRedWhite; import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; import mineplex.core.gadget.gadgets.flag.FlagType; -import mineplex.core.gadget.gadgets.particle.ParticleAuraNiceness; -import mineplex.core.gadget.gadgets.particle.ParticleCanadian; -import mineplex.core.gadget.gadgets.particle.ParticleFreedomFireworks; -import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleAuraNiceness; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedomFireworks; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; @@ -124,18 +124,18 @@ import mineplex.core.gadget.gadgets.particle.ParticleWingsInfernal; import mineplex.core.gadget.gadgets.particle.ParticleWingsLove; import mineplex.core.gadget.gadgets.particle.ParticleWingsPixie; import mineplex.core.gadget.gadgets.particle.ParticleYinYang; -import mineplex.core.gadget.gadgets.particle.candycane.ParticleCandyCane; -import mineplex.core.gadget.gadgets.particle.cupidslove.ParticleHeart; -import mineplex.core.gadget.gadgets.particle.emerald.ParticleEmerald; +import mineplex.core.gadget.gadgets.particle.ParticleCandyCane; +import mineplex.core.gadget.gadgets.particle.ParticleHeart; +import mineplex.core.gadget.gadgets.particle.ParticleEmerald; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedom; -import mineplex.core.gadget.gadgets.particle.frostlord.ParticleFrostLord; -import mineplex.core.gadget.gadgets.particle.howlingwinds.ParticleRain; -import mineplex.core.gadget.gadgets.particle.music.ParticleMusic; -import mineplex.core.gadget.gadgets.particle.party.ParticlePartyTime; -import mineplex.core.gadget.gadgets.particle.shadow.ParticleFoot; +import mineplex.core.gadget.gadgets.particle.ParticleFrostLord; +import mineplex.core.gadget.gadgets.particle.ParticleRain; +import mineplex.core.gadget.gadgets.particle.ParticleMusic; +import mineplex.core.gadget.gadgets.particle.ParticlePartyTime; +import mineplex.core.gadget.gadgets.particle.ParticleFoot; import mineplex.core.gadget.gadgets.particle.spring.ParticleSpringHalo; -import mineplex.core.gadget.gadgets.particle.vampire.ParticleBlood; -import mineplex.core.gadget.gadgets.particle.wisdom.ParticleEnchant; +import mineplex.core.gadget.gadgets.particle.ParticleBlood; +import mineplex.core.gadget.gadgets.particle.ParticleEnchant; import mineplex.core.gadget.gadgets.taunts.BlowAKissTaunt; import mineplex.core.gadget.gadgets.taunts.RainbowTaunt; import mineplex.core.gadget.gadgets.wineffect.WinEffectBabyChicken; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java index de56e4730..6c79d08c8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java @@ -9,10 +9,10 @@ import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; import mineplex.core.gadget.gadgets.flag.FlagType; import mineplex.core.gadget.gadgets.hat.HatType; -import mineplex.core.gadget.gadgets.particle.ParticleAuraNiceness; -import mineplex.core.gadget.gadgets.particle.ParticleCanadian; -import mineplex.core.gadget.gadgets.particle.ParticleFreedomFireworks; -import mineplex.core.gadget.gadgets.particle.ParticleStarSpangled; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleAuraNiceness; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedomFireworks; +import mineplex.core.gadget.gadgets.particle.freedom.ParticleStarSpangled; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; From c7e4f4bd4ddefcefbdcf55ba96ba5b86f6e1c025 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 02:02:57 -0400 Subject: [PATCH 16/34] Clean up and add comments --- .../core/cosmetic/CosmeticManager.java | 1 - .../core/cosmetic/ui/page/CostumePage.java | 3 -- .../core/cosmetic/ui/page/FlagPage.java | 4 -- .../core/cosmetic/ui/page/GadgetPage.java | 29 ------------- .../mineplex/core/cosmetic/ui/page/Menu.java | 7 +--- .../core/cosmetic/ui/page/MusicPage.java | 3 -- .../arrowtrail/ArrowTrailRedWhite.java | 11 +++-- .../gadget/gadgets/death/DeathMapleLeaf.java | 9 ++-- .../gadgets/doublejump/DoubleJumpMaple.java | 4 -- .../core/gadget/gadgets/flag/FlagType.java | 3 +- .../freedom/ParticleAuraNiceness.java | 42 +++++++++++++------ .../particle/freedom/ParticleCanadian.java | 12 +++--- .../freedom/ParticleFreedomFireworks.java | 10 +++-- .../core/gadget/types/FlagGadget.java | 13 ++---- .../src/mineplex/core/reward/Reward.java | 3 -- .../src/mineplex/core/reward/RewardData.java | 3 -- .../mineplex/core/reward/RewardRarity.java | 3 -- .../treasure/event/TreasureFinishEvent.java | 2 +- .../treasure/event/TreasurePreStartEvent.java | 2 +- .../treasure/event/TreasureStartEvent.java | 3 ++ 20 files changed, 64 insertions(+), 103 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java index 9f0552d86..7cb686de7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/CosmeticManager.java @@ -1,6 +1,5 @@ package mineplex.core.cosmetic; -import mineplex.core.chat.Chat; import mineplex.core.punish.Punish; import org.bukkit.Bukkit; import org.bukkit.ChatColor; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java index 73af59a89..c1a606358 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/CostumePage.java @@ -22,9 +22,6 @@ import mineplex.core.gadget.types.OutfitGadget; import mineplex.core.shop.item.IButton; import mineplex.core.shop.item.ShopItem; -/** - * Created by shaun on 14-09-15. - */ public class CostumePage extends GadgetPage { public CostumePage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java index 1a2b98635..8de6f4cdf 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/FlagPage.java @@ -15,10 +15,6 @@ import org.bukkit.event.inventory.ClickType; import java.util.List; -/** - * @author J Teissler - * @date 6/26/17 - */ public class FlagPage extends GadgetPage { public FlagPage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java index 12523a911..03efda5ce 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/GadgetPage.java @@ -8,12 +8,10 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; -import mineplex.core.gadget.types.FlagGadget; 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; @@ -22,7 +20,6 @@ import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilText; -import mineplex.core.common.util.banner.CountryFlag; import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.cosmetic.ui.button.GadgetButton; @@ -371,19 +368,6 @@ public class GadgetPage extends ShopPageBase meta.setLore(itemLore); gadgetItemStack.setItemMeta(meta); - /*if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH - || gadget.getGadgetType() == GadgetType.PARTICLE || gadget.getGadgetType() == GadgetType.DOUBLE_JUMP) - { - if (gadget.getCost(GlobalCurrency.TREASURE_SHARD) == -8) - { - gadgetItemStack = CountryFlag.USA.getBanner(); - BannerMeta bannerMeta = (BannerMeta) gadgetItemStack.getItemMeta(); - bannerMeta.setDisplayName(C.cGreen + C.Bold + gadget.getName()); - bannerMeta.setLore(meta.getLore()); - gadgetItemStack.setItemMeta(bannerMeta); - } - }*/ - addButton(slot, new ShopItem(gadgetItemStack, false, false).hideInfo(), new DeactivateGadgetButton(gadget, this)); } else @@ -394,19 +378,6 @@ public class GadgetPage extends ShopPageBase meta.setLore(itemLore); gadgetItemStack.setItemMeta(meta); - /*if (gadget.getGadgetType() == GadgetType.ARROW_TRAIL || gadget.getGadgetType() == GadgetType.DEATH - || gadget.getGadgetType() == GadgetType.PARTICLE || gadget.getGadgetType() == GadgetType.DOUBLE_JUMP) - { - if (gadget.getCost(GlobalCurrency.TREASURE_SHARD) == -8) - { - gadgetItemStack = CountryFlag.USA.getBanner(); - BannerMeta bannerMeta = (BannerMeta) gadgetItemStack.getItemMeta(); - bannerMeta.setDisplayName(C.cGreen + C.Bold + gadget.getName()); - bannerMeta.setLore(meta.getLore()); - gadgetItemStack.setItemMeta(bannerMeta); - } - }*/ - /*if (gadget instanceof MorphStray) { gadgetItemStack = UtilItem.getVersionSpecificItem(_player, UtilPlayer.PlayerVersion._1_9, gadgetItemStack); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java index 084025a09..a3275ea39 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java @@ -1,7 +1,6 @@ package mineplex.core.cosmetic.ui.page; import java.util.ArrayList; -import java.util.Arrays; import java.util.EnumMap; import java.util.List; import java.util.Map; @@ -9,9 +8,7 @@ import java.util.Map; import mineplex.core.common.util.banner.CountryFlag; import mineplex.core.cosmetic.ui.button.open.OpenFlags; import mineplex.core.itemstack.ItemBuilder; -import org.bukkit.DyeColor; import org.bukkit.Material; -import org.bukkit.block.Banner; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; @@ -20,7 +17,6 @@ import mineplex.core.common.currency.GlobalCurrency; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilText; -import mineplex.core.common.util.UtilUI; import mineplex.core.cosmetic.CosmeticManager; import mineplex.core.cosmetic.ui.CosmeticShop; import mineplex.core.cosmetic.ui.button.open.OpenArrowTrails; @@ -49,7 +45,6 @@ import mineplex.core.shop.page.ShopPageBase; import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BannerMeta; -import org.bukkit.inventory.meta.ItemMeta; public class Menu extends ShopPageBase { @@ -253,6 +248,8 @@ public class Menu extends ShopPageBase lore = getLore(ownedCount.get(type), maxCount.get(type), "Show off your country's flag!", VISIBILITY_HUB, enabled.get(type)); addButton(flagSlot, new ShopItem(Material.BANNER, "Flags", lore, 1, false), new OpenFlags(this, enabled.get(type))); if (enabled.containsKey(type)) addGlow(flagSlot); + + // Copy over banner design BannerMeta banner = (BannerMeta) CountryFlag.MINEPLEX.getBanner().getItemMeta(); BannerMeta meta = ((BannerMeta) getItem(flagSlot).getItemMeta()); meta.setBaseColor(banner.getBaseColor()); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java index 97f32d027..49fa65cf7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/MusicPage.java @@ -14,9 +14,6 @@ import mineplex.core.gadget.types.GadgetType; import mineplex.core.shop.item.ShopItem; import mineplex.core.shop.item.IButton; -/** - * Created by shaun on 14-09-15. - */ public class MusicPage extends GadgetPage { public MusicPage(CosmeticManager plugin, CosmeticShop shop, CoreClientManager clientManager, DonationManager donationManager, String name, Player player) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java index e9a3c19e1..37934c81f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailRedWhite.java @@ -10,14 +10,14 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.types.ArrowEffectGadget; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.block.banner.Pattern; import org.bukkit.entity.Arrow; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.BannerMeta; import org.bukkit.util.Vector; -import java.awt.*; +import java.awt.Color; +/** + * Trails a red and white double helix behind the arrow. + */ public class ArrowTrailRedWhite extends ArrowEffectGadget { public ArrowTrailRedWhite(GadgetManager manager) @@ -72,7 +72,6 @@ public class ArrowTrailRedWhite extends ArrowEffectGadget @Override public void doHitEffect(Arrow arrow) { - //UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, arrow.getLocation(), 0.35f, 0.35f, 0.35f, 1f, 15, UtilParticle.ViewDist.LONGER); - UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, arrow.getLocation(), 0, 0, 0, 0, 3, UtilParticle.ViewDist.LONGER); + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.EXPLODE, arrow.getLocation(), 0, 0, 0, 0, 3, UtilParticle.ViewDist.NORMAL); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java index b1a0e9955..194a2b6d4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java @@ -5,7 +5,6 @@ import mineplex.core.common.shape.ShapeWings; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilParticle; -import mineplex.core.common.util.UtilShapes; import mineplex.core.common.util.UtilText; import mineplex.core.common.util.banner.CountryFlag; import mineplex.core.gadget.GadgetManager; @@ -16,11 +15,13 @@ import org.bukkit.entity.Player; import org.bukkit.util.Vector; /** - * @author J Teissler - * @date 6/26/17 + * Displays a giant maple leaf at the point of death. */ public class DeathMapleLeaf extends DeathEffectGadget { + /** height off the ground of the leaf */ + private static final double HEIGHT = 3; + private final ShapeWings _leafOuter = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1.0, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); private final ShapeWings _leafInner = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0.7, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); @@ -37,7 +38,7 @@ public class DeathMapleLeaf extends DeathEffectGadget public void onBlood(Player player, BloodEvent event) { event.setCancelled(true); - Location loc = player.getLocation().add(0, 3, 0); + Location loc = player.getLocation().add(0, HEIGHT, 0); _leafOuter.display(loc); _leafInner.display(loc); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java index 1b1396463..4b9d08338 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpMaple.java @@ -2,8 +2,6 @@ package mineplex.core.gadget.gadgets.doublejump; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; -import mineplex.core.common.util.UtilAlg; -import mineplex.core.common.util.UtilColor; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilText; @@ -12,12 +10,10 @@ import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.types.DoubleJumpEffectGadget; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import org.bukkit.Color; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; -import org.bukkit.util.Vector; import java.util.HashMap; import java.util.Iterator; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java index 7e2c48e28..aec958dd9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/flag/FlagType.java @@ -3,8 +3,7 @@ package mineplex.core.gadget.gadgets.flag; import mineplex.core.common.util.banner.CountryFlag; /** - * @author J Teissler - * @date 6/27/17 + * Cosmetic flags representing countries. */ public enum FlagType { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java index 8b72b935c..99a22fff4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java @@ -2,14 +2,12 @@ package mineplex.core.gadget.gadgets.particle.freedom; import mineplex.core.arcadeevents.CoreGameStartEvent; import mineplex.core.arcadeevents.CoreGameStopEvent; -import mineplex.core.blockrestore.BlockRestore; import mineplex.core.common.util.C; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilParticle; import mineplex.core.common.util.UtilShapes; -import mineplex.core.common.util.UtilSound; import mineplex.core.common.util.UtilText; import mineplex.core.common.util.banner.CountryFlag; import mineplex.core.gadget.GadgetManager; @@ -18,19 +16,14 @@ import mineplex.core.treasure.event.TreasureFinishEvent; import mineplex.core.treasure.event.TreasureStartEvent; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; -import org.bukkit.event.block.BlockFadeEvent; import org.bukkit.event.block.BlockPhysicsEvent; -import org.bukkit.plugin.java.JavaPlugin; -import org.bukkit.util.Vector; import java.awt.Color; import java.util.HashMap; @@ -43,24 +36,38 @@ import java.util.concurrent.ThreadLocalRandom; import java.util.stream.Collectors; /** - * @author J Teissler - * @date 6/26/17 + * Places flowers around the player with poofs of red and white */ public class ParticleAuraNiceness extends ParticleGadget { /** Radius within which flowers not allowed near treasure chests */ private static final int TREASURE_RADIUS = 4; + /** Horizontal offset for particle spawns */ private static final double H_FIELD = 0.5; + + /** Vertical offset for particle spawns */ private static final double V_FIELD = 0.35; - private static final int ROSE_PROBABILITY = 30; + + /** How likely a flower is to be spawned (1/n) */ + private static final int ROSE_PROBABILITY = 40; + + /** Radius in which flowers are spawned */ private static final double ROSE_RADIUS = 2.5; + /** How many particles accompany each flower spawn */ + private static final int PARTICLE_COUNT = 20; + + /** List of blocks that have flowers in them */ private final Set _blocks = new HashSet<>(); + /** Milliseconds for which flowers persist */ + private final long DURATION = 5000; + /** Locations at which treasure is currently being opened */ private final Map _openingTreasure = new HashMap<>(); + /** Whether flowers can be spawned in addition to particles */ private boolean _enabled = true; public ParticleAuraNiceness(GadgetManager manager) @@ -102,10 +109,10 @@ public class ParticleAuraNiceness extends ParticleGadget if (_enabled) { _blocks.add(b); - Manager.getBlockRestore().add(b, Material.RED_ROSE.getId(), (byte) 3, 5000); + Manager.getBlockRestore().add(b, Material.RED_ROSE.getId(), (byte) 3, DURATION); } - for (int i = 0; i < 20; ++i) + for (int i = 0; i < PARTICLE_COUNT; ++i) { UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 4, 4, 4), 0, UtilParticle.ViewDist.NORMAL); UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 4, 4, 4), 0, UtilParticle.ViewDist.NORMAL); @@ -122,7 +129,7 @@ public class ParticleAuraNiceness extends ParticleGadget { it.remove(); Location loc = b.getLocation().add(H_FIELD, V_FIELD, H_FIELD); - for (int i = 0; i < 10; ++i) + for (int i = 0; i < PARTICLE_COUNT / 2; ++i) { UtilParticle.playColoredParticleToAll(Color.RED, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 6, 6, 6), 0, UtilParticle.ViewDist.NORMAL); UtilParticle.playColoredParticleToAll(Color.WHITE, UtilParticle.ParticleType.RED_DUST, UtilMath.gauss(loc, 6, 6, 6), 0, UtilParticle.ViewDist.NORMAL); @@ -131,6 +138,9 @@ public class ParticleAuraNiceness extends ParticleGadget } } + /** + * Stop flowers from popping off of blocks + */ @EventHandler public void onBlockFade(BlockPhysicsEvent event) { @@ -162,12 +172,18 @@ public class ParticleAuraNiceness extends ParticleGadget } } + /** + * Disable flowers on game start + */ @EventHandler public void onGameStart(CoreGameStartEvent event) { _enabled = false; } + /** + * Enable flowers on game end + */ @EventHandler public void onGameEnd(CoreGameStopEvent event) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java index 7984af254..c9efa6b5c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java @@ -18,13 +18,17 @@ import org.bukkit.inventory.meta.BannerMeta; import java.awt.Color; /** - * @author J Teissler - * @date 6/26/17 + * Leaves a trail behind the player with the colors of the Canadian flag. */ public class ParticleCanadian extends ParticleGadget { + /** # of lines of particles */ private static final int STRAND_COUNT = 9; + + /** How far apart each line of particles is */ private static final double STRAND_SPACING = 0.124; + + /** How far off the floor the particles begin */ private static final double DISTANCE_FROM_FLOOR = 0.43; public ParticleCanadian(GadgetManager manager) @@ -33,9 +37,7 @@ public class ParticleCanadian extends ParticleGadget UtilText.splitLineToArray(C.cGray + "Lead the way to freedom!", LineFormat.LORE), -8, Material.WOOL, (byte) 0); - ItemStack stack = CountryFlag.CANADA.getBanner(); - System.out.println(((BannerMeta)stack.getItemMeta()).getBaseColor().getColor().toString()); - setDisplayItem(stack); + setDisplayItem(CountryFlag.CANADA.getBanner()); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java index 4234a257b..a7a18702e 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleFreedomFireworks.java @@ -13,22 +13,24 @@ import mineplex.core.updater.event.UpdateEvent; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.Player; -import org.bukkit.util.Vector; import java.util.concurrent.ThreadLocalRandom; /** - * @author J Teissler - * @date 6/26/17 + * Small fireworks which explode around the player */ public class ParticleFreedomFireworks extends ParticleGadget { + /** Block types to source for particles */ private static final Material[] BLOCKTYPES = { Material.REDSTONE_BLOCK, Material.LAPIS_BLOCK, Material.QUARTZ_BLOCK }; + /** Amount of particles for each firework */ + private static final int PARTICLE_COUNT = 20; + public ParticleFreedomFireworks(GadgetManager manager) { super(manager, "Freedom Fireworks", @@ -49,7 +51,7 @@ public class ParticleFreedomFireworks extends ParticleGadget String particle = UtilParticle.ParticleType.BLOCK_CRACK.getParticle(BLOCKTYPES[ThreadLocalRandom.current().nextInt(0, BLOCKTYPES.length)], 0); Location location = UtilMath.gauss(player.getEyeLocation(), 1, 1, 1); - for (int i = 0; i < 20; ++i) + for (int i = 0; i < PARTICLE_COUNT; ++i) { UtilParticle.PlayParticleToAll(particle, location, null, 3.0f, 1, UtilParticle.ViewDist.NORMAL); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java index d28b45a17..7b7d71883 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/FlagGadget.java @@ -5,26 +5,18 @@ import mineplex.core.common.util.F; import mineplex.core.common.util.LineFormat; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilText; -import mineplex.core.common.util.banner.CountryFlag; -import mineplex.core.disguise.disguises.DisguiseSkeleton; import mineplex.core.gadget.GadgetManager; import mineplex.core.gadget.gadgets.flag.FlagType; -import mineplex.core.gadget.gadgets.morph.managers.UtilMorph; -import mineplex.core.itemstack.ItemBuilder; -import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.entity.Player; -import org.bukkit.entity.Skeleton; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.inventory.meta.LeatherArmorMeta; /** - * @author J Teissler - * @date 6/26/17 + * Flags which sit upon players head. */ public class FlagGadget extends Gadget { @@ -88,6 +80,9 @@ public class FlagGadget extends Gadget disable(event.getEntity()); } + /** + * @return The specific gadget which this represents. + */ public FlagType getFlagType() { return _flag; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java index ef209276e..281374325 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java @@ -6,9 +6,6 @@ import org.bukkit.entity.Player; import mineplex.core.common.util.Callback; -/** - * Created by Shaun on 9/2/2014. - */ public abstract class Reward { protected static final Random RANDOM = new Random(); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardData.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardData.java index 8179dbb98..6f3acd00b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardData.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardData.java @@ -2,9 +2,6 @@ package mineplex.core.reward; import org.bukkit.inventory.ItemStack; -/** - * Created by shaun on 14-09-18. - */ public class RewardData { private final String _header; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java index 759769234..eff019430 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRarity.java @@ -7,9 +7,6 @@ import org.bukkit.inventory.meta.ItemMeta; import mineplex.core.common.util.C; import static mineplex.core.common.util.C.*; -/** - * Created by Shaun on 9/2/2014. - */ public enum RewardRarity { /** diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureFinishEvent.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureFinishEvent.java index ca001e6a5..15a85c4dd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureFinishEvent.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureFinishEvent.java @@ -7,7 +7,7 @@ import org.bukkit.event.HandlerList; import mineplex.core.treasure.Treasure; /** - * Created by shaun on 14-09-12. + * Called once a player has finished with the treasure opening process. */ public class TreasureFinishEvent extends Event { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasurePreStartEvent.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasurePreStartEvent.java index d384c61db..29355cfd1 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasurePreStartEvent.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasurePreStartEvent.java @@ -7,7 +7,7 @@ import org.bukkit.event.Event; import org.bukkit.event.HandlerList; /** - * Created by shaun on 14-09-12. + * Called when a player selects a chest to open. */ public class TreasurePreStartEvent extends Event implements Cancellable { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureStartEvent.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureStartEvent.java index 70c891f52..37d59dc74 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureStartEvent.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/event/TreasureStartEvent.java @@ -10,6 +10,9 @@ import org.bukkit.event.HandlerList; import mineplex.core.reward.Reward; import mineplex.core.treasure.Treasure; +/** + * Called when a player is able to begin opening chests. + */ public class TreasureStartEvent extends Event { private static final HandlerList handlers = new HandlerList(); From 60f4511a79a93a45625a0c32a8b70e8e73ef574b Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:31:39 -0400 Subject: [PATCH 17/34] Swap cosmetic menu positions of items --- .../src/mineplex/core/cosmetic/ui/page/Menu.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java index a3275ea39..9814c081b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java @@ -74,12 +74,12 @@ public class Menu extends ShopPageBase ShopItem shards = new ShopItem(Material.PRISMARINE_SHARD, C.cAqua + C.Bold + treasureShards + " Treasure Shards", shardLore.toArray(new String[0]), 0, false); - int deathSlot = 1; + int deathSlot = 19; int jumpSlot = 28; - int particleSlot = 10; + int particleSlot = 1; int winEffectSlot = 13; int shardSlot = 22; - int arrowSlot = 19; + int arrowSlot = 10; int tauntSlot = 31; int gameModifierSlot = 21; int kitSelectorSlot = 23; @@ -95,7 +95,7 @@ public class Menu extends ShopPageBase addItem(shardSlot, shards); - ItemStack pane = new ItemBuilder(Material.STAINED_GLASS_PANE).setData((byte)15).setTitle("").build(); + ItemStack pane = new ItemBuilder(Material.STAINED_GLASS_PANE).setData((byte)15).setTitle(C.cBlack).build(); for (int i = 0; i <= 45; i += 9) addItem(i, pane.clone()); for (int i = 8; i <= 53; i += 9) addItem(i, pane.clone()); for (int i = 37; i <= 43; ++i) addItem(i, pane.clone()); From 7f729ca5866c6cbfbc4ad0e9164e721edd7648f0 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:31:48 -0400 Subject: [PATCH 18/34] Add cosmetics unlock command for all players --- .../commands/UnlockCosmeticsCommand.java | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java index 43e1a4756..69e6f863d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java @@ -41,13 +41,30 @@ public class UnlockCosmeticsCommand extends CommandBase { addCosmetics(null, caller); } - else if (args.length == 1) + else if (args.length >= 1) { - Player player = Bukkit.getPlayer(args[0]); - if (player != null) + if (args[0].equalsIgnoreCase("all")) { - addCosmetics(null, player); - UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!")); + for (Player player : UtilServer.getPlayers()) + { + if (player != null) + { + addCosmetics(null, player); + UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!")); + } + } + } + else + { + for (int i = 0; i < args.length; ++i) + { + Player player = Bukkit.getPlayer(args[i]); + if (player != null) + { + addCosmetics(null, player); + UtilPlayer.message(caller, F.main("Unlock Cosmetics", "Added all the cosmetics to " + F.name(player.getName()) + "!")); + } + } } } } From ea7475b95018c90cfb4b20a96fa8f3f01ac1fcb0 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:32:00 -0400 Subject: [PATCH 19/34] Add white to maple leaf death effect --- .../src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java index 194a2b6d4..3cfeeb034 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathMapleLeaf.java @@ -22,7 +22,7 @@ public class DeathMapleLeaf extends DeathEffectGadget /** height off the ground of the leaf */ private static final double HEIGHT = 3; - private final ShapeWings _leafOuter = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1.0, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); + private final ShapeWings _leafOuter = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(1.0, 1.0, 1.0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); private final ShapeWings _leafInner = new ShapeWings(UtilParticle.ParticleType.RED_DUST.particleName, new Vector(0.7, 0, 0), 1, 0, false, 0, ShapeWings.MAPLE_LEAF); public DeathMapleLeaf(GadgetManager manager) From 37996e6901424eeb64b89c0ec879ae43feddf4fd Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:32:12 -0400 Subject: [PATCH 20/34] Remove green from candy cane cosmetics --- .../core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java | 2 +- .../core/gadget/gadgets/particle/ParticleCandyCane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java index 62f3ad6c4..209da4b7c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCandyCane.java @@ -30,7 +30,7 @@ public class DoubleJumpCandyCane extends DoubleJumpEffectGadget Location loc = player.getLocation(); UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 1), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); - UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 2), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); + UtilParticle.PlayParticleToAll(ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, 0, 0, 0, 0.15f, 100, ViewDist.NORMAL); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java index 5f31b13fb..e9e572f19 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCandyCane.java @@ -63,7 +63,7 @@ public class ParticleCandyCane extends ParticleGadget UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 1), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); - UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 2), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); + UtilParticle.playParticleFor(player, UtilParticle.ParticleType.ICON_CRACK.getParticle(Material.INK_SACK, 15), loc, w, y, w, 0, a, UtilParticle.ViewDist.NORMAL); } @EventHandler From 1899272a10aefc61b075f54bedcbd4d423f12b40 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:32:19 -0400 Subject: [PATCH 21/34] Reduce coal fume particles --- .../core/gadget/gadgets/particle/ParticleCoalFumes.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCoalFumes.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCoalFumes.java index 236bc1e8a..651993fb9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCoalFumes.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleCoalFumes.java @@ -1,5 +1,6 @@ package mineplex.core.gadget.gadgets.particle; +import mineplex.core.common.util.UtilMath; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -27,7 +28,7 @@ public class ParticleCoalFumes extends ParticleGadget @Override public void playParticle(Player player, UpdateEvent event) { - if(event.getType() != UpdateType.TICK) return; + if(event.getType() != UpdateType.FASTER) return; float xz = 1; int amount = 5; @@ -39,6 +40,6 @@ public class ParticleCoalFumes extends ParticleGadget amount = 2; } - UtilParticle.playParticleFor(player, type, player.getLocation(), xz, 0, xz, 0, amount, ViewDist.NORMAL); + UtilParticle.playParticleFor(player, type, UtilMath.gauss(player.getLocation(), 2, 6, 2), xz, 0, xz, 0, amount, ViewDist.NORMAL); } } From 901d62c8e09061be23c29e9efb4ea0da204a9764 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:32:39 -0400 Subject: [PATCH 22/34] Distribute heart particles using a gaussian curve --- .../mineplex/core/gadget/gadgets/particle/ParticleHeart.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java index ca008bc75..c48b0ddb4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java @@ -1,5 +1,6 @@ package mineplex.core.gadget.gadgets.particle; +import mineplex.core.common.util.UtilMath; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -37,11 +38,11 @@ public class ParticleHeart extends ParticleGadget { if(getSet() == null || !getSet().isActive(player)) return; - UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1, 0), null, 0, 1, ViewDist.NORMAL); + UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1.2, 0), null, 0, 1, ViewDist.NORMAL); } else { - UtilParticle.playParticleFor(player, ParticleType.HEART, player.getLocation().add(0, 1, 0), 0.5f, 0.5f, 0.5f, 0, 1, ViewDist.NORMAL); + UtilParticle.playParticleFor(player, ParticleType.HEART, UtilMath.gauss(player.getLocation(), 1, 3, 1).add(0, 1.2, 0), null, 0, 1, ViewDist.NORMAL); } } From cfc223f52ac51bf9e4b8ecee5aca9f9de6a39d9d Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:32:52 -0400 Subject: [PATCH 23/34] Correctly handle taunt cooldowns --- .../gadget/gadgets/taunts/BlowAKissTaunt.java | 8 ++++++-- .../gadget/gadgets/taunts/EternalTaunt.java | 20 +++++++++++++------ .../gadget/gadgets/taunts/RainbowTaunt.java | 8 ++++++-- .../core/gadget/types/TauntGadget.java | 8 +++++--- 4 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/BlowAKissTaunt.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/BlowAKissTaunt.java index fdc5da288..c246b2975 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/BlowAKissTaunt.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/BlowAKissTaunt.java @@ -35,10 +35,12 @@ public class BlowAKissTaunt extends TauntGadget } @Override - public void onStart(Player player) + public boolean onStart(Player player) { if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics")) - return; + { + return false; + } HashSet ignore = new HashSet<>(); ignore.add(Material.AIR); @@ -46,6 +48,8 @@ public class BlowAKissTaunt extends TauntGadget BlowAKissEffect blowAKissEffect = new BlowAKissEffect(player, loc, this); blowAKissEffect.start(); + + return true; } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java index 1e0c943b7..59d3c5484 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java @@ -29,9 +29,7 @@ import mineplex.core.common.util.UtilText; import mineplex.core.disguise.disguises.DisguiseSkeleton; import mineplex.core.events.EnableArcadeSpawnEvent; import mineplex.core.gadget.GadgetManager; -import mineplex.core.gadget.gadgets.morph.managers.UtilMorph; import mineplex.core.gadget.types.TauntGadget; -import mineplex.core.game.GameDisplay; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; @@ -52,18 +50,21 @@ public class EternalTaunt extends TauntGadget C.cWhite + "Use /taunt in game to show how long you've been waiting.", C.cRed + "Cannot be used while in PvP!"}, LineFormat.LORE), -15, Material.WATCH, (byte) 0); + setCanPlayWithPvp(false); setPvpCooldown(PVP_COOLDOWN); setShouldPlay(true); setEventType(UpdateType.FAST); - addDisabledGames(GameDisplay.Smash, GameDisplay.SmashTeams, GameDisplay.SmashDomination); } @Override - public void onStart(Player player) + public boolean onStart(Player player) { if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics")) - return; + { + return false; + } + UtilFirework.playFirework(player.getLocation(), FireworkEffect.builder().with(FireworkEffect.Type.BALL_LARGE).withColor(Color.fromRGB(255, 175, 175)).withFade(Color.RED).build()); _clocks.put(player.getUniqueId(), new ArrayList<>()); @@ -73,16 +74,23 @@ public class EternalTaunt extends TauntGadget if (!Manager.getDisguiseManager().isDisguised(player)) { DisguiseSkeleton disguiseSkeleton = new DisguiseSkeleton(player); - UtilMorph.disguise(player, disguiseSkeleton, Manager); + disguiseSkeleton.setName(player.getName()); + disguiseSkeleton.setCustomNameVisible(true); + disguiseSkeleton.showArmor(); + Manager.getDisguiseManager().disguise(disguiseSkeleton); _disguises.put(player.getUniqueId(), disguiseSkeleton); } + + return true; } @Override public void onPlay(Player player) { if (!_clocks.containsKey(player.getUniqueId())) + { return; + } int i = getPlayerTicks(player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/RainbowTaunt.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/RainbowTaunt.java index de81b6a1b..6a49fe8c4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/RainbowTaunt.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/RainbowTaunt.java @@ -36,10 +36,12 @@ public class RainbowTaunt extends TauntGadget } @Override - public void onStart(Player player) + public boolean onStart(Player player) { if (!Recharge.Instance.use(player, getName(), COOLDOWN, true, false, "Cosmetics")) - return; + { + return false; + } Vector dir = player.getLocation().getDirection(); Vector sideA = dir.clone().setX(-dir.getZ()).setZ(dir.getX()); @@ -51,6 +53,8 @@ public class RainbowTaunt extends TauntGadget RainbowTauntEffect rainbowTauntEffect = new RainbowTauntEffect(start, Manager.getPlugin()); rainbowTauntEffect.setTargetLocation(new EffectLocation(end)); rainbowTauntEffect.start(); + + return true; } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/TauntGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/TauntGadget.java index 991a7425b..c0b11870d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/TauntGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/TauntGadget.java @@ -76,11 +76,13 @@ public abstract class TauntGadget extends Gadget public void start(Player player) { - onStart(player); - _ticksPerPlayer.put(player.getUniqueId(), 0); + if (onStart(player)) + { + _ticksPerPlayer.put(player.getUniqueId(), 0); + } } - public abstract void onStart(Player player); + public abstract boolean onStart(Player player); public void play(Player player) { From ca8041e5b72647eaa5567cb69dad3d1321a482fa Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:33:00 -0400 Subject: [PATCH 24/34] Change Legend Aura to green --- .../gadgets/particle/ParticleLegend.java | 59 ++++++++----------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java index 51911de42..8337efae4 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleLegend.java @@ -2,7 +2,6 @@ package mineplex.core.gadget.gadgets.particle; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilParticle; -import org.bukkit.Effect; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -19,32 +18,27 @@ import mineplex.core.inventory.ClientItem; import mineplex.core.inventory.data.Item; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import org.bukkit.util.Vector; import java.awt.Color; -import java.util.Random; public class ParticleLegend extends ParticleGadget { private static final double PI = Math.PI; private static final int BASE_PILLARS = 9; - private static final int PILLAR_VARIANCE = 7; - private static final int COLOR_VARIANCE = 5; + private static final int PILLAR_VARIANCE = 8; private static final int MOVING_PARTICLES = 8; private static final double VERTICAL_SPEED = 0.1; private static final double HEIGHT_VARIANCE = 0.8; private static final double ROTATIONAL_SPEED = .03; private static final double RADIAL_VARIANCE = 0.09; - private static final double DARK_PARTICLE_CHANCE = 0.5; private static final double BASE_RADIUS = 1.30; private static final double HEIGHT_MODIFIER_BASE = 0.1; private static final double HEIGHT_MODIFIER_MAX = 1.3; - private static final double HEIGHT_MODIFIER_INTERVAL = 0.2; + private static final double HEIGHT_MODIFIER_INTERVAL = 0.15; private static final Color[] SELECTABLE_COLORS = { - new Color(170, 100, 170), - new Color(50, 10, 60), - new Color(120, 10, 170), - new Color(65, 20, 80) + new Color(60, 170, 25), + new Color(33, 92, 13), + new Color(0, 0, 0) }; private final int _pillars = pillars(); @@ -58,7 +52,7 @@ public class ParticleLegend extends ParticleGadget public ParticleLegend(GadgetManager manager) { super(manager, "Legendary Aura", - UtilText.splitLineToArray(C.cGray + "Let the energy of the End protect you.", LineFormat.LORE), + UtilText.splitLineToArray(C.cGray + "Legendary energy protects you.", LineFormat.LORE), -1, Material.ENDER_PORTAL_FRAME, (byte)0); } @@ -73,12 +67,19 @@ public class ParticleLegend extends ParticleGadget if (Manager.isMoving(player)) { - Location loc = player.getLocation().add(0, 1.5, 0); for (int i = 0; i < MOVING_PARTICLES; i++) { - UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST, - UtilMath.gauss(loc, 8, 4, 8), 0, UtilParticle.ViewDist.NORMAL); + if (_colors[i].getGreen() == 0) + { + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.SMOKE, + UtilMath.gauss(player.getLocation(), 8, 4, 8), null, 0, 1, UtilParticle.ViewDist.NORMAL); + } + else + { + UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST, + UtilMath.gauss(player.getLocation(), 8, 4, 8), 0, UtilParticle.ViewDist.NORMAL); + } } } else @@ -96,12 +97,14 @@ public class ParticleLegend extends ParticleGadget for (double h = HEIGHT_MODIFIER_BASE; h <= HEIGHT_MODIFIER_MAX; h+= HEIGHT_MODIFIER_INTERVAL) { - UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST, - new Location(player.getWorld(), x, y + h, z), 0, UtilParticle.ViewDist.NORMAL); - - if (Math.random() < DARK_PARTICLE_CHANCE) + if (_colors[i].getGreen() == 0) { - UtilParticle.playColoredParticleToAll(Color.BLACK, UtilParticle.ParticleType.RED_DUST, + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.SMOKE, + new Location(player.getWorld(), x, y + h, z), null, 0, 1, UtilParticle.ViewDist.NORMAL); + } + else + { + UtilParticle.playColoredParticleToAll(_colors[i], UtilParticle.ParticleType.RED_DUST, new Location(player.getWorld(), x, y + h, z), 0, UtilParticle.ViewDist.NORMAL); } } @@ -175,23 +178,11 @@ public class ParticleLegend extends ParticleGadget private Color[] colors() { - Random random = new Random(); - Color[] array = new Color[_pillars]; for (int i = 0; i < _pillars; i++) { - Color color = SELECTABLE_COLORS[i % SELECTABLE_COLORS.length]; - - int r = color.getRed() + (int) (random.nextGaussian() * COLOR_VARIANCE); - int g = color.getGreen() + (int) (random.nextGaussian() * COLOR_VARIANCE); - int b = color.getBlue() + (int) (random.nextGaussian() * COLOR_VARIANCE); - - r = Math.min(255, Math.max(0, r)); - g = Math.min(255, Math.max(0, g)); - b = Math.min(255, Math.max(0, b)); - - array[i] = new Color(r, g, b); + array[i] = SELECTABLE_COLORS[i % SELECTABLE_COLORS.length]; } return array; @@ -213,7 +204,7 @@ public class ParticleLegend extends ParticleGadget return value; } - + @EventHandler public void legendOwner(PlayerJoinEvent event) { From 61b8ed971d23bddd64312d551b3d4ca5f9aa603a Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:33:18 -0400 Subject: [PATCH 25/34] Spawn trail particles behind player model --- .../core/gadget/gadgets/particle/freedom/ParticleCanadian.java | 3 ++- .../gadget/gadgets/particle/freedom/ParticleStarSpangled.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java index c9efa6b5c..4770908b9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleCanadian.java @@ -48,7 +48,8 @@ public class ParticleCanadian extends ParticleGadget return; } - Location center = player.getLocation().add(0, DISTANCE_FROM_FLOOR, 0); + Location center = player.getLocation().subtract(player.getLocation().getDirection().multiply(0.4)) + .subtract(0, 0.1, 0).add(0, DISTANCE_FROM_FLOOR, 0); if (Manager.isMoving(player)) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java index cf65cb0dd..7ad601f9a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleStarSpangled.java @@ -47,7 +47,8 @@ public class ParticleStarSpangled extends ParticleGadget return; } - Location center = player.getLocation().add(0, DISTANCE_FROM_FLOOR, 0); + Location center = player.getLocation().subtract(player.getLocation().getDirection().multiply(0.4)) + .subtract(0, 0.1, 0).add(0, DISTANCE_FROM_FLOOR, 0); if (Manager.isMoving(player)) { From 6abeadf0ea8707c89a45f037fdabe51416c47271 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:33:28 -0400 Subject: [PATCH 26/34] Align flowers correctly in spring leap --- .../core/gadget/gadgets/doublejump/DoubleJumpSpring.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java index c4d06c230..527b44b0f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpSpring.java @@ -38,7 +38,7 @@ public class DoubleJumpSpring extends DoubleJumpEffectGadget { for (int i = 50; i < 60; i++) { - Item sunflower = player.getWorld().dropItem(player.getLocation().add(0.5, 1.5, 0.5), ItemStackFactory.Instance.CreateStack(Material.DOUBLE_PLANT, (byte) 0, 1, " " + i)); + Item sunflower = player.getWorld().dropItem(player.getLocation().add(0.0, 0.2, 0.0), ItemStackFactory.Instance.CreateStack(Material.DOUBLE_PLANT, (byte) 0, 1, " " + i)); _items.add(sunflower); Vector vel = new Vector(Math.sin(i * 9/5d), 0, Math.cos(i * 9/5d)); From 2e23aae024af070e3a75d9c136ebac037c3a70b5 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:33:49 -0400 Subject: [PATCH 27/34] Change niceness aura to use red and white tulips --- .../gadget/gadgets/particle/freedom/ParticleAuraNiceness.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java index 99a22fff4..2e68270e5 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/freedom/ParticleAuraNiceness.java @@ -108,8 +108,10 @@ public class ParticleAuraNiceness extends ParticleGadget if (_enabled) { + byte data = ThreadLocalRandom.current().nextInt(2) == 0 ? (byte) 4 : 6; + _blocks.add(b); - Manager.getBlockRestore().add(b, Material.RED_ROSE.getId(), (byte) 3, DURATION); + Manager.getBlockRestore().add(b, Material.RED_ROSE.getId(), data, DURATION); } for (int i = 0; i < PARTICLE_COUNT; ++i) From 2ef463c8595b35c4421c002d7af6f04f7ec6e5c0 Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:36:59 -0400 Subject: [PATCH 28/34] Update disabled games for eternal taunt --- .../src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java index 59d3c5484..6e0a7e133 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/taunts/EternalTaunt.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.UUID; import mineplex.core.disguise.disguises.DisguiseBase; +import mineplex.core.game.GameDisplay; import org.bukkit.Bukkit; import org.bukkit.Color; import org.bukkit.FireworkEffect; @@ -55,6 +56,7 @@ public class EternalTaunt extends TauntGadget setPvpCooldown(PVP_COOLDOWN); setShouldPlay(true); setEventType(UpdateType.FAST); + addDisabledGames(GameDisplay.Smash, GameDisplay.SmashTeams, GameDisplay.SmashDomination, GameDisplay.SmashTraining); } @Override From f291d378962ecfef447977aeed43e043fa65b9ef Mon Sep 17 00:00:00 2001 From: Graphica Date: Wed, 28 Jun 2017 18:40:24 -0400 Subject: [PATCH 29/34] Stop outfits from taking off flags --- .../src/mineplex/core/gadget/types/OutfitGadget.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java index e5ab85cb3..78471a943 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/types/OutfitGadget.java @@ -60,7 +60,12 @@ public abstract class OutfitGadget extends Gadget public void applyArmor(Player player, boolean message) { Manager.removeGadgetType(player, GadgetType.MORPH, this); - Manager.removeGadgetType(player, GadgetType.FLAG, this); + + if (_slot == ArmorSlot.HELMET) + { + Manager.removeGadgetType(player, GadgetType.FLAG, this); + } + Manager.removeOutfit(player, _slot); _active.add(player); From b01cb0c2e909c42bea82f062b196314178a5c3ef Mon Sep 17 00:00:00 2001 From: Graphica Date: Sat, 1 Jul 2017 01:05:05 -0400 Subject: [PATCH 30/34] Add Revolutionary SkinData --- .../src/mineplex/core/common/skin/SkinData.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java index 6b7b7a675..fc34a0649 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/skin/SkinData.java @@ -80,6 +80,7 @@ public class SkinData public static final SkinData BIFF = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTc0NjEzMDQzNjYsInByb2ZpbGVJZCI6Ijg1MmE4YWNmNzMzNzQwZDc5OWVjYjA4ZmQ5OTY1MGI1IiwicHJvZmlsZU5hbWUiOiJLaW5nQ3JhenlfIiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS9mOWMyMTE3ZDY0ZWE0ZmUxMWZiY2NhZmE2YzU5YzhlZjY3NDVkZjVkMTZjM2QwMmI4NmI2OTlmZWJjNTA0OGI1In19fQ==", "mJMpEvQ4A02z0S/chgLm5bKrrrd+zmp7A0012AB7b3KlyIHoLKEDDz+ZJgJtvN6skOqed3P+yNVqkxitugXaZZP8Af9J+/TseHn+vOy6CTK5tykRSY3Zb8Zmw1kn36v/SARAVtDIHD53yuPgJayYSAbVB7aknj1Q8XBQGUmZRMRxWWxeD7rQTOwgRYI4YJeKFf4UL9i6zxvOJuHsOAouJ7scu7VohG8vgR77Js/Z8rSu8/aSG+O9AQdzP6h9ixYNFkkQOHm7DseK/5tsWKHM4FYBgjIDKt3ApQokSbhThzGB55BA1qjXZkfCoOb13y1nOMC8WoIL6Ees1qzxG3VloGx2WAZLh+Q+/irwrFDMxk1zeU5fIRuj1c/UIM2HKdxxWgoRdrZ8ww/Jrll6maiOBx7geMn/0aOUbJ2U7gkTif6RG6YNS5YN9ZQDLh72l/akJMxF3SlmuAPmLs2kBghQ6eD2YQKuxWR/Hf1yS1YXtogFVNsGnzC1nda7F48EGL3zI+kCajbDlAGQ32aRt0btbEQ+Gj575kir3Aa53qiZ0YOIYQlhgZdOsTN2NE2s8uuy/15Rgc6K3ydgEmSZfdqyMyW0Dy7pE5TfVL8DumKRVRXdOceT5WfnW7MyqSmdorP5ab1fw2wLOnAVzhJmW8oXXNSs77WJ1/PURclxOWB4IF8="); public static final SkinData CANADA_HAT = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTg2MDE5MDYwNzYsInByb2ZpbGVJZCI6IjdkYTJhYjNhOTNjYTQ4ZWU4MzA0OGFmYzNiODBlNjhlIiwicHJvZmlsZU5hbWUiOiJHb2xkYXBmZWwiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2M2MTExNTNmODdmMjZjMzRmOTdkODIxM2ZmOTk1ZGJlNjcyZWJkNGM0NjRkNGFkNzM5MWFlNDNjMWU3YTllIn19fQ", "QMw6e1FXl/Xrt+BbfPKsz3OHyOxL9CEPffS9grxRLD6gbLbMD84OT3+bge5V9lBFn9PPnTyID+WTF24qHj4ADTTgK94ykNedCEO6R1wS0FZKPI1UjwOxMhIG5ZeVr7+HxITgGU4Xz94IigBkvW//f2ZGelMvS0GLCrm4iCovEBMUzyYJ2dZ4xgzFSH6v+9efK4/SBAJaj8mHjXpDxU58/vskTGI3T9t5sWlZLXgId9vHcMj0GH3Un6yvUXiMkh38V/rAEM8/R8q08xUVyW0e2R38qWQV2+eKvsG8GmJmgkU/78wA9cKGZdrEz0pnr80eGNCbvXqQvC/czYhEhDapgxfndcHLX8q/Zk3I8msNr340E4ZrQL61Yl7KcVC1qEUQVu3cosq5A6ckXLGvv//HSwXVO8M9ThUbuEC8QjiS/fMFufnVa18lHrVulnfb/2KQ4yPsoCHK/zvGtRkWtD1sLOIfehN+sxCLiaz80ILBiwN0oHITfNHpJzoa4kF/OrxxCualp4Sv5o5TXBv7aWsO18v9ixb9o9CmJKKE8MUl5xmRVz4HQD4dyOfcwtPuxmfcYjJrxqBijdQMrcgLzqqMs+DUqcZZlxM7M5GaNUoEvL9tJNGpZaB2OrBw0DTk5wx15XfANCH4egx8X4+Iy2RUoFthHX3BsVazG7fjSiDnUtI="); public static final SkinData AMERICA_HAT = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTg2MDI3MjMyODgsInByb2ZpbGVJZCI6IjNlMjZiMDk3MWFjZDRjNmQ5MzVjNmFkYjE1YjYyMDNhIiwicHJvZmlsZU5hbWUiOiJOYWhlbGUiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzYzMjI0MDhkYzBiZjMxNjU4N2RiNDJiN2Q5ZmViZTUwYWQ4MGY0OGU4Njc5YzI0NTFkOTk3MTdjZmVjNTdkYWQifX19","oRo6DIuhOTaXDkFsgwJ488LWqx5d1QpwtglwG1SdEvkbX1aCMGdZyDm9YIopQRjfBg0uYKQFetOZ1ZkdMmc/aKC5/dm0+Ema7g8AUzjwf4OaSLH1r4C1UJ4ruaNG5diBxNTkYnMa7yT8zvyEr22CA7lUOIgTh8ymBfSGK35RPhsn8jM0hDjdhjemBAlxKpiioByfmAQbwokNBOrXfh/PnKq+iJYg4WpMSZ1zo5Rr0CzLXwu+/T3dvrb6mg7qry7J3Lj5/qn6iIdBcjJBeyvy1sCo45jQ3Rzc6oL/84Vu5Dpn395EqUK8Sa7mdpVpATTcj56TCjkNNtDapXNqyO/IIQuzU4wnBKNQmZefaxRl6LV0DhZ8n8YQaPj6hH/mr2oDsd23+jejjqu6Y95ReTyukp06mIGqgekmrdZV2etML2oMAOTv9ieVvqtfo5gEomYs+NFAL7rMmzjAlhd17VOgqNRMpmJazAHWOYKl8KdOH99wGDe5XcyKHysh+qyHKMvhPJztIeAEaosynF/aGHghH2PM354KCuUVNmdR5G7UZUoG9ZA5ZU3EzZ854jeqxcqw3jzb6qL7A83QNuFqOsb87ugL/jO3QEDdQ9drdf3WAQauQGkU3nYBrls5wxoMrQ+Ceth+FtZw9a1v7dc+DEWOeJKCtOAIskb29pv6OcRe0Wk="); + public static final SkinData REVOLUTIONARY = new SkinData("eyJ0aW1lc3RhbXAiOjE0OTg3ODQ5Mzk3NjAsInByb2ZpbGVJZCI6ImIwZDRiMjhiYzFkNzQ4ODlhZjBlODY2MWNlZTk2YWFiIiwicHJvZmlsZU5hbWUiOiJZZWxlaGEiLCJzaWduYXR1cmVSZXF1aXJlZCI6dHJ1ZSwidGV4dHVyZXMiOnsiU0tJTiI6eyJ1cmwiOiJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2I4NTBkZDNkYWQ0MjkxYzFhYmU4NGU2OTM2ZmQ3MDM0ZWVlZTk1OTk2MWI3YjE5NDZhODIxYWRlMTFiODI2YjIifX19","U2xBG+ryUacvZq3WreWF2J4QnQERuvp1okqdlkAYECqvVHz0cars78usPuZYD4s3HyOM0eGASzS4zkQERF6Hk8crnG+ZtqvML5kL+TkxK8gEbn2j5qB+YDG0qTx635mYGC77sGaqE/CsZAlhRYU6lyXILW2616Af8B8orOlpyCMRytijp/OfJREK0bC4I1QnB7AJ2QmBYuZJ9l8473858fJOlCVHjbsC/WRcUvepPSYYxvl8Z5NwayyIVnnz3tGVN6hnM7tzil/gQmsmDwGhlSyify/MEGssvd0sHLTlccA7XX98tyUFHXU84L5MJuNKg/uXTYz+9cRPIgJaptJNfqCoEa/ape+YHlOlK2lm5qRvubvp931X+VwFbcrEuaIFgbqr9cof5JW6DYfpVKvcngi9+K9IzgtPG59Jro5kxb70IfQhZcDkcHGo1pz5Tj7cdJdD7crBeIBaE/EoKU6iaSOrUFoILEdpcWQfaToRnk4L/JMet7zPXBNE/D/vEgQLGLNX7byofdCXSD9njtjLWmHg4rCzwuUqaiWnTCYIkkdg/mFuRQ3oTRRTzdlLXsK90Pz0XU9N6gBhWA9pxhzDJR7YK+mdXODALuMXE6zcCsbVuWhqbnN+EByGdjT9X1QPSN+/5iV9d5JyweiJrF7arf2PmxgEIb9OSjePNKRmHoo="); // 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 From 55a1afbb7154d9a5bef1e15dea83f21775985d03 Mon Sep 17 00:00:00 2001 From: Graphica Date: Sat, 1 Jul 2017 01:05:44 -0400 Subject: [PATCH 31/34] Expose banner data in CountryFlag --- .../core/common/util/banner/CountryFlag.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java index 54626d736..f49d5040c 100644 --- a/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java +++ b/Plugins/Mineplex.Core.Common/src/mineplex/core/common/util/banner/CountryFlag.java @@ -7,6 +7,9 @@ import org.bukkit.block.banner.PatternType; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.BannerMeta; +import java.util.Arrays; +import java.util.List; + import static org.bukkit.DyeColor.*; import static org.bukkit.block.banner.PatternType.*; @@ -110,4 +113,14 @@ public enum CountryFlag return _adjective; } + public DyeColor getBaseColor() + { + return _baseColor; + } + + public List getPatterns() + { + return Arrays.asList(_patterns); + } + } From 5a86141e8f998614f4b8422ae95d019d0686a9d8 Mon Sep 17 00:00:00 2001 From: Graphica Date: Sat, 1 Jul 2017 01:05:58 -0400 Subject: [PATCH 32/34] Fix costume count displaying incorrectly --- .../Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java index 9814c081b..ab57f6835 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/Menu.java @@ -209,7 +209,7 @@ public class Menu extends ShopPageBase type = GadgetType.COSTUME; // -4 Fixes more than the real costumes being counted (Happens because of the hub games costumes - lore = getLore(ownedCount.get(type) - 4, maxCount.get(type) - 4, "Sometimes going out calls for special clothes! Gain bonus effects for matching outfit.", VISIBILITY_HUB, enabled.get(type)); + lore = getLore(ownedCount.get(type), maxCount.get(type) - 4, "Sometimes going out calls for special clothes! Gain bonus effects for matching outfit.", VISIBILITY_HUB, enabled.get(type)); addButton(costumeSlot, new ShopItem(Material.DIAMOND_CHESTPLATE, "Costumes", lore, 1, false), new OpenCostumes(this, enabled.get(type))); if (enabled.containsKey(type)) addGlow(costumeSlot); From 5957b96a4f6b3c523f287526b1b65356919b3e4f Mon Sep 17 00:00:00 2001 From: Graphica Date: Sat, 1 Jul 2017 01:07:32 -0400 Subject: [PATCH 33/34] Add freedom fighter morph --- .../mineplex/core/gadget/GadgetManager.java | 2 + .../gadgets/morph/MorphFreedomFighter.java | 263 ++++++++++++++++++ .../powerplayclub/PowerPlayClubRewards.java | 1 + 3 files changed, 266 insertions(+) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphFreedomFighter.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index 69e331174..18632e6f6 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -15,6 +15,7 @@ import mineplex.core.gadget.gadgets.death.DeathMapleLeaf; import mineplex.core.gadget.gadgets.doublejump.DoubleJumpMaple; import mineplex.core.gadget.gadgets.flag.FlagType; import mineplex.core.gadget.gadgets.morph.MorphBobRoss; +import mineplex.core.gadget.gadgets.morph.MorphFreedomFighter; import mineplex.core.gadget.gadgets.particle.freedom.ParticleAuraNiceness; import mineplex.core.gadget.gadgets.particle.freedom.ParticleCanadian; import mineplex.core.gadget.gadgets.particle.freedom.ParticleFreedomFireworks; @@ -467,6 +468,7 @@ public class GadgetManager extends MiniPlugin addGadget(new MorphGoldPot(this)); addGadget(new MorphAwkwardRabbit(this)); addGadget(new MorphBobRoss(this, _hologramManager)); + addGadget(new MorphFreedomFighter(this)); // Particles addGadget(new ParticleFoot(this)); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphFreedomFighter.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphFreedomFighter.java new file mode 100644 index 000000000..d3b117b29 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/morph/MorphFreedomFighter.java @@ -0,0 +1,263 @@ +package mineplex.core.gadget.gadgets.morph; + +import com.mojang.authlib.GameProfile; +import mineplex.core.blockrestore.BlockRestore; +import mineplex.core.common.skin.SkinData; +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.LineFormat; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilParticle; +import mineplex.core.common.util.UtilText; +import mineplex.core.common.util.banner.CountryFlag; +import mineplex.core.disguise.disguises.DisguisePlayer; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.gadgets.morph.managers.UtilMorph; +import mineplex.core.gadget.types.MorphGadget; +import mineplex.core.recharge.Recharge; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.core.utils.UtilGameProfile; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.World; +import org.bukkit.block.Banner; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; + +import java.time.Month; +import java.time.YearMonth; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ThreadLocalRandom; + +/** + * Freedom fighter morph, capable of planting flags by crouching. + */ +public class MorphFreedomFighter extends MorphGadget +{ + /** How long it takes to plant a flag */ + private static final long FLAG_DELAY = 3500; + + /** How long between flag plantings */ + private static final long FLAG_COOLDOWN = 25000; + + /** Recharge key for planting flags */ + private static final String RECHARGE_KEY = "Plant Flag"; + + /** Design for beacon base */ + private static final int[][] BEACON_BASE = { + { 0, -2, 0}, {1, -2, 0}, {0, -2, 1}, {1, -2, 1}, + {-1, -2, 0}, {0, -2, -1}, {-1,-2,-1}, {0, -2, 1}, + {-1, -2, 1}, {1, -2, -1} + }; + + /** Active timers for players planting flags */ + private final Map _flagTimers = new HashMap<>(); + + /** Active timers for players that have planted flags */ + private final Map _flagCooldowns = new HashMap<>(); + + public MorphFreedomFighter(GadgetManager manager) + { + super(manager, "Freedom Fighter", UtilText.splitLinesToArray(new String[] { + C.cGray + "Fight for your freedom from tyranny and oppressors!", + "", + C.cGreen + "Hold sneak" + C.cWhite + " to plant a flag of freedom!", + }, LineFormat.LORE), -14, Material.CHAINMAIL_CHESTPLATE, (byte) 0, YearMonth.of(2017, Month.JULY)); + } + + /** + * Sets the player's skin. + */ + @Override + public void enableCustom(Player player, boolean message) + { + applyArmor(player, message); + + GameProfile profile = UtilGameProfile.getGameProfile(player); + profile.getProperties().clear(); + profile.getProperties().put("textures", SkinData.REVOLUTIONARY.getProperty()); + + DisguisePlayer disguisePlayer = new DisguisePlayer(player, profile); + disguisePlayer.showInTabList(true, 0); + UtilMorph.disguise(player, disguisePlayer, Manager); + + } + + /** + * Restores the player's skin + */ + @Override + public void disableCustom(Player player, boolean message) + { + removeArmor(player); + UtilMorph.undisguise(player, Manager.getDisguiseManager()); + } + + @EventHandler + public void onUpdate(UpdateEvent event) + { + if (event.getType() != UpdateType.FASTEST) + { + return; + } + + // Clear cooldown timers + if (event.getType() == UpdateType.SEC) + { + Iterator> itr = _flagCooldowns.entrySet().iterator(); + + while (itr.hasNext()) + { + Map.Entry entry = itr.next(); + + if (entry.getValue() + FLAG_COOLDOWN < System.currentTimeMillis()) + { + itr.remove(); + } + } + } + + // For all active cosmetics + for (Player player : getActive()) + { + UUID uuid = player.getUniqueId(); + + // If the player is attempting to place a flag + if (_flagTimers.containsKey(uuid) && !_flagCooldowns.containsKey(uuid)) + { + // Mark them as no longer attempting to place if not sneaking + if (!player.isSneaking()) + { + _flagTimers.remove(uuid); + continue; + } + + // If the players has waiting long enough to place the flag + if (_flagTimers.get(uuid) + FLAG_DELAY < System.currentTimeMillis()) + { + boolean flag = false; + Location location = player.getLocation().subtract(0, 0.5, 0); + + // Make sure the ground is flat enough to place the flag + for (int i = 0; i < BEACON_BASE.length; ++i) + { + Block b = location.clone().add(BEACON_BASE[i][0], 0, BEACON_BASE[i][2]).getBlock(); + + if (b.isEmpty()) + { + flag = true; + break; + } + } + + if (flag) + { + _flagTimers.remove(uuid); + player.sendMessage(F.main("Morphs", C.cRed + "You must plant your flag on flatter ground.")); + } + else + { + // handle placing the flag + if (Recharge.Instance.use(player, RECHARGE_KEY, FLAG_COOLDOWN, true, false)) + { + _flagTimers.remove(uuid); + _flagCooldowns.put(uuid, System.currentTimeMillis()); + buildStructure(player); + } + } + } + else + { + // Play particles leading up to placing the flag + int particleCount = (int) ((System.currentTimeMillis() - _flagTimers.get(uuid)) / 40); + UtilParticle.playParticleFor(player, UtilParticle.ParticleType.FIREWORKS_SPARK, + UtilMath.gauss(player.getLocation().add(0, 1, 0), 2, 6, 2), null, 0, particleCount, UtilParticle.ViewDist.NORMAL); + } + } + else // if the player is not attempting to or has already placed a flag + { + if (player.isSneaking()) + { + if (_flagCooldowns.containsKey(uuid)) + { + Recharge.Instance.usable(player, RECHARGE_KEY, true); + } + else + { + _flagTimers.put(uuid, System.currentTimeMillis()); + _flagCooldowns.remove(uuid); + } + } + } + } + } + + /** + * Builds the structure and beacon by the player. + */ + private void buildStructure(Player player) + { + World world = player.getWorld(); + BlockRestore restore = Manager.getBlockRestore(); + int r = ThreadLocalRandom.current().nextInt(3); + byte data = r == 0 ? (byte) 14 : r == 1 ? (byte) 0 : 11; + Location point = player.getLocation().subtract(0, 0.5, 0); + + while (point.getY() > 1 && !(UtilBlock.fullSolid(point.getBlock()) || UtilBlock.airFoliage(point.getBlock()))) + { + point.setY(point.getY() - 1); + } + + Block glass = point.getBlock().getRelative(BlockFace.UP); + restore.add(glass, Material.STAINED_GLASS.getId(), data, FLAG_COOLDOWN); + glass = glass.getRelative(BlockFace.UP); + restore.add(glass, Material.STAINED_GLASS.getId(), data, FLAG_COOLDOWN); + + BlockFace[] faces = { BlockFace.NORTH, BlockFace.SOUTH, BlockFace.WEST, BlockFace.EAST }; + Block[] blocks = { glass.getRelative(BlockFace.NORTH), glass.getRelative(BlockFace.SOUTH), + glass.getRelative(BlockFace.WEST), glass.getRelative(BlockFace.EAST) }; + + restore.add(glass.getRelative(BlockFace.UP), Material.CARPET.getId(), data, FLAG_COOLDOWN - 50); + + for (int i = 0; i < 4; ++i) + { + restore.add(blocks[i], Material.WALL_BANNER.getId(), (byte) i, blocks[i].getTypeId(), blocks[i].getData(), FLAG_COOLDOWN - 100); + } + + for (int i = 0; i < 4; ++i) + { + Banner state = ((Banner) blocks[i].getState()); + org.bukkit.material.Banner stateData = (org.bukkit.material.Banner) state.getData(); + stateData.setFacingDirection(faces[i]); + CountryFlag flag = i < 2 ? CountryFlag.USA : CountryFlag.CANADA; + state.setBaseColor(flag.getBaseColor()); + state.setPatterns(flag.getPatterns()); + state.update(); + } + + restore.add(point.getBlock(), Material.PISTON_BASE.getId(), (byte) 0, FLAG_COOLDOWN); + + point.subtract(0, 1, 0); + restore.add(point.getBlock(), Material.PISTON_BASE.getId(), (byte) 0, FLAG_COOLDOWN); + + restore.add(point.getBlock().getRelative(BlockFace.DOWN), Material.BEACON.getId(), (byte) 0, FLAG_COOLDOWN); + + for (int i = 0; i < BEACON_BASE.length; ++i) + { + restore.add(world.getBlockAt(point.clone().add(BEACON_BASE[i][0], BEACON_BASE[i][1], BEACON_BASE[i][2])), + Material.IRON_BLOCK.getId(), (byte) 0, FLAG_COOLDOWN); + } + + UtilParticle.PlayParticleToAll(UtilParticle.ParticleType.HUGE_EXPLOSION, player.getLocation(), null, 0, 1, UtilParticle.ViewDist.NORMAL); + player.playSound(player.getLocation(), Sound.EXPLODE, 1.0f, 1.0f); + player.teleport(player.getLocation().add(0, 2.5, 0)); + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRewards.java b/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRewards.java index 83fc019ad..8dc08a791 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRewards.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRewards.java @@ -39,6 +39,7 @@ public class PowerPlayClubRewards .put(YearMonth.of(2017, Month.APRIL), new UnknownSalesPackageItem("Bumblebee's Wings")) .put(YearMonth.of(2017, Month.MAY), new UnknownSalesPackageItem("King")) .put(YearMonth.of(2017, Month.JUNE), new UnknownSalesPackageItem("Bob Ross Morph")) + .put(YearMonth.of(2017, Month.JULY), new UnknownSalesPackageItem("Freedom Fighter")) .build(); public interface PowerPlayClubItem From acaf3b2dd97630608a58371294dc2e390cbb67c3 Mon Sep 17 00:00:00 2001 From: Graphica Date: Sat, 1 Jul 2017 01:09:05 -0400 Subject: [PATCH 34/34] Change freedom treasure from 35k to 30k shards --- .../src/mineplex/core/treasure/TreasureType.java | 2 +- .../src/mineplex/core/treasure/gui/TreasurePage.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureType.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureType.java index a9d3bf5c1..784018ca9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureType.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureType.java @@ -18,7 +18,7 @@ public enum TreasureType ILLUMINATED(C.cAqua + "Illuminated Treasure", "Illuminated Chest", "Illuminated", RewardType.ILLUMINATED_CHEST, Material.CHEST, TreasureStyle.ILLUMINATED, RewardPool.Type.ILLUMINATED, true, 20000), - FREEDOM(C.cRed + "Freedom " + C.cBlue + "Treasure", "Freedom Treasure", "Freedom", RewardType.FREEDOM_CHEST, Material.CHEST, TreasureStyle.FREEDOM, RewardPool.Type.FREEDOM, true, 35000), + FREEDOM(C.cRed + "Freedom " + C.cBlue + "Treasure", "Freedom Treasure", "Freedom", RewardType.FREEDOM_CHEST, Material.CHEST, TreasureStyle.FREEDOM, RewardPool.Type.FREEDOM, true, 20000), OMEGA(C.cAqua + "Omega Chest", "Omega Chest", "Omega", RewardType.OMEGA_CHEST, Material.ENDER_CHEST, TreasureStyle.OMEGA, RewardPool.Type.OMEGA, false, 50000), diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java index 6c79d08c8..154c0f4e7 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java @@ -261,7 +261,7 @@ public class TreasurePage extends ShopPageBase freedomLore.add(" "); freedomLore.add(C.cGray + "It is said that George Washington"); freedomLore.add(C.cGray + "carved this chest himself from the wood"); - freedomLore.add(C.cGray + "of the apple tree he cut down..."); + freedomLore.add(C.cGray + "of the cherry tree he cut down..."); freedomLore.add(" "); if (freedomCount > 0) @@ -287,7 +287,9 @@ public class TreasurePage extends ShopPageBase } else { - freedomLore.add(ChatColor.RESET + "Purchase at: " + C.cYellow + "www.mineplex.com/shop"); + freedomLore.add(ChatColor.RESET + "Click to craft for " + C.cAqua + "20000 Treasure Shards"); + freedomLore.add(" "); + freedomLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop"); } }