Achievment gui changes
This commit is contained in:
parent
7669998ad3
commit
13eb3da0fa
@ -6,38 +6,110 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Created by Shaun on 8/21/2014.
|
||||
* Edited by Chris on 9/13/2059.
|
||||
*/
|
||||
public enum AchievementCategory
|
||||
{
|
||||
GLOBAL("Global",
|
||||
new String[] { "GemsEarned" },
|
||||
Material.BED),
|
||||
Material.BED, 0),
|
||||
|
||||
//Survival
|
||||
BRIDGES("The Bridges",
|
||||
new String[] {"Wins", "Losses", "GemsEarned"},
|
||||
Material.DIAMOND),
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.IRON_PICKAXE, 0),
|
||||
|
||||
SURVIVAL_GAMES("Survival Games",
|
||||
new String[] { "Wins", "Losses", "GemsEarned" },
|
||||
Material.APPLE),
|
||||
new String[] { "Wins", "Losses", "Kills", "Deaths", "GemsEarned" },
|
||||
Material.IRON_SWORD, 0),
|
||||
|
||||
UHC("Ultra Hardcore",
|
||||
new String[] { "Wins", "Losses", "Kills", "Deaths", "GemsEarned" },
|
||||
Material.GOLD_INGOT, 0),
|
||||
|
||||
//Classics
|
||||
SMASH_MOBS("Super Smash Mobs",
|
||||
new String[] { "Wins", "Losses", "Kills", "Deaths", "GemsEarned" },
|
||||
Material.SKULL_ITEM, 4),
|
||||
|
||||
BLOCK_HUNT("Block Hunt",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.DIRT, 0),
|
||||
|
||||
DRAW_MY_THING("Draw My Thing",
|
||||
new String[] {"Wins", "Losses", "GemsEarned"},
|
||||
Material.BOOK_AND_QUILL, 0),
|
||||
|
||||
CASTLE_SIEGE("Castle Siege",
|
||||
new String[] {"Wins", "Losses", "Kills as Defenders", "Deaths as Defenders", "Kills as Undead", "Deaths as Undead", "GemsEarned"},
|
||||
Material.DIAMOND_CHESTPLATE, 0),
|
||||
|
||||
//Champions
|
||||
DOMINATE("Dominate",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.BEACON, 0),
|
||||
|
||||
TEAM_DEATHMATCH("Team Deathmatch",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.GOLD_SWORD, 0),
|
||||
|
||||
//Arcade
|
||||
DRAGONS("Dragons",
|
||||
new String[] {"Wins", "Losses", "GemsEarned"},
|
||||
Material.ENDER_STONE, 0),
|
||||
|
||||
DRAGON_ESCAPE("Dragon Escape",
|
||||
new String[] {"Wins", "Losses", "GemsEarned"},
|
||||
Material.DRAGON_EGG, 0),
|
||||
|
||||
SHEEP_QUEST("Sheep Quest",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.WOOL, 0),
|
||||
|
||||
SNEAKY_ASSASSINS("Sneaky Assassins",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.INK_SACK, 0),
|
||||
|
||||
ONE_IN_THE_QUIVER("One in the Quiver",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.BOW, 0),
|
||||
|
||||
SUPER_PAINTBALL("Super Paintball",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.ENDER_PEARL, 0),
|
||||
|
||||
TURF_WARS("Turf Wars",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.HARD_CLAY, 14),
|
||||
|
||||
RUNNER("Runner",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.LEATHER_BOOTS, 0),
|
||||
|
||||
SPLEEF("Super Spleef",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.IRON_SPADE, 0),
|
||||
|
||||
DEATH_TAG("Death Tag",
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.SKULL_ITEM, 0),
|
||||
|
||||
BACON_BRAWL("Bacon Brawl",
|
||||
new String[] {"Wins", "Losses", "GemsEarned"},
|
||||
Material.PORK),
|
||||
|
||||
BLOCK_HUNT("Block Hunt",
|
||||
new String[] {"Wins", "Losses", "GemsEarned"},
|
||||
Material.DIRT);;
|
||||
new String[] {"Wins", "Losses", "Kills", "Deaths", "GemsEarned"},
|
||||
Material.PORK, 0);
|
||||
|
||||
|
||||
private String _name;
|
||||
private String[] _statsToDisplay;
|
||||
private Material _icon;
|
||||
private byte _iconData;
|
||||
|
||||
AchievementCategory(String name, String[] statsToDisplay, Material icon)
|
||||
AchievementCategory(String name, String[] statsToDisplay, Material icon, int iconData)
|
||||
{
|
||||
_name = name;
|
||||
_statsToDisplay = statsToDisplay;
|
||||
_icon = icon;
|
||||
_iconData = (byte)iconData;
|
||||
}
|
||||
|
||||
public String getFriendlyName()
|
||||
@ -55,5 +127,8 @@ public enum AchievementCategory
|
||||
return _statsToDisplay;
|
||||
}
|
||||
|
||||
|
||||
public byte getIconData()
|
||||
{
|
||||
return _iconData;
|
||||
}
|
||||
}
|
||||
|
@ -51,11 +51,11 @@ public class AchievementMainPage extends ShopPageBase<AchievementManager, Achiev
|
||||
lore.add(" ");
|
||||
addStats(category, lore, 2);
|
||||
lore.add(" ");
|
||||
addAchievements(category, lore, 3);
|
||||
addAchievements(category, lore, 9);
|
||||
lore.add(" ");
|
||||
lore.add(ChatColor.RESET + "Click for more details!");
|
||||
|
||||
ShopItem shopItem = new ShopItem(category.getIcon(),ChatColor.RESET + C.Bold + category.getFriendlyName(), lore.toArray(new String[0]), 1, false);
|
||||
ShopItem shopItem = new ShopItem(category.getIcon(), category.getIconData(), ChatColor.RESET + C.Bold + category.getFriendlyName(), lore.toArray(new String[0]), 1, false, false);
|
||||
AddButton(slot, shopItem, button);
|
||||
|
||||
slot += 2;
|
||||
|
@ -100,7 +100,7 @@ public class AchievementPage extends ShopPageBase<AchievementManager, Achievemen
|
||||
{
|
||||
String itemName = ChatColor.RESET + _category.getFriendlyName() + " Master Achievement";
|
||||
masterAchievementLore.add(" ");
|
||||
masterAchievementLore.add(ChatColor.RESET + "Reward coming soon!");
|
||||
masterAchievementLore.add(ChatColor.RESET + "Kit Reward Coming Soon!");
|
||||
|
||||
AddItem(40, new ShopItem(Material.WOOL, (byte) (hasAllAchievements ? 5 : 14), itemName, masterAchievementLore.toArray(new String[0]), 1, false, true));
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class MorphNotch extends MorphGadget
|
||||
public MorphNotch(GadgetManager manager)
|
||||
{
|
||||
super(manager, "Notch", new String[]
|
||||
{
|
||||
{
|
||||
" ",
|
||||
C.cYellow + "Left Click" + C.cGray + " to use " + C.cGreen + "Enforce EULA",
|
||||
},
|
||||
|
@ -66,7 +66,7 @@ public class Hub extends JavaPlugin implements IRelation
|
||||
saveConfig();
|
||||
|
||||
String webServerAddress = getConfig().getString(WEB_CONFIG);
|
||||
|
||||
|
||||
Logger.initialize(this);
|
||||
|
||||
//Static Modules
|
||||
|
@ -36,7 +36,7 @@ public class HubRepository
|
||||
|
||||
private Connection _connection = null;
|
||||
|
||||
public void initialize(boolean us)
|
||||
public void initialize(boolean us)
|
||||
{
|
||||
_us = us;
|
||||
|
||||
|
@ -165,7 +165,7 @@ public class GameGemManager implements Listener
|
||||
total += (int)(earned * game.GetGemBoostAmount());
|
||||
|
||||
//Gem Finder
|
||||
int gemFinder = Manager.GetAchievement().get(player.getName(), Achievement.GLOBAL_GEM_HUNTER).getLevel();
|
||||
int gemFinder = Manager.GetAchievement().get(player.getName(), Achievement.GLOBAL_GEM_HUNTER).getLevel();
|
||||
if (gemFinder > 0)
|
||||
{
|
||||
total += (int)(earned * (gemFinder * 0.25));
|
||||
|
@ -23,7 +23,7 @@ public class WinWithoutWearingArmorStatTracker extends StatTracker<Game>
|
||||
@EventHandler
|
||||
public void onUpdate(UpdateEvent event)
|
||||
{
|
||||
if (event.getType() == UpdateType.TICK && getGame().GetState() == Game.GameState.Live)
|
||||
if (event.getType() == UpdateType.FAST && getGame().GetState() == Game.GameState.Live)
|
||||
{
|
||||
for (Player player : getGame().GetPlayers(true))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user