Add OneTimePackagePage and ClansPackagePage
This commit is contained in:
parent
468930a35e
commit
2e79bb3d7f
@ -13,6 +13,9 @@ import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.staffServer.customerSupport.CustomerSupport;
|
||||
import mineplex.staffServer.ui.chest.SupportChestPage;
|
||||
import mineplex.staffServer.ui.currency.SupportCurrencyPage;
|
||||
import mineplex.staffServer.ui.packages.SupportClansPackagePage;
|
||||
import mineplex.staffServer.ui.packages.SupportOneTimePackagePage;
|
||||
import mineplex.staffServer.ui.packages.SupportPackagePage;
|
||||
import mineplex.staffServer.ui.pet.SupportPetPage;
|
||||
import mineplex.staffServer.ui.ppc.SupportPowerplayPage;
|
||||
import mineplex.staffServer.ui.rank.SupportRankBonusPage;
|
||||
@ -112,5 +115,19 @@ public class SupportHomePage extends SupportPage
|
||||
C.mBody + "Click to give pets",
|
||||
C.mBody + "to " + C.cYellow + _target.getName()
|
||||
}, 1, false, true), SupportPetPage.class);
|
||||
|
||||
buildPageButton(getSlotIndex(2, 6), new ShopItem(Material.HAY_BLOCK, "One-Time Packages", new String[] {
|
||||
C.mBody + "Click to give one",
|
||||
C.mBody + "time packages, such",
|
||||
C.mBody + "as Frost Lord and",
|
||||
C.mBody + "rainbow bundle."
|
||||
}, 1, false, true), SupportOneTimePackagePage.class);
|
||||
|
||||
buildPageButton(getSlotIndex(3, 1), new ShopItem(Material.IRON_SWORD, "Clans Packages", new String[] {
|
||||
C.mBody + "Click to give clans",
|
||||
C.mBody + "packages, such as",
|
||||
C.mBody + "Boss Tokens and",
|
||||
C.mBody + "Supply Drops."
|
||||
}, 1, false, true), SupportClansPackagePage.class);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,81 @@
|
||||
package mineplex.staffServer.ui.packages;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClient;
|
||||
import mineplex.core.common.util.UtilColor;
|
||||
import mineplex.core.common.util.banner.UtilBanner;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.staffServer.customerSupport.CustomerSupport;
|
||||
import mineplex.staffServer.ui.SupportPage;
|
||||
import mineplex.staffServer.ui.SupportShop;
|
||||
|
||||
public class SupportClansPackagePage extends SupportPackagePage
|
||||
{
|
||||
public SupportClansPackagePage(CustomerSupport plugin, SupportShop shop, Player player, CoreClient target, SupportPage previousPage)
|
||||
{
|
||||
super(plugin, shop, player, target, previousPage, "Clans");
|
||||
|
||||
// Black banner, for some reason
|
||||
addClanBanner(DyeColor.ORANGE, "Editor");
|
||||
addClanBanner(DyeColor.RED, "Usage");
|
||||
|
||||
addClansBossToken(new ItemBuilder(Material.BONE), "Skeleton");
|
||||
addClansBossToken(new ItemBuilder(Material.BLAZE_ROD), "Wizard");
|
||||
|
||||
// These are backwards colors on purpose, for some reason it works.
|
||||
addClansBox(new ItemBuilder(Material.INK_SACK).setData(DyeColor.CYAN.getDyeData()), "Dye");
|
||||
addClansBox(new ItemBuilder(Material.INK_SACK).setData(DyeColor.YELLOW.getDyeData()), "Gilded Dye");
|
||||
addClansBox(new ItemBuilder(Material.IRON_PICKAXE), "Builder");
|
||||
|
||||
addClansSupplyDrop(new ItemBuilder(Material.CHEST), false);
|
||||
addClansSupplyDrop(new ItemBuilder(Material.ENDER_CHEST), true);
|
||||
|
||||
addRuneAmplifier(20);
|
||||
addRuneAmplifier(60);
|
||||
|
||||
buildPage();
|
||||
}
|
||||
|
||||
private void addClanBanner(DyeColor color, String unlock)
|
||||
{
|
||||
_packageList.add(getPackagePair(
|
||||
new ItemBuilder(Material.BANNER).setData(color.getData()),
|
||||
"Banner " + unlock,
|
||||
"Clan Banner " + unlock
|
||||
));
|
||||
}
|
||||
|
||||
private void addClansBox(ItemBuilder builder, String box)
|
||||
{
|
||||
String name = "Clans " + box + " Box";
|
||||
_packageList.add(getPackagePair(builder, box + " Box", name));
|
||||
_itemPackages.add(name);
|
||||
}
|
||||
|
||||
private void addClansBossToken(ItemBuilder builder, String boss)
|
||||
{
|
||||
String packageName = "Clans Boss Token " + boss;
|
||||
_packageList.add(getPackagePair(builder, boss + " Boss Token", packageName));
|
||||
_itemPackages.add(packageName);
|
||||
}
|
||||
|
||||
private void addClansSupplyDrop(ItemBuilder builder, boolean gilded)
|
||||
{
|
||||
String packageName = "Clans " + (gilded ? "Gilded " : "") + "Supply Drop";
|
||||
_packageList.add(getPackagePair(builder, (gilded ? "Gilded " : "") + "Supply Drop", packageName));
|
||||
_itemPackages.add(packageName);
|
||||
}
|
||||
|
||||
private void addRuneAmplifier(int minutes)
|
||||
{
|
||||
String packageName = "Rune Amplifier " + minutes;
|
||||
// In case we ever add a >64min amplifier
|
||||
_packageList.add(getPackagePair(new ItemBuilder(Material.EMERALD).setAmount(Math.min(minutes, 64)), minutes + " Minute Rune Amplifier", packageName));
|
||||
_itemPackages.add(packageName);
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package mineplex.staffServer.ui.packages;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.core.account.CoreClient;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.itemstack.ItemBuilder;
|
||||
import mineplex.staffServer.customerSupport.CustomerSupport;
|
||||
import mineplex.staffServer.ui.SupportPage;
|
||||
import mineplex.staffServer.ui.SupportShop;
|
||||
|
||||
public class SupportOneTimePackagePage extends SupportPackagePage
|
||||
{
|
||||
public SupportOneTimePackagePage(CustomerSupport plugin, SupportShop shop, Player player, CoreClient target, SupportPage previousPage)
|
||||
{
|
||||
super(plugin, shop, player, target, previousPage, "Packages");
|
||||
|
||||
_packageList.add(getPackagePair(
|
||||
new ItemBuilder(Material.WOOL).setData((byte) (UtilMath.r(14) + 1)),
|
||||
"Rainbow Bundle",
|
||||
"Rainbow Arrows", "Rainbow Death", "Rainbow Leap", "Rainbow Aura"
|
||||
));
|
||||
_packageList.add(getPackagePair(Material.SNOW_BALL,"Frost Lord"));
|
||||
_packageList.add(getPackagePair(Material.RABBIT_FOOT,"Easter Bunny Morph"));
|
||||
_packageList.add(getPackagePair(Material.RED_ROSE,"Valentines Gift"));
|
||||
|
||||
_itemPackages.add("Valentines Gift");
|
||||
|
||||
buildPage();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user