diff --git a/README.md b/README.md index 094581106..0f41fd8c4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Our latest development builds are available ~~[here](http://ci.mcmmo.info)~~. Unfortunately, the mcMMO site is down; a temporary dev build location is hosted [here](http://ci.ecocitycraft.com/job/mcMMO/). ### Brief Description -The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds fourteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update. +The goal of mcMMO is to take core Minecraft game mechanics and expand them into add an extensive and quality RPG experience. Everything in mcMMO has been carefully thought out and is constantly being improved upon. Currently, mcMMO adds thirteen unique skills to train and level in. Each of these skills is highly customizable through our configuration files, allowing server admins to tweak mcMMO to best suit the needs of his or her server. Additionally, when run in conjuction with SpoutPlugin, mcMMO also has a custom XP bar to allow for easy tracking of progress towards leveling up. Know that the mcMMO team is dedicated to providing an ever-evolving experience, and that we carefully read all feedback and bug reports in order to evaluate and balance the mechanics of mcMMO in every update. ## About the Team @@ -47,5 +47,6 @@ Required Libraries: * JUnit * EMetrics * Bukkit +* SpoutPlugin API http://dev.bukkit.org/server-mods/mcmmo for more up to date information. diff --git a/pom.xml b/pom.xml index 34d451fe4..653bb1dbe 100755 --- a/pom.xml +++ b/pom.xml @@ -22,6 +22,38 @@ .jenkins + + resources + false + ${basedir}/src/main/resources/xpbar/ + + xpbar*.png + + + + resources + false + ${basedir}/src/main/resources/healthbar/ + + health*.png + + + + resources + false + ${basedir}/src/main/resources/skillicon/ + + *.png + + + + resources + false + ${basedir}/src/main/resources/sound/ + + *.wav + + com/gmail/nossr50/locale true @@ -112,6 +144,18 @@ md_5-releases http://repo.md-5.net/content/repositories/releases/ + + sonatype-nexus-releases + https://oss.sonatype.org/content/repositories/releases + + + sonatype-nexus-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + true + always + + Plugin MetricsExtension http://repo.turt2live.com @@ -125,6 +169,11 @@ jar compile + + org.spoutcraft + spoutcraftplugin + LATEST + junit junit-dep diff --git a/src/main/java/com/gmail/nossr50/api/SpoutHudAPI.java b/src/main/java/com/gmail/nossr50/api/SpoutHudAPI.java new file mode 100644 index 000000000..f7231bd95 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/api/SpoutHudAPI.java @@ -0,0 +1,29 @@ +package com.gmail.nossr50.api; + +import org.bukkit.entity.Player; + +import com.gmail.nossr50.config.spout.SpoutConfig; +import com.gmail.nossr50.datatypes.spout.huds.HudType; +import com.gmail.nossr50.util.player.UserManager; + +public class SpoutHudAPI { + private SpoutHudAPI() {} + + /** + * Disable the mcMMO XP bar for a player. + *
+ * This function is designed for API usage. + */ + public static void disableXpBar(Player player) { + UserManager.getPlayer(player).getProfile().setHudType(HudType.DISABLED); + } + + /** + * Disable the mcMMO XP bar for the server. + *
+ * This function is designed for API usage. + */ + public static void disableXpBar() { + SpoutConfig.getInstance().setXPBarEnabled(false); + } +} diff --git a/src/main/java/com/gmail/nossr50/api/SpoutToolsAPI.java b/src/main/java/com/gmail/nossr50/api/SpoutToolsAPI.java new file mode 100644 index 000000000..2effea669 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/api/SpoutToolsAPI.java @@ -0,0 +1,79 @@ +package com.gmail.nossr50.api; + +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.inventory.ItemStack; + +import com.gmail.nossr50.datatypes.skills.ToolType; + +public final class SpoutToolsAPI { + public static final List spoutSwords = new ArrayList(); + public static final List spoutAxes = new ArrayList(); + public static final List spoutPickaxes = new ArrayList(); + public static final List spoutHoes = new ArrayList(); + public static final List spoutShovels = new ArrayList(); + + private SpoutToolsAPI() {} + + /** + * Add a custom Spout tool to mcMMO for XP gain & ability use. + *
+ * This function is designed for API usage. + * + * @param spoutTool The tool to add + * @param type The type of tool to add + */ + public static void addCustomTool(ItemStack spoutTool, ToolType type) { + switch (type) { + case AXE: + spoutAxes.add(spoutTool); + break; + + case HOE: + spoutHoes.add(spoutTool); + break; + + case PICKAXE: + spoutPickaxes.add(spoutTool); + break; + + case SHOVEL: + spoutShovels.add(spoutTool); + break; + + case SWORD: + spoutSwords.add(spoutTool); + break; + + default: + break; + } + } + + public static boolean isSpoutTool(ItemStack spoutTool, ToolType type) { + return getSpoutTools(type) != null && getSpoutTools(type).contains(spoutTool); + } + + private static List getSpoutTools(ToolType type) { + switch (type) { + case AXE: + return spoutAxes; + + case HOE: + return spoutHoes; + + case PICKAXE: + return spoutPickaxes; + + case SHOVEL: + return spoutShovels; + + case SWORD: + return spoutSwords; + + default: + return null; + } + } +} diff --git a/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java b/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java index 3fa4fed10..f04088afa 100644 --- a/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/McmmoCommand.java @@ -4,12 +4,14 @@ import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.commands.party.PartySubcommandType; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.util.Permissions; +import com.gmail.nossr50.util.spout.SpoutUtils; public class McmmoCommand implements CommandExecutor { @Override @@ -26,8 +28,13 @@ public class McmmoCommand implements CommandExecutor { sender.sendMessage(mcSplit); if (Config.getInstance().getDonateMessageEnabled()) { - sender.sendMessage(LocaleLoader.getString("MOTD.Donate")); - sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal"); + if (mcMMO.isSpoutEnabled() && sender instanceof Player) { + SpoutUtils.sendDonationNotification((Player) sender); + } + else { + sender.sendMessage(LocaleLoader.getString("MOTD.Donate")); + sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal"); + } } sender.sendMessage(LocaleLoader.getString("MOTD.Version", mcMMO.p.getDescription().getVersion())); diff --git a/src/main/java/com/gmail/nossr50/commands/spout/MchudCommand.java b/src/main/java/com/gmail/nossr50/commands/spout/MchudCommand.java new file mode 100644 index 000000000..06dbea47e --- /dev/null +++ b/src/main/java/com/gmail/nossr50/commands/spout/MchudCommand.java @@ -0,0 +1,58 @@ +package com.gmail.nossr50.commands.spout; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.util.StringUtil; + +import com.gmail.nossr50.datatypes.spout.huds.HudType; +import com.gmail.nossr50.locale.LocaleLoader; + +import com.google.common.collect.ImmutableList; + +public class MchudCommand extends SpoutCommand { + private static final List HUD_TYPES; + + static { + ArrayList types = new ArrayList(); + + for (HudType type : HudType.values()) { + types.add(type.toString()); + } + + Collections.sort(types); + HUD_TYPES = ImmutableList.copyOf(types); + } + + @Override + public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) { + switch (args.length) { + case 1: + return StringUtil.copyPartialMatches(args[0], HUD_TYPES, new ArrayList(HUD_TYPES.size())); + default: + return ImmutableList.of(); + } + } + + @Override + protected boolean noArguments(Command command, CommandSender sender, String[] args) { + return false; + } + + @Override + protected boolean oneArgument(Command command, CommandSender sender, String[] args) { + try { + playerProfile.setHudType(HudType.valueOf(args[0].toUpperCase().trim())); + spoutHud.initializeXpBar(); + spoutHud.updateXpBar(); + return true; + } + catch (IllegalArgumentException ex) { + sender.sendMessage(LocaleLoader.getString("Commands.mchud.Invalid")); + return true; + } + } +} diff --git a/src/main/java/com/gmail/nossr50/commands/spout/SpoutCommand.java b/src/main/java/com/gmail/nossr50/commands/spout/SpoutCommand.java new file mode 100644 index 000000000..531fa2dd3 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/commands/spout/SpoutCommand.java @@ -0,0 +1,58 @@ +package com.gmail.nossr50.commands.spout; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabExecutor; +import org.bukkit.entity.Player; + +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.spout.SpoutConfig; +import com.gmail.nossr50.datatypes.player.PlayerProfile; +import com.gmail.nossr50.datatypes.spout.huds.McMMOHud; +import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.util.commands.CommandUtils; +import com.gmail.nossr50.util.player.UserManager; + +import org.getspout.spout.player.SpoutCraftPlayer; +import org.getspout.spoutapi.SpoutServer; +import org.getspout.spoutapi.player.SpoutPlayer; + +public abstract class SpoutCommand implements TabExecutor { + protected PlayerProfile playerProfile; + protected McMMOHud spoutHud; + + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (CommandUtils.noConsoleUsage(sender)) { + return true; + } + + if (!mcMMO.isSpoutEnabled() || !SpoutConfig.getInstance().getXPBarEnabled()) { + sender.sendMessage(LocaleLoader.getString("Commands.Disabled")); + return true; + } + + playerProfile = UserManager.getPlayer((Player) sender).getProfile(); + spoutHud = playerProfile.getSpoutHud(); + + if (spoutHud == null) { + sender.sendMessage(LocaleLoader.getString("Commands.Disabled")); + return true; + } + + switch (args.length) { + case 0: + return noArguments(command, sender, args); + + case 1: + return oneArgument(command, sender, args); + + default: + return false; + } + } + + protected abstract boolean noArguments(Command command, CommandSender sender, String[] args); + + protected abstract boolean oneArgument(Command command, CommandSender sender, String[] args); +} diff --git a/src/main/java/com/gmail/nossr50/commands/spout/XplockCommand.java b/src/main/java/com/gmail/nossr50/commands/spout/XplockCommand.java new file mode 100644 index 000000000..1adfde283 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/commands/spout/XplockCommand.java @@ -0,0 +1,89 @@ +package com.gmail.nossr50.commands.spout; + +import java.util.ArrayList; +import java.util.List; + +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.util.StringUtil; + +import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.util.Permissions; +import com.gmail.nossr50.util.commands.CommandUtils; + +import com.google.common.collect.ImmutableList; + +public class XplockCommand extends SpoutCommand { + @Override + public List onTabComplete(CommandSender sender, Command command, String alias, String[] args) { + switch (args.length) { + case 1: + List matches = StringUtil.copyPartialMatches(args[0], CommandUtils.TRUE_FALSE_OPTIONS, new ArrayList(CommandUtils.TRUE_FALSE_OPTIONS.size())); + + if (matches.size() == 0) { + return StringUtil.copyPartialMatches(args[0], SkillType.SKILL_NAMES, new ArrayList(SkillType.SKILL_NAMES.size())); + } + + return matches; + default: + return ImmutableList.of(); + } + } + + @Override + protected boolean noArguments(Command command, CommandSender sender, String[] args) { + if (spoutHud.getXpBarLocked()) { + unlockXpBar(sender); + return true; + } + + lockXpBar(sender, spoutHud.getLastGained()); + return true; + } + + @Override + protected boolean oneArgument(Command command, CommandSender sender, String[] args) { + if (CommandUtils.shouldEnableToggle(args[0])) { + lockXpBar(sender, spoutHud.getLastGained()); + return true; + } + + if (CommandUtils.shouldDisableToggle(args[0])) { + unlockXpBar(sender); + return true; + } + + if (CommandUtils.isInvalidSkill(sender, args[0])) { + return true; + } + + SkillType skill = SkillType.getSkill(args[0]); + + if (CommandUtils.isChildSkill(sender, skill)) { + return true; + } + + if (!Permissions.xplock(sender, skill)) { + sender.sendMessage(command.getPermissionMessage()); + return true; + } + + lockXpBar(sender, skill); + return true; + } + + private void lockXpBar(CommandSender sender, SkillType skill) { + if (skill != null) { + spoutHud.setXpBarLocked(true); + spoutHud.setSkillLock(skill); + spoutHud.updateXpBar(); + sender.sendMessage(LocaleLoader.getString("Commands.xplock.locked", skill.getName())); + } + } + + private void unlockXpBar(CommandSender sender) { + spoutHud.setXpBarLocked(false); + sender.sendMessage(LocaleLoader.getString("Commands.xplock.unlocked")); + } +} diff --git a/src/main/java/com/gmail/nossr50/config/spout/SpoutConfig.java b/src/main/java/com/gmail/nossr50/config/spout/SpoutConfig.java new file mode 100644 index 000000000..433a76438 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/spout/SpoutConfig.java @@ -0,0 +1,75 @@ +package com.gmail.nossr50.config.spout; + +import com.gmail.nossr50.config.ConfigLoader; +import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.datatypes.spout.huds.HudType; + +import org.getspout.spoutapi.keyboard.Keyboard; + +public class SpoutConfig extends ConfigLoader { + private static SpoutConfig instance; + + private SpoutConfig() { + super("spout.yml"); + } + + public static SpoutConfig getInstance() { + if (instance == null) { + instance = new SpoutConfig(); + } + + return instance; + } + + @Override + protected void loadKeys() { + // Setup default HUD + } + + public HudType getDefaultHudType() { + try { + return HudType.valueOf(config.getString("Spout.HUD.Default", "STANDARD").toUpperCase().trim()); + } + catch (IllegalArgumentException ex) { + return HudType.STANDARD; + } + } + + public boolean getShowPowerLevel() { return config.getBoolean("HUD.Show_Power_Level", true); } + public Keyboard getMenuKey() { + try { + return Keyboard.valueOf(config.getString("Menu.Key", "KEY_M").toUpperCase().trim()); + } + catch (IllegalArgumentException ex) { + return Keyboard.KEY_M; + } + } + + /* XP Bar */ + public boolean getXPBarEnabled() { return config.getBoolean("XP.Bar.Enabled", true); } + public void setXPBarEnabled(boolean enabled) { config.set("XP.Bar.Enabled", enabled); } + + public boolean getXPBarIconEnabled() { return config.getBoolean("XP.Icon.Enabled", true); } + public int getXPBarXPosition() { return config.getInt("XP.Bar.X_POS", 95); } + public int getXPBarYPosition() { return config.getInt("XP.Bar.Y_POS", 6); } + public int getXPIconXPosition() { return config.getInt("XP.Icon.X_POS", 78); } + public int getXPIconYPosition() { return config.getInt("XP.Icon.Y_POS", 2); } + + /* HUD Colors */ + public double getRetroHUDXPBorderRed() { return config.getDouble("HUD.Retro.Colors.Border.RED", 0.0); } + public double getRetroHUDXPBorderGreen() { return config.getDouble("HUD.Retro.Colors.Border.GREEN", 0.0); } + public double getRetroHUDXPBorderBlue() { return config.getDouble("HUD.Retro.Colors.Border.BLUE", 0.0); } + public double getRetroHUDXPBackgroundRed() { return config.getDouble("HUD.Retro.Colors.Background.RED", 0.75); } + public double getRetroHUDXPBackgroundGreen() { return config.getDouble("HUD.Retro.Colors.Background.GREEN", 0.75); } + public double getRetroHUDXPBackgroundBlue() { return config.getDouble("HUD.Retro.Colors.Background.BLUE", 0.75); } + + public double getRetroHUDRed(SkillType skill) { return config.getDouble("HUD.Retro.Colors." + skill.toString().toLowerCase() +".RED", 0.3); } + public double getRetroHUDGreen(SkillType skill) { return config.getDouble("HUD.Retro.Colors." + skill.toString().toLowerCase() +".RED", 0.3); } + public double getRetroHUDBlue(SkillType skill) { return config.getDouble("HUD.Retro.Colors." + skill.toString().toLowerCase() +".RED", 0.3); } + + /* Notification Tiers */ + public int getNotificationTier1() { return config.getInt("Notifications.Tier1", 200); } + public int getNotificationTier2() { return config.getInt("Notifications.Tier2", 400); } + public int getNotificationTier3() { return config.getInt("Notifications.Tier3", 600); } + public int getNotificationTier4() { return config.getInt("Notifications.Tier4", 800); } +} diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java index abd524ddb..b1092028c 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java @@ -25,6 +25,7 @@ import com.gmail.nossr50.datatypes.database.PlayerStat; import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.AbilityType; import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.datatypes.spout.huds.HudType; import com.gmail.nossr50.util.Misc; public final class FlatfileDatabaseManager implements DatabaseManager { @@ -258,7 +259,8 @@ public final class FlatfileDatabaseManager implements DatabaseManager { writer.append((int) profile.getAbilityDATS(AbilityType.SERRATED_STRIKES)).append(":"); writer.append((int) profile.getAbilityDATS(AbilityType.SKULL_SPLITTER)).append(":"); writer.append((int) profile.getAbilityDATS(AbilityType.SUPER_BREAKER)).append(":"); - writer.append(":"); + HudType hudType = profile.getHudType(); + writer.append(hudType == null ? "STANDARD" : hudType.toString()).append(":"); writer.append(profile.getSkillLevel(SkillType.FISHING)).append(":"); writer.append(profile.getSkillXpLevel(SkillType.FISHING)).append(":"); writer.append((int) profile.getAbilityDATS(AbilityType.BLAST_MINING)).append(":"); @@ -771,6 +773,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager { Map skills = getSkillMapFromLine(character); // Skill levels Map skillsXp = new HashMap(); // Skill & XP Map skillsDATS = new HashMap(); // Ability & Cooldown + HudType hudType; MobHealthbarType mobHealthbarType; // TODO on updates, put new values in a try{} ? @@ -802,6 +805,13 @@ public final class FlatfileDatabaseManager implements DatabaseManager { // Acrobatics - Unused skillsDATS.put(AbilityType.BLAST_MINING, Integer.valueOf(character[36])); + try { + hudType = HudType.valueOf(character[33]); + } + catch (Exception e) { + hudType = HudType.STANDARD; // Shouldn't happen unless database is being tampered with + } + try { mobHealthbarType = MobHealthbarType.valueOf(character[38]); } @@ -809,7 +819,7 @@ public final class FlatfileDatabaseManager implements DatabaseManager { mobHealthbarType = Config.getInstance().getMobHealthbarDefault(); } - return new PlayerProfile(character[0], skills, skillsXp, skillsDATS, mobHealthbarType); + return new PlayerProfile(character[0], skills, skillsXp, skillsDATS, hudType, mobHealthbarType); } private Map getSkillMapFromLine(String[] character) { diff --git a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java index 38f67e4fb..a1a2c1859 100644 --- a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java @@ -23,6 +23,7 @@ import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.AbilityType; import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.runnables.database.SQLDatabaseKeepaliveTask; +import com.gmail.nossr50.datatypes.spout.huds.HudType; import com.gmail.nossr50.runnables.database.SQLReconnectTask; import com.gmail.nossr50.util.Misc; @@ -130,9 +131,10 @@ public final class SQLDatabaseManager implements DatabaseManager { } boolean success = true; MobHealthbarType mobHealthbarType = profile.getMobHealthbarType(); + HudType hudType = profile.getHudType(); success &= saveLogin(userId, ((int) (System.currentTimeMillis() / Misc.TIME_CONVERSION_FACTOR))); - success &= saveHuds(userId, (mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString())); + saveHuds(userId, (hudType == null ? "STANDARD" : hudType.toString()), (mobHealthbarType == null ? Config.getInstance().getMobHealthbarDefault().toString() : mobHealthbarType.toString())); success &= saveLongs( "UPDATE " + tablePrefix + "cooldowns SET " + " mining = ?, woodcutting = ?, unarmed = ?" @@ -1164,7 +1166,7 @@ public final class SQLDatabaseManager implements DatabaseManager { } } - private boolean saveHuds(int userId, String mobHealthBar) { + private boolean saveHuds(int userId, String hudType, String mobHealthBar) { PreparedStatement statement = null; try { @@ -1194,6 +1196,7 @@ public final class SQLDatabaseManager implements DatabaseManager { Map skills = new HashMap(); // Skill & Level Map skillsXp = new HashMap(); // Skill & XP Map skillsDATS = new HashMap(); // Ability & Cooldown + HudType hudType; MobHealthbarType mobHealthbarType; final int OFFSET_SKILLS = 0; // TODO update these numbers when the query changes (a new skill is added) @@ -1242,6 +1245,13 @@ public final class SQLDatabaseManager implements DatabaseManager { // Acrobatics - Unused - result.getInt(OFFSET_DATS + 11) skillsDATS.put(AbilityType.BLAST_MINING, result.getInt(OFFSET_DATS + 12)); + try { + hudType = HudType.valueOf(result.getString(OFFSET_OTHER + 1)); + } + catch (Exception e) { + hudType = HudType.STANDARD; // Shouldn't happen unless database is being tampered with + } + try { mobHealthbarType = MobHealthbarType.valueOf(result.getString(OFFSET_OTHER + 2)); } @@ -1249,7 +1259,7 @@ public final class SQLDatabaseManager implements DatabaseManager { mobHealthbarType = Config.getInstance().getMobHealthbarDefault(); } - return new PlayerProfile(playerName, skills, skillsXp, skillsDATS, mobHealthbarType); + return new PlayerProfile(playerName, skills, skillsXp, skillsDATS, hudType, mobHealthbarType); } private void printErrors(SQLException ex) { diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java index 9bcdb3e0e..7d0a14997 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java @@ -24,6 +24,7 @@ import com.gmail.nossr50.datatypes.party.PartyTeleportRecord; import com.gmail.nossr50.datatypes.skills.AbilityType; import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.datatypes.skills.ToolType; +import com.gmail.nossr50.datatypes.spout.huds.McMMOHud; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.party.PartyManager; import com.gmail.nossr50.party.ShareHandler; @@ -52,6 +53,7 @@ import com.gmail.nossr50.util.StringUtils; import com.gmail.nossr50.util.skills.ParticleEffectUtils; import com.gmail.nossr50.util.skills.PerksUtils; import com.gmail.nossr50.util.skills.SkillUtils; +import com.gmail.nossr50.util.spout.SpoutUtils; import org.apache.commons.lang.Validate; @@ -88,6 +90,7 @@ public class McMMOPlayer { private int chimeraWingLastUse; private Location teleportCommence; + private boolean isSpoutPlayer; private boolean isUsingUnarmed; private final FixedMetadataValue playerMetadata; @@ -402,6 +405,17 @@ public class McMMOPlayer { teleportCommence = player.getLocation(); } + /* + * Spout support + */ + public boolean isSpoutPlayer() { + return isSpoutPlayer; + } + + public void setIsSpoutPlayer(boolean isSpoutPlayer) { + this.isSpoutPlayer = isSpoutPlayer; + } + /* * Exploit Prevention */ @@ -548,6 +562,12 @@ public class McMMOPlayer { return; } + McMMOHud spoutHud = profile.getSpoutHud(); + + if (spoutHud != null) { + spoutHud.setLastGained(skillType); + } + isUsingUnarmed = (skillType == SkillType.UNARMED); checkXp(skillType); } @@ -579,11 +599,20 @@ public class McMMOPlayer { return; } - if (Config.getInstance().getLevelUpSoundsEnabled()) { - player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH); + if (this.isSpoutPlayer) { + SpoutUtils.processLevelup(this, skillType, levelsGained); + } + else { + if (Config.getInstance().getLevelUpSoundsEnabled()) { + player.playSound(player.getLocation(), Sound.LEVEL_UP, Misc.LEVELUP_VOLUME, Misc.LEVELUP_PITCH); + } + + player.sendMessage(LocaleLoader.getString(StringUtils.getCapitalized(skillType.toString()) + ".Skillup", levelsGained, getSkillLevel(skillType))); } - player.sendMessage(LocaleLoader.getString(StringUtils.getCapitalized(skillType.toString()) + ".Skillup", levelsGained, getSkillLevel(skillType))); + if (this.isSpoutPlayer) { + SpoutUtils.processXpGain(player, profile); + } } /* diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index af1084249..7d57d6c42 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -7,10 +7,13 @@ import java.util.Set; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; +import com.gmail.nossr50.config.spout.SpoutConfig; import com.gmail.nossr50.datatypes.MobHealthbarType; import com.gmail.nossr50.datatypes.experience.FormulaType; import com.gmail.nossr50.datatypes.skills.AbilityType; import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.datatypes.spout.huds.HudType; +import com.gmail.nossr50.datatypes.spout.huds.McMMOHud; import com.gmail.nossr50.skills.child.FamilyTree; import com.gmail.nossr50.util.player.UserManager; @@ -22,7 +25,9 @@ public class PlayerProfile { private boolean changed; /* HUDs */ + private HudType hudType; private MobHealthbarType mobHealthbarType; + private McMMOHud spoutHud; /* Skill Data */ private final Map skills = new HashMap(); // Skill & Level @@ -32,6 +37,7 @@ public class PlayerProfile { public PlayerProfile(String playerName) { this.playerName = playerName; + hudType = mcMMO.isSpoutEnabled() ? SpoutConfig.getInstance().getDefaultHudType() : HudType.DISABLED; mobHealthbarType = Config.getInstance().getMobHealthbarDefault(); for (AbilityType abilityType : AbilityType.values()) { @@ -49,8 +55,10 @@ public class PlayerProfile { this.loaded = isLoaded; } - public PlayerProfile(String playerName, Map levelData, Map xpData, Map cooldownData, MobHealthbarType mobHealthbarType) { + public PlayerProfile(String playerName, Map levelData, Map xpData, Map cooldownData, HudType hudType, MobHealthbarType mobHealthbarType) { this.playerName = playerName; + + this.hudType = hudType; this.mobHealthbarType = mobHealthbarType; skills.putAll(levelData); @@ -65,7 +73,7 @@ public class PlayerProfile { return; } - changed = !mcMMO.getDatabaseManager().saveUser(new PlayerProfile(playerName, ImmutableMap.copyOf(skills), ImmutableMap.copyOf(skillsXp), ImmutableMap.copyOf(abilityDATS), mobHealthbarType)); + changed = !mcMMO.getDatabaseManager().saveUser(new PlayerProfile(playerName, ImmutableMap.copyOf(skills), ImmutableMap.copyOf(skillsXp), ImmutableMap.copyOf(abilityDATS), hudType, mobHealthbarType)); if (changed) { mcMMO.p.getLogger().warning("PlayerProfile for " + playerName + " failed to save"); @@ -80,6 +88,26 @@ public class PlayerProfile { return loaded; } + /* + * HUD Stuff + */ + + public HudType getHudType() { + return hudType; + } + + public McMMOHud getSpoutHud() { + return spoutHud; + } + + public void setSpoutHud(McMMOHud spoutHud) { + this.spoutHud = spoutHud; + } + + public void setHudType(HudType hudType) { + this.hudType = hudType; + } + /* * Mob Healthbars */ diff --git a/src/main/java/com/gmail/nossr50/datatypes/spout/buttons/McMMOButton.java b/src/main/java/com/gmail/nossr50/datatypes/spout/buttons/McMMOButton.java new file mode 100644 index 000000000..72748eb6f --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/spout/buttons/McMMOButton.java @@ -0,0 +1,24 @@ +package com.gmail.nossr50.datatypes.spout.buttons; + +import org.getspout.spoutapi.gui.GenericButton; + +public class McMMOButton extends GenericButton { + private Slot slot; + + public McMMOButton(String text, String toolTip) { + this.setText(text); + this.setTooltip(toolTip); + } + + public void connect(Slot slot) { + this.slot = slot; + } + + public void activate() { + slot.activate(); + } + + public interface Slot { + public void activate(); + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/spout/huds/HudType.java b/src/main/java/com/gmail/nossr50/datatypes/spout/huds/HudType.java new file mode 100644 index 000000000..5095755b9 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/spout/huds/HudType.java @@ -0,0 +1,12 @@ +package com.gmail.nossr50.datatypes.spout.huds; + +public enum HudType { + DISABLED, + STANDARD, + SMALL, + RETRO; + + public HudType getNext() { + return values()[(ordinal() + 1) % values().length]; + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/spout/huds/McMMOHud.java b/src/main/java/com/gmail/nossr50/datatypes/spout/huds/McMMOHud.java new file mode 100644 index 000000000..4b6d64874 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/spout/huds/McMMOHud.java @@ -0,0 +1,106 @@ +package com.gmail.nossr50.datatypes.spout.huds; + +import org.bukkit.entity.Player; + +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.spout.SpoutConfig; +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.datatypes.player.PlayerProfile; +import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.datatypes.spout.popups.McMMOMenu; +import com.gmail.nossr50.datatypes.spout.popups.McMMOXpBar; + +import org.getspout.spoutapi.SpoutManager; + +public class McMMOHud { + private Player player; + private PlayerProfile profile; + + private SkillType lastGained; + private SkillType skillLock; + private boolean xpBarLocked; + + private McMMOMenu menu; + private McMMOXpBar xpBar; + + public McMMOHud(McMMOPlayer mcMMOPlayer) { + this.player = mcMMOPlayer.getPlayer(); + this.profile = mcMMOPlayer.getProfile(); + + initializeXpBar(); + } + + /** + * Initialize the HUD. + */ + public void initializeXpBar() { + if (SpoutConfig.getInstance().getXPBarEnabled()) { + if (xpBar != null) { + xpBar.removeWidgets(); + } + + xpBar = new McMMOXpBar(SpoutManager.getPlayer(player), profile.getHudType()); + } + } + + /** + * Update the XP bar. + */ + public void updateXpBar() { + SkillType skillType = xpBarLocked ? skillLock : lastGained; + + if (skillType == null) { + return; + } + + xpBar.update(skillType, profile); + } + + public boolean isMenuOpened() { + return (menu != null); + } + + public void openMenu() { + menu = new McMMOMenu(SpoutManager.getPlayer(player), profile); + } + + public void onMenuClose() { + menu = null; + } + + public void removeWidgets() { + if (menu != null) { + menu.close(); + } + + SpoutManager.getPlayer(player).getMainScreen().removeWidgets(mcMMO.p); + } + + public SkillType getLastGained() { + return lastGained; + } + + public void setLastGained(SkillType type) { + this.lastGained = type; + } + + public boolean getXpBarLocked() { + return xpBarLocked; + } + + public void setXpBarLocked(boolean locked) { + this.xpBarLocked = locked; + } + + public void toggleXpBarLocked() { + xpBarLocked = !xpBarLocked; + } + + public SkillType getSkillLock() { + return skillLock; + } + + public void setSkillLock(SkillType type) { + this.skillLock = type; + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/spout/popups/McMMOMenu.java b/src/main/java/com/gmail/nossr50/datatypes/spout/popups/McMMOMenu.java new file mode 100644 index 000000000..8930e486c --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/spout/popups/McMMOMenu.java @@ -0,0 +1,82 @@ +package com.gmail.nossr50.datatypes.spout.popups; + +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.datatypes.player.PlayerProfile; +import com.gmail.nossr50.datatypes.spout.buttons.McMMOButton; +import com.gmail.nossr50.datatypes.spout.buttons.McMMOButton.Slot; +import com.gmail.nossr50.datatypes.spout.huds.HudType; +import com.gmail.nossr50.datatypes.spout.huds.McMMOHud; +import com.gmail.nossr50.locale.LocaleLoader; + +import org.getspout.spoutapi.gui.GenericLabel; +import org.getspout.spoutapi.gui.GenericPopup; +import org.getspout.spoutapi.gui.InGameHUD; +import org.getspout.spoutapi.player.SpoutPlayer; + +public class McMMOMenu extends GenericPopup { + private McMMOButton hudButton; + private McMMOButton escapeButton; + + private GenericLabel titleLabel = new GenericLabel(); + private GenericLabel escapeLabel = new GenericLabel(); + + private static int centerX = 427 / 2; + private static int centerY = 240 / 2; + + public McMMOMenu(final SpoutPlayer spoutPlayer, final PlayerProfile playerProfile) { + // 240, 427 are the bottom right + titleLabel.setText(LocaleLoader.getString("Spout.Menu.Title")); + titleLabel.setWidth(100); + titleLabel.setHeight(100); + titleLabel.setX(centerX - 35); + titleLabel.setY((centerY / 2) - 20); + + escapeLabel.setText(LocaleLoader.getString("Spout.Menu.Exit")); + escapeLabel.setWidth(100); + escapeLabel.setHeight(100); + escapeLabel.setX(titleLabel.getX() - 15); + escapeLabel.setY(titleLabel.getY() + 10); + + hudButton = new McMMOButton(LocaleLoader.getString("Spout.Menu.HudButton.1", playerProfile.getHudType().toString()), LocaleLoader.getString("Spout.Menu.HudButton.2")); + hudButton.setWidth(120); + hudButton.setHeight(20); + hudButton.setX(centerX - (hudButton.getWidth() / 2)); + hudButton.setY(centerY / 2); + hudButton.connect(new Slot() { + @Override + public void activate() { + HudType nextHudType = playerProfile.getHudType().getNext(); + McMMOHud spoutHud = playerProfile.getSpoutHud(); + + playerProfile.setHudType(nextHudType); + spoutHud.initializeXpBar(); + spoutHud.updateXpBar(); + + hudButton.setText("HUD Type: " + nextHudType.toString()); + hudButton.setDirty(true); + } + }); + + escapeButton = new McMMOButton(LocaleLoader.getString("Spout.Menu.ExitButton"), null); + escapeButton.setWidth(60); + escapeButton.setHeight(20); + escapeButton.setX(centerX - (escapeButton.getWidth() / 2)); + escapeButton.setY((centerY / 2) + (escapeButton.getHeight() * 2) + 5); + escapeButton.connect(new Slot() { + @Override + public void activate() { + spoutPlayer.getMainScreen().closePopup(); + } + }); + + attachWidget(mcMMO.p, hudButton); + attachWidget(mcMMO.p, titleLabel); + attachWidget(mcMMO.p, escapeLabel); + attachWidget(mcMMO.p, escapeButton); + + InGameHUD inGameHud = spoutPlayer.getMainScreen(); + + inGameHud.attachPopupScreen(this); + inGameHud.setDirty(true); + } +} diff --git a/src/main/java/com/gmail/nossr50/datatypes/spout/popups/McMMOXpBar.java b/src/main/java/com/gmail/nossr50/datatypes/spout/popups/McMMOXpBar.java new file mode 100644 index 000000000..e3f062cb8 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/datatypes/spout/popups/McMMOXpBar.java @@ -0,0 +1,305 @@ +package com.gmail.nossr50.datatypes.spout.popups; + +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.spout.SpoutConfig; +import com.gmail.nossr50.datatypes.player.PlayerProfile; +import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.datatypes.spout.huds.HudType; +import com.gmail.nossr50.util.StringUtils; + +import org.getspout.spoutapi.gui.Color; +import org.getspout.spoutapi.gui.GenericGradient; +import org.getspout.spoutapi.gui.GenericTexture; +import org.getspout.spoutapi.gui.InGameHUD; +import org.getspout.spoutapi.gui.RenderPriority; +import org.getspout.spoutapi.gui.Widget; +import org.getspout.spoutapi.player.SpoutPlayer; + +public class McMMOXpBar { + private SpoutPlayer spoutPlayer; + private Widget xpBar; + + private GenericGradient xpFill; + private GenericGradient xpBackground; + private GenericGradient xpIconBackground; + private GenericGradient xpIconBorder; + private GenericTexture xpIcon; + + public McMMOXpBar(SpoutPlayer spoutPlayer, HudType hudType) { + this.spoutPlayer = spoutPlayer; + + switch (hudType) { + case RETRO: + initializeXpBarRetro(); + break; + + case STANDARD: + initializeXpBarStandard(); + break; + + case SMALL: + initializeXpBarSmall(); + break; + + case DISABLED: + break; + + default: + break; + } + + spoutPlayer.getMainScreen().setDirty(true); + } + + public void removeWidgets() { + InGameHUD inGameHud = spoutPlayer.getMainScreen(); + + if (xpBar != null) { + inGameHud.removeWidget(xpBar); + } + + if (xpFill != null) { + inGameHud.removeWidget(xpFill); + } + + if (xpBackground != null) { + inGameHud.removeWidget(xpBackground); + } + + if (xpIconBackground != null) { + inGameHud.removeWidget(xpIconBackground); + } + + if (xpIconBorder != null) { + inGameHud.removeWidget(xpIconBorder); + } + + if (xpIcon != null) { + inGameHud.removeWidget(xpIcon); + } + } + + /** + * Initialize Retro XP bar. + */ + private void initializeXpBarRetro() { + Color border = new Color((float) SpoutConfig.getInstance().getRetroHUDXPBorderRed(), (float) SpoutConfig.getInstance().getRetroHUDXPBorderGreen(), (float) SpoutConfig.getInstance().getRetroHUDXPBorderBlue(), 1f); + Color green = new Color(0f, 1f, 0f, 1f); + Color background = new Color((float) SpoutConfig.getInstance().getRetroHUDXPBackgroundRed(), (float) SpoutConfig.getInstance().getRetroHUDXPBackgroundGreen(), (float) SpoutConfig.getInstance().getRetroHUDXPBackgroundBlue(), 1f); + + xpBar = new GenericGradient(); + xpFill = new GenericGradient(); + xpBackground = new GenericGradient(); + + xpBar.setWidth(128); + xpBar.setHeight(4); + xpBar.setX(149); + xpBar.setY(10); + ((GenericGradient) xpBar).setBottomColor(border); + ((GenericGradient) xpBar).setTopColor(border); + xpBar.setPriority(RenderPriority.Highest); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpBar); + + xpFill.setWidth(0); + xpFill.setHeight(2); + xpFill.setX(150); + xpFill.setY(11); + xpFill.setBottomColor(green); + xpFill.setTopColor(green); + xpFill.setPriority(RenderPriority.Lowest); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpFill); + + xpBackground.setWidth(126); + xpBackground.setHeight(2); + xpBackground.setX(150); + xpBackground.setY(11); + xpBackground.setBottomColor(background); + xpBackground.setTopColor(background); + xpBackground.setPriority(RenderPriority.Low); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpBackground); + + if (SpoutConfig.getInstance().getXPBarIconEnabled()) { + Color darkbg = new Color(0.2f, 0.2f, 0.2f, 1f); + + xpIconBackground = new GenericGradient(); + xpIconBorder = new GenericGradient(); + xpIcon = new GenericTexture(); + + xpIconBackground.setBottomColor(darkbg); + xpIconBackground.setTopColor(darkbg); + xpIconBackground.setWidth(4); + xpIconBackground.setHeight(4); + xpIconBackground.setPriority(RenderPriority.High); + xpIconBackground.setX(142); + xpIconBackground.setY(10); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpIconBackground); + + xpIconBorder.setBottomColor(border); + xpIconBorder.setTopColor(border); + xpIconBorder.setWidth(6); + xpIconBorder.setHeight(6); + xpIconBorder.setPriority(RenderPriority.Highest); + xpIconBorder.setX(141); + xpIconBorder.setY(9); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpIconBorder); + + xpIcon.setWidth(6); + xpIcon.setHeight(6); + xpIcon.setX(141); + xpIcon.setY(9); + xpIcon.setPriority(RenderPriority.Normal); + xpIcon.setUrl("Icon_r.png"); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpIcon); + } + } + + /** + * Initialize Standard XP bar. + */ + private void initializeXpBarStandard() { + xpBar = new GenericTexture(); + + ((GenericTexture) xpBar).setUrl("xpbar_inc000.png"); + xpBar.setX(SpoutConfig.getInstance().getXPBarXPosition()); + xpBar.setY(SpoutConfig.getInstance().getXPBarYPosition()); + xpBar.setHeight(8); + xpBar.setWidth(256); + xpBar.setPriority(RenderPriority.Lowest); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpBar); + + if (SpoutConfig.getInstance().getXPBarIconEnabled()) { + xpIcon = new GenericTexture(); + + xpIcon.setUrl("Icon.png"); + xpIcon.setHeight(16); + xpIcon.setWidth(32); + xpIcon.setX(SpoutConfig.getInstance().getXPIconXPosition()); + xpIcon.setY(SpoutConfig.getInstance().getXPIconYPosition()); + xpIcon.setPriority(RenderPriority.High); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpIcon); + } + } + + /** + * Initialize Small XP bar. + */ + private void initializeXpBarSmall() { + xpBar = new GenericTexture(); + + ((GenericTexture) xpBar).setUrl("xpbar_inc000.png"); + xpBar.setX(427 / 2 - 64); + xpBar.setY(SpoutConfig.getInstance().getXPBarYPosition()); + xpBar.setHeight(4); + xpBar.setWidth(128); + xpBar.setPriority(RenderPriority.Lowest); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpBar); + + if (SpoutConfig.getInstance().getXPBarIconEnabled()) { + xpIcon = new GenericTexture(); + + xpIcon.setUrl("Icon.png"); + xpIcon.setHeight(8); + xpIcon.setWidth(16); + xpIcon.setX(427 / 2 - (8 + 64)); + xpIcon.setY(SpoutConfig.getInstance().getXPIconYPosition() + 2); + xpIcon.setPriority(RenderPriority.High); + spoutPlayer.getMainScreen().attachWidget(mcMMO.p, xpIcon); + } + } + + /** + * Update the XP bar. + * + * @param skillType The skill last used + * @param playerProfile The profile of the player whose XP bar should be updated + */ + public void update(SkillType skillType, PlayerProfile playerProfile) { + switch (playerProfile.getHudType()) { + case RETRO: + updateXpBarRetro(skillType, playerProfile); + break; + + case STANDARD: + case SMALL: + updateXpBarStandard(skillType, playerProfile); + break; + + case DISABLED: + break; + + default: + break; + } + } + + /** + * Update XP bar for Standard & Small styles. + * + * @param skillType The skill last used + * @param playerProfile The profile of the player whose XP bar should be updated + */ + private void updateXpBarStandard(SkillType skillType, PlayerProfile playerProfile) { + xpIcon.setUrl(StringUtils.getCapitalized(skillType.toString()) + ".png"); + + ((GenericTexture) xpBar).setUrl(getUrlBar(getXpInc(playerProfile.getSkillXpLevel(skillType), playerProfile.getXpToLevel(skillType), HudType.STANDARD))); + + spoutPlayer.getMainScreen().setDirty(true); + } + + /** + * Update XP bar for Retro styles. + * + * @param skillType The skill last used + * @param playerProfile The profile of the player whose XP bar should be updated + */ + private void updateXpBarRetro(SkillType skillType, PlayerProfile playerProfile) { + Color color = getRetroColor(skillType); + + xpIcon.setUrl(StringUtils.getCapitalized(skillType.toString()) + "_r.png"); + + xpFill.setBottomColor(color); + xpFill.setTopColor(color); + xpFill.setWidth(getXpInc(playerProfile.getSkillXpLevel(skillType), playerProfile.getXpToLevel(skillType), HudType.RETRO)); + + spoutPlayer.getMainScreen().setDirty(true); + } + + private static Color getRetroColor(SkillType type) { + return new Color((float) SpoutConfig.getInstance().getRetroHUDRed(type), (float) SpoutConfig.getInstance().getRetroHUDGreen(type), (float) SpoutConfig.getInstance().getRetroHUDBlue(type), 1f); + } + + private static String getUrlBar(Integer number) { + char[] num = number.toString().toCharArray(); + + switch (num.length) { + case 1: + return "xpbar_inc00" + number + ".png"; + + case 2: + return "xpbar_inc0" + number + ".png"; + + default: + return "xpbar_inc" + number + ".png"; + } + } + + private static Integer getXpInc(int skillXp, int xpToLevel, HudType hudType) { + double percentage = (double) skillXp / xpToLevel; + double inc; + + switch (hudType) { + case RETRO: + inc = 0.0079365079365079; + break; + + case STANDARD: + inc = 0.0039370078740157; + break; + + default: + return 1; + } + + return (int) (percentage / inc); + } +} diff --git a/src/main/java/com/gmail/nossr50/listeners/SpoutListener.java b/src/main/java/com/gmail/nossr50/listeners/SpoutListener.java new file mode 100644 index 000000000..b110707e8 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/listeners/SpoutListener.java @@ -0,0 +1,95 @@ +package com.gmail.nossr50.listeners; + +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; + +import com.gmail.nossr50.config.spout.SpoutConfig; +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.datatypes.spout.buttons.McMMOButton; +import com.gmail.nossr50.datatypes.spout.huds.McMMOHud; +import com.gmail.nossr50.datatypes.spout.popups.McMMOMenu; +import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.util.player.UserManager; + +import org.getspout.spoutapi.event.input.KeyPressedEvent; +import org.getspout.spoutapi.event.screen.ButtonClickEvent; +import org.getspout.spoutapi.event.screen.ScreenCloseEvent; +import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent; +import org.getspout.spoutapi.gui.Button; +import org.getspout.spoutapi.gui.ScreenType; +import org.getspout.spoutapi.player.SpoutPlayer; + +public class SpoutListener implements Listener { + + /** + * Monitor SpoutCraftEnable events. + * + * @param event The event to watch + */ + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + public void onSpoutCraftEnable(SpoutCraftEnableEvent event) { + SpoutPlayer spoutPlayer = event.getPlayer(); + McMMOPlayer mcMMOPlayer = UserManager.getPlayer(spoutPlayer); + + mcMMOPlayer.setIsSpoutPlayer(true); + + // TODO: Add custom titles based on skills + if (SpoutConfig.getInstance().getShowPowerLevel()) { + spoutPlayer.setTitle(LocaleLoader.getString("Spout.Title", spoutPlayer.getTitle(), mcMMOPlayer.getPowerLevel())); + } + + mcMMOPlayer.getProfile().setSpoutHud(new McMMOHud(mcMMOPlayer)); // Setup Party HUD stuff + } + + /** + * Monitor Spout ButtonClick events. + * + * @param event The event to watch + */ + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + public void onButtonClick(ButtonClickEvent event) { + Button button = event.getButton(); + + if (button instanceof McMMOButton) { + ((McMMOButton) button).activate(); + } + } + + /** + * Monitor Spout ScreenClose events. + * + * @param event The event to watch + */ + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + public void onScreenClose(ScreenCloseEvent event) { + if (event.getScreen() instanceof McMMOMenu) { + SpoutPlayer spoutPlayer = event.getPlayer(); + + UserManager.getPlayer(spoutPlayer).getProfile().getSpoutHud().onMenuClose(); + spoutPlayer.getMainScreen().setDirty(true); + } + } + + /** + * Monitor Spout KeyPressed events. + * + * @param event The event to watch + */ + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) + public void onKeyPressedEvent(KeyPressedEvent event) { + SpoutPlayer spoutPlayer = event.getPlayer(); + + if (spoutPlayer.getMainScreen().getActivePopup() != null || event.getScreenType() != ScreenType.GAME_SCREEN) { + return; + } + + if (event.getKey() == SpoutConfig.getInstance().getMenuKey()) { + McMMOHud spoutHud = UserManager.getPlayer(spoutPlayer).getProfile().getSpoutHud(); + + if (!spoutHud.isMenuOpened()) { + spoutHud.openMenu(); + } + } + } +} diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 4cbee75a0..95cc43185 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -5,11 +5,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import com.gmail.nossr50.config.mods.ArmorConfigManager; -import com.gmail.nossr50.config.mods.BlockConfigManager; -import com.gmail.nossr50.config.mods.EntityConfigManager; -import com.gmail.nossr50.config.mods.ToolConfigManager; -import com.gmail.nossr50.util.ModManager; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.metadata.FixedMetadataValue; @@ -19,8 +14,13 @@ import org.bukkit.plugin.java.JavaPlugin; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.HiddenConfig; +import com.gmail.nossr50.config.mods.ArmorConfigManager; +import com.gmail.nossr50.config.mods.BlockConfigManager; +import com.gmail.nossr50.config.mods.EntityConfigManager; +import com.gmail.nossr50.config.mods.ToolConfigManager; import com.gmail.nossr50.config.skills.alchemy.PotionConfig; import com.gmail.nossr50.config.skills.repair.RepairConfigManager; +import com.gmail.nossr50.config.spout.SpoutConfig; import com.gmail.nossr50.config.treasure.TreasureConfig; import com.gmail.nossr50.database.DatabaseManager; import com.gmail.nossr50.database.DatabaseManagerFactory; @@ -29,6 +29,7 @@ import com.gmail.nossr50.listeners.EntityListener; import com.gmail.nossr50.listeners.InventoryListener; import com.gmail.nossr50.listeners.PlayerListener; import com.gmail.nossr50.listeners.SelfListener; +import com.gmail.nossr50.listeners.SpoutListener; import com.gmail.nossr50.listeners.WorldListener; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.metrics.MetricsManager; @@ -48,6 +49,7 @@ import com.gmail.nossr50.util.ChimaeraWing; import com.gmail.nossr50.util.HolidayManager; import com.gmail.nossr50.util.LogFilter; import com.gmail.nossr50.util.Misc; +import com.gmail.nossr50.util.ModManager; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManager; import com.gmail.nossr50.util.blockmeta.chunkmeta.ChunkManagerFactory; @@ -55,6 +57,7 @@ import com.gmail.nossr50.util.commands.CommandRegistrationManager; import com.gmail.nossr50.util.experience.FormulaManager; import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.scoreboards.ScoreboardManager; +import com.gmail.nossr50.util.spout.SpoutUtils; import net.gravitydevelopment.updater.mcmmo.Updater; import net.gravitydevelopment.updater.mcmmo.Updater.UpdateResult; @@ -85,6 +88,7 @@ public class mcMMO extends JavaPlugin { private boolean updateAvailable; /* Plugin Checks */ + private static boolean spoutEnabled; private static boolean combatTagEnabled; private static boolean healthBarPluginEnabled; private static boolean noCheatPlusPluginEnabled; @@ -125,6 +129,7 @@ public class mcMMO extends JavaPlugin { getLogger().setFilter(new LogFilter(this)); metadataValue = new FixedMetadataValue(this, true); + setupSpout(); mcpcEnabled = getServer().getName().equals("MCPC+"); combatTagEnabled = getServer().getPluginManager().getPlugin("CombatTag") != null; healthBarPluginEnabled = getServer().getPluginManager().getPlugin("HealthBar") != null; @@ -307,6 +312,10 @@ public class mcMMO extends JavaPlugin { mcMMO.databaseManager = databaseManager; } + public static boolean isSpoutEnabled() { + return spoutEnabled; + } + public static boolean isCombatTagEnabled() { return combatTagEnabled; } @@ -435,6 +444,19 @@ public class mcMMO extends JavaPlugin { repairableManager.registerRepairables(repairables); } + private void setupSpout() { + if (!getServer().getPluginManager().isPluginEnabled("Spout")) { + return; + } + + spoutEnabled = true; + + SpoutConfig.getInstance(); + getServer().getPluginManager().registerEvents(new SpoutListener(), this); + SpoutUtils.preCacheFiles(); + SpoutUtils.reloadSpoutPlayers(); // Handle spout players after a /reload + } + private void registerEvents() { PluginManager pluginManager = getServer().getPluginManager(); diff --git a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java index 6ae2c034f..862531cea 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -48,6 +48,18 @@ public class Repair { return ""; } + public static String[] getSpoutAnvilMessages(Material type) { + if (type == repairAnvilMaterial) { + return new String[]{LocaleLoader.getString("Repair.AnvilPlaced.Spout1"), LocaleLoader.getString("Repair.AnvilPlaced.Spout2")}; + } + + if (type == salvageAnvilMaterial) { + return new String[]{"[mcMMO] Anvil Placed", "Right click to salvage!"}; + } + + return new String[]{"", ""}; + } + protected static Material getRepairAndSalvageItem(ItemStack inHand) { if (ItemUtils.isDiamondTool(inHand) || ItemUtils.isDiamondArmor(inHand)) { return Material.DIAMOND; diff --git a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java index cf207ab73..70d8e2860 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -27,6 +27,7 @@ import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.StringUtils; import com.gmail.nossr50.util.skills.SkillUtils; +import com.gmail.nossr50.util.spout.SpoutUtils; public class RepairManager extends SkillManager { private boolean placedRepairAnvil; @@ -51,7 +52,12 @@ public class RepairManager extends SkillManager { } if (Repair.anvilMessagesEnabled) { - player.sendMessage(Repair.getAnvilMessage(anvilType)); + if (mcMMOPlayer.isSpoutPlayer()) { + SpoutUtils.sendRepairNotifications(player, anvilType); + } + else { + player.sendMessage(Repair.getAnvilMessage(anvilType)); + } } if (Config.getInstance().getRepairAnvilPlaceSoundsEnabled()) { diff --git a/src/main/java/com/gmail/nossr50/util/ItemUtils.java b/src/main/java/com/gmail/nossr50/util/ItemUtils.java index 1116018e8..064ff3ee2 100644 --- a/src/main/java/com/gmail/nossr50/util/ItemUtils.java +++ b/src/main/java/com/gmail/nossr50/util/ItemUtils.java @@ -10,7 +10,9 @@ import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.material.Dye; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.api.SpoutToolsAPI; import com.gmail.nossr50.config.party.ItemWeightConfig; +import com.gmail.nossr50.datatypes.skills.ToolType; import com.gmail.nossr50.locale.LocaleLoader; public final class ItemUtils { @@ -52,7 +54,7 @@ public final class ItemUtils { return true; default: - return mcMMO.getModManager().isCustomSword(type); + return mcMMO.getModManager().isCustomSword(type) || SpoutToolsAPI.isSpoutTool(item, ToolType.SWORD); } } @@ -74,7 +76,7 @@ public final class ItemUtils { return true; default: - return mcMMO.getModManager().isCustomHoe(type); + return mcMMO.getModManager().isCustomHoe(type) || SpoutToolsAPI.isSpoutTool(item, ToolType.HOE); } } @@ -96,7 +98,7 @@ public final class ItemUtils { return true; default: - return mcMMO.getModManager().isCustomShovel(type); + return mcMMO.getModManager().isCustomShovel(type) || SpoutToolsAPI.isSpoutTool(item, ToolType.SHOVEL); } } @@ -118,7 +120,7 @@ public final class ItemUtils { return true; default: - return mcMMO.getModManager().isCustomAxe(type); + return mcMMO.getModManager().isCustomAxe(type) || SpoutToolsAPI.isSpoutTool(item, ToolType.AXE); } } @@ -140,7 +142,7 @@ public final class ItemUtils { return true; default: - return mcMMO.getModManager().isCustomPickaxe(type); + return mcMMO.getModManager().isCustomPickaxe(type) || SpoutToolsAPI.isSpoutTool(item, ToolType.PICKAXE); } } diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index 5c860b1e5..cea57407a 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -13,8 +13,11 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.datatypes.spout.huds.McMMOHud; import com.gmail.nossr50.events.items.McMMOItemSpawnEvent; import com.gmail.nossr50.util.player.UserManager; +import com.gmail.nossr50.util.spout.SpoutUtils; public final class Misc { private static Random random = new Random(); @@ -150,10 +153,22 @@ public final class Misc { public static void profileCleanup(String playerName) { Player player = mcMMO.p.getServer().getPlayerExact(playerName); + McMMOPlayer mcMMOPlayer = UserManager.getPlayer(player); + McMMOHud spoutHud = mcMMOPlayer.getProfile().getSpoutHud(); + + if (spoutHud != null) { + spoutHud.removeWidgets(); + } + + UserManager.remove(playerName); if (player != null) { UserManager.remove(player); UserManager.addUser(player); + + if (mcMMO.isSpoutEnabled()) { + SpoutUtils.reloadSpoutPlayer(player); + } } } diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java index e23b4d452..45a8c3aa7 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java @@ -48,6 +48,8 @@ import com.gmail.nossr50.commands.skills.SwordsCommand; import com.gmail.nossr50.commands.skills.TamingCommand; import com.gmail.nossr50.commands.skills.UnarmedCommand; import com.gmail.nossr50.commands.skills.WoodcuttingCommand; +import com.gmail.nossr50.commands.spout.MchudCommand; +import com.gmail.nossr50.commands.spout.XplockCommand; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.locale.LocaleLoader; @@ -326,6 +328,26 @@ public final class CommandRegistrationManager { command.setExecutor(new PartyChatCommand()); } + private static void registerMchudCommand() { + PluginCommand command = mcMMO.p.getCommand("mchud"); + command.setDescription(LocaleLoader.getString("Commands.Description.mchud")); + command.setPermission("mcmmo.commands.mchud"); + command.setPermissionMessage(permissionsMessage); + command.setUsage(LocaleLoader.getString("Commands.Usage.1", "mchud", "")); + command.setExecutor(new MchudCommand()); + } + + private static void registerXplockCommand() { + PluginCommand command = mcMMO.p.getCommand("xplock"); + command.setDescription(LocaleLoader.getString("Commands.Description.xplock")); + command.setPermission("mcmmo.commands.xplock"); + command.setPermissionMessage(permissionsMessage); + command.setUsage(LocaleLoader.getString("Commands.Usage.0", "xplock")); + command.setUsage(command.getUsage() + "\n" + LocaleLoader.getString("Commands.Usage.1", "xplock", "")); + command.setUsage(command.getUsage() + "\n" + LocaleLoader.getString("Commands.Usage.1", "xplock", "<" + LocaleLoader.getString("Commands.Usage.Skill") + ">")); + command.setExecutor(new XplockCommand()); + } + private static void registerPartyCommand() { PluginCommand command = mcMMO.p.getCommand("party"); command.setDescription(LocaleLoader.getString("Commands.Description.party")); @@ -449,5 +471,9 @@ public final class CommandRegistrationManager { // Skill Commands registerSkillCommands(); + + // Spout Commands + registerXplockCommand(); + registerMchudCommand(); } } diff --git a/src/main/java/com/gmail/nossr50/util/spout/SpoutUtils.java b/src/main/java/com/gmail/nossr50/util/spout/SpoutUtils.java new file mode 100644 index 000000000..61be19bfd --- /dev/null +++ b/src/main/java/com/gmail/nossr50/util/spout/SpoutUtils.java @@ -0,0 +1,475 @@ +package com.gmail.nossr50.util.spout; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.jar.JarFile; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.entity.Player; +import org.bukkit.plugin.PluginManager; + +import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.spout.SpoutConfig; +import com.gmail.nossr50.datatypes.player.McMMOPlayer; +import com.gmail.nossr50.datatypes.player.PlayerProfile; +import com.gmail.nossr50.datatypes.skills.SkillType; +import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.skills.repair.Repair; +import com.gmail.nossr50.util.StringUtils; +import com.gmail.nossr50.util.player.UserManager; +import com.gmail.nossr50.util.skills.SkillUtils; + +import org.getspout.spoutapi.SpoutManager; +import org.getspout.spoutapi.event.spout.SpoutCraftEnableEvent; +import org.getspout.spoutapi.player.SpoutPlayer; + +public class SpoutUtils { + // The order of the values is extremely important, a few methods depend on it to work properly + protected enum Tier { + FOUR(4) { + @Override public int getLevel() { return SpoutConfig.getInstance().getNotificationTier4(); } + @Override protected Material getAcrobaticsNotificationItem() { return Material.DIAMOND_BOOTS; } + @Override protected Material getArcheryNotificationItem() { return Material.BOW; } + @Override protected Material getAxesNotificationItem() { return Material.DIAMOND_AXE; } + @Override protected Material getExcavationNotificationItem() { return Material.CLAY; } + @Override protected Material getFishingNotificationItem() { return Material.FISHING_ROD; } + @Override protected Material getHerbalismNotificationItem() { return Material.WATER_LILY; } + @Override protected Material getMiningNotificationItem() { return Material.EMERALD_ORE; } + @Override protected Material getSwordsNotificationItem() { return Material.DIAMOND_SWORD; } + @Override protected Material getTamingNotificationItem() { return Material.BONE; } + @Override protected Material getUnarmedNotificationItem() { return Material.DIAMOND_HELMET; } + @Override protected Material getWoodcuttingNotificationItem() { return Material.LOG; }}, + THREE(3) { + @Override public int getLevel() { return SpoutConfig.getInstance().getNotificationTier3(); } + @Override protected Material getAcrobaticsNotificationItem() { return Material.GOLD_BOOTS; } + @Override protected Material getArcheryNotificationItem() { return Material.ARROW; } + @Override protected Material getAxesNotificationItem() { return Material.GOLD_AXE; } + @Override protected Material getExcavationNotificationItem() { return Material.SAND; } + @Override protected Material getFishingNotificationItem() { return Material.COOKED_FISH; } + @Override protected Material getHerbalismNotificationItem() { return Material.RED_ROSE; } + @Override protected Material getMiningNotificationItem() { return Material.DIAMOND_ORE; } + @Override protected Material getSwordsNotificationItem() { return Material.GOLD_SWORD; } + @Override protected Material getTamingNotificationItem() { return Material.GRILLED_PORK; } + @Override protected Material getUnarmedNotificationItem() { return Material.GOLD_HELMET; } + @Override protected Material getWoodcuttingNotificationItem() { return Material.WOOD; }}, + TWO(2) { + @Override public int getLevel() { return SpoutConfig.getInstance().getNotificationTier2(); } + @Override protected Material getAcrobaticsNotificationItem() { return Material.IRON_BOOTS; } + @Override protected Material getArcheryNotificationItem() { return Material.ARROW; } + @Override protected Material getAxesNotificationItem() { return Material.IRON_AXE; } + @Override protected Material getExcavationNotificationItem() { return Material.GRAVEL; } + @Override protected Material getFishingNotificationItem() { return Material.COOKED_FISH; } + @Override protected Material getHerbalismNotificationItem() { return Material.YELLOW_FLOWER; } + @Override protected Material getMiningNotificationItem() { return Material.GOLD_ORE; } + @Override protected Material getSwordsNotificationItem() { return Material.IRON_SWORD; } + @Override protected Material getTamingNotificationItem() { return Material.GRILLED_PORK; } + @Override protected Material getUnarmedNotificationItem() { return Material.IRON_HELMET; } + @Override protected Material getWoodcuttingNotificationItem() { return Material.LEAVES; }}, + ONE(1) { + @Override public int getLevel() { return SpoutConfig.getInstance().getNotificationTier1(); } + @Override protected Material getAcrobaticsNotificationItem() { return Material.CHAINMAIL_BOOTS; } + @Override protected Material getArcheryNotificationItem() { return Material.FLINT; } + @Override protected Material getAxesNotificationItem() { return Material.STONE_AXE; } + @Override protected Material getExcavationNotificationItem() { return Material.GRASS; } + @Override protected Material getFishingNotificationItem() { return Material.RAW_FISH; } + @Override protected Material getHerbalismNotificationItem() { return Material.CACTUS; } + @Override protected Material getMiningNotificationItem() { return Material.IRON_ORE; } + @Override protected Material getSwordsNotificationItem() { return Material.STONE_SWORD; } + @Override protected Material getTamingNotificationItem() { return Material.PORK; } + @Override protected Material getUnarmedNotificationItem() { return Material.CHAINMAIL_HELMET; } + @Override protected Material getWoodcuttingNotificationItem() { return Material.SAPLING; }}; + + int numerical; + + private Tier(int numerical) { + this.numerical = numerical; + } + + public int toNumerical() { + return numerical; + } + + abstract protected int getLevel(); + abstract protected Material getAcrobaticsNotificationItem(); + abstract protected Material getArcheryNotificationItem(); + abstract protected Material getAxesNotificationItem(); + abstract protected Material getExcavationNotificationItem(); + abstract protected Material getFishingNotificationItem(); + abstract protected Material getHerbalismNotificationItem(); + abstract protected Material getMiningNotificationItem(); + abstract protected Material getSwordsNotificationItem(); + abstract protected Material getTamingNotificationItem(); + abstract protected Material getUnarmedNotificationItem(); + abstract protected Material getWoodcuttingNotificationItem(); + } + + private final static String spoutDirectory = mcMMO.getMainDirectory() + "Resources" + File.separator; + private final static String hudDirectory = spoutDirectory + "HUD" + File.separator; + private final static String hudStandardDirectory = hudDirectory + "Standard" + File.separator; + private final static String hudRetroDirectory = hudDirectory + "Retro" + File.separator; + private final static String soundDirectory = spoutDirectory + "Sound" + File.separator; + + /** + * Write file to disk. + * + * @param fileName The name of the file + * @param filePath The name of the file path + */ + private static File writeFile(String fileName, String filePath) { + File currentFile = new File(filePath + fileName); + BufferedOutputStream os = null; + JarFile jar = null; + + // No point in writing the file again if it already exists. + if (currentFile.exists()) { + return currentFile; + } + + try { + jar = new JarFile(mcMMO.mcmmo); + + @SuppressWarnings("resource") + InputStream is = jar.getInputStream(jar.getJarEntry("resources/" + fileName)); + + byte[] buf = new byte[2048]; + int nbRead; + + os = new BufferedOutputStream(new FileOutputStream(currentFile)); + + while ((nbRead = is.read(buf)) != -1) { + os.write(buf, 0, nbRead); + } + } + catch (FileNotFoundException e) { + e.printStackTrace(); + } + catch (IOException e) { + e.printStackTrace(); + } + finally { + if (jar != null) { + try { + jar.close(); + } + catch (IOException ex) { + ex.printStackTrace(); + } + } + if (os != null) { + try { + os.close(); + } + catch (IOException ex) { + ex.printStackTrace(); + } + } + } + + return currentFile; + } + + /** + * Extract Spout files to the Resources directory. + */ + public static ArrayList extractFiles() { + ArrayList files = new ArrayList(); + + // Setup directories + new File(spoutDirectory).mkdir(); + new File(hudDirectory).mkdir(); + new File(hudStandardDirectory).mkdir(); + new File(hudRetroDirectory).mkdir(); + new File(soundDirectory).mkdir(); + + // XP Bar images + for (int x = 0; x < 255; x++) { + String fileName; + + if (x < 10) { + fileName = "xpbar_inc00" + x + ".png"; + } + else if (x < 100) { + fileName = "xpbar_inc0" + x + ".png"; + } + else { + fileName = "xpbar_inc" + x + ".png"; + } + + files.add(writeFile(fileName, hudStandardDirectory)); + } + + // Standard XP Icons + for (SkillType skillType : SkillType.NON_CHILD_SKILLS) { + String skillName = StringUtils.getCapitalized(skillType.toString()); + + files.add(writeFile(skillName + ".png", hudStandardDirectory)); + files.add(writeFile(skillName + "_r.png", hudRetroDirectory)); + } + + // Blank icons + files.add(writeFile("Icon.png", hudStandardDirectory)); + files.add(writeFile("Icon_r.png", hudRetroDirectory)); + + // Sound FX + files.add(writeFile("level.wav", soundDirectory)); + + return files; + } + + /** + * Handle level-up notifications through Spout. + * + * @param skillType The skill that leveled up + * @param spoutPlayer The player that leveled up + */ + public static void levelUpNotification(SkillType skillType, SpoutPlayer spoutPlayer) { + PlayerProfile profile = UserManager.getPlayer(spoutPlayer).getProfile(); + int skillLevel = profile.getSkillLevel(skillType); + Material notificationItem; + + switch (skillType) { + case ACROBATICS: + notificationItem = getAcrobaticsNotificationItem(skillLevel); + break; + + case ARCHERY: + notificationItem = getArcheryNotificationItem(skillLevel); + break; + + case AXES: + notificationItem = getAxesNotificationItem(skillLevel); + break; + + case EXCAVATION: + notificationItem = getExcavationNotificationItem(skillLevel); + break; + + case FISHING: + notificationItem = getFishingNotificationItem(skillLevel); + break; + + case HERBALISM: + notificationItem = getHerbalismNotificationItem(skillLevel); + break; + + case MINING: + notificationItem = getMiningNotificationItem(skillLevel); + break; + + case REPAIR: + notificationItem = Material.ANVIL; + break; + + case SWORDS: + notificationItem = getSwordsNotificationItem(skillLevel); + break; + + case TAMING: + notificationItem = getTamingNotificationItem(skillLevel); + break; + + case UNARMED: + notificationItem = getUnarmedNotificationItem(skillLevel); + break; + + case WOODCUTTING: + notificationItem = getWoodcuttingNotificationItem(skillLevel); + break; + + default: + notificationItem = Material.MAP; + break; + } + + spoutPlayer.sendNotification(LocaleLoader.getString("Spout.LevelUp.1"), LocaleLoader.getString("Spout.LevelUp.2", skillType.getName(), skillLevel), notificationItem); + SpoutManager.getSoundManager().playCustomSoundEffect(mcMMO.p, spoutPlayer, "level.wav", false); + } + + private static Material getAcrobaticsNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getAcrobaticsNotificationItem(); + } + } + + return Material.LEATHER_BOOTS; + } + + private static Material getArcheryNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getArcheryNotificationItem(); + } + } + + return Material.FEATHER; + } + + private static Material getAxesNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getAxesNotificationItem(); + } + } + + return Material.WOOD_AXE; + } + + private static Material getExcavationNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getExcavationNotificationItem(); + } + } + + return Material.DIRT; + } + + private static Material getFishingNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getFishingNotificationItem(); + } + } + + return Material.RAW_FISH; + } + + private static Material getHerbalismNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getHerbalismNotificationItem(); + } + } + + return Material.VINE; + } + + private static Material getMiningNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getMiningNotificationItem(); + } + } + + return Material.COAL_ORE; + } + + private static Material getSwordsNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getSwordsNotificationItem(); + } + } + + return Material.WOOD_SWORD; + } + + private static Material getTamingNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getTamingNotificationItem(); + } + } + + return Material.PORK; + } + + private static Material getUnarmedNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getUnarmedNotificationItem(); + } + } + + return Material.LEATHER_HELMET; + } + + private static Material getWoodcuttingNotificationItem(int skillLevel) { + for (Tier tier : Tier.values()) { + if (skillLevel >= tier.getLevel()) { + return tier.getWoodcuttingNotificationItem(); + } + } + + return Material.STICK; + } + + /** + * Re-enable SpoutCraft for players after a /reload + */ + public static void reloadSpoutPlayers() { + PluginManager pluginManager = mcMMO.p.getServer().getPluginManager(); + + for (SpoutPlayer spoutPlayer : SpoutManager.getPlayerChunkMap().getOnlinePlayers()) { + pluginManager.callEvent(new SpoutCraftEnableEvent(spoutPlayer)); + } + } + + public static void reloadSpoutPlayer(Player player) { + SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player); + + if (spoutPlayer != null) { + mcMMO.p.getServer().getPluginManager().callEvent(new SpoutCraftEnableEvent(spoutPlayer)); + } + } + + public static void preCacheFiles() { + SpoutManager.getFileManager().addToPreLoginCache(mcMMO.p, extractFiles()); + } + + public static void processLevelup(McMMOPlayer mcMMOPlayer, SkillType skillType, int levelsGained) { + Player player = mcMMOPlayer.getPlayer(); + SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player); + + if (spoutPlayer.isSpoutCraftEnabled()) { + levelUpNotification(skillType, spoutPlayer); + + /* Update custom titles */ + if (SpoutConfig.getInstance().getShowPowerLevel()) { + spoutPlayer.setTitle(LocaleLoader.getString("Spout.Title", spoutPlayer.getName(), mcMMOPlayer.getPowerLevel())); + } + } + else { + player.sendMessage(LocaleLoader.getString(StringUtils.getCapitalized(skillType.toString()) + ".Skillup", levelsGained, mcMMOPlayer.getProfile().getSkillLevel(skillType))); + } + } + + public static void processXpGain(Player player, PlayerProfile profile) { + SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player); + + if (spoutPlayer.isSpoutCraftEnabled() && SpoutConfig.getInstance().getXPBarEnabled()) { + profile.getSpoutHud().updateXpBar(); + } + } + + public static void sendRepairNotifications(Player player, Material anvilType) { + SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player); + + if (spoutPlayer.isSpoutCraftEnabled()) { + String[] spoutMessages = Repair.getSpoutAnvilMessages(anvilType); + spoutPlayer.sendNotification(spoutMessages[0], spoutMessages[1], anvilType); + } + else { + player.sendMessage(Repair.getAnvilMessage(anvilType)); + } + } + + public static void sendDonationNotification(Player player) { + SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player); + + if (spoutPlayer.isSpoutCraftEnabled()) { + spoutPlayer.sendNotification(LocaleLoader.getString("Spout.Donate"), ChatColor.GREEN + "gjmcferrin@gmail.com", Material.DIAMOND); + } + else { + player.sendMessage(LocaleLoader.getString("MOTD.Donate")); + player.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "gjmcferrin@gmail.com" + ChatColor.GOLD + " Paypal"); + } + } +} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 670d3b44b..cc77b3519 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,24 +1,30 @@ name: mcMMO version: ${project.version}-b${BUILD_NUMBER} description: > - The goal of mcMMO is to take core Minecraft game mechanics and expand them into - add an extensive and quality RPG experience. Everything in mcMMO has been carefully - thought out and is constantly being improved upon. Currently, mcMMO adds thirteen - unique skills to train and level in. Each of these skills is highly customizable - through our configuration files, allowing server admins to tweak mcMMO to best suit - the needs of his or her server. Know that the mcMMO team is dedicated to providing - an ever-evolving experience, and that we carefully read all feedback and bug reports - in order to evaluate and balance the mechanics of mcMMO in every update. + mcMMO takes core Minecraft game mechanics and expands them to add an extensive + RPG experience, the goal of the project has always been a quality RPG + experience. Everything in mcMMO is carefully thought out and is constantly + improving. mcMMO adds eleven skills to train in and level in, while also + offering a high level of customization for server admins. There are countless + features, including custom sounds, graphical elements, and more added when + running mcMMO in conjunction with Spout. I carefully read feedback and + evaluate the mechanics of mcMMO in every update to provide an ever-evolving + experience. author: nossr50 authors: [GJ, NuclearW, bm01, Glitchfinder, TfT_02, t00thpick1, Riking] website: http://dev.bukkit.org/server-mods/mcmmo/ main: com.gmail.nossr50.mcMMO -softdepend: [CombatTag, HealthBar] +softdepend: [Spout, CombatTag, HealthBar] load: STARTUP commands: + mchud: + description: Change your HUD + xplock: + aliases: [mcxplock] + description: Lock your mcMMO XP bar xprate: aliases: [mcxprate] description: Modify the xp rate or start an event @@ -652,6 +658,7 @@ permissions: mcmmo.commands.inspect: true mcmmo.commands.mcability: true mcmmo.commands.mccooldown: true + mcmmo.commands.mchud: true mcmmo.commands.mcmmo.all: true mcmmo.commands.mcnotify: true mcmmo.commands.mcrank: true @@ -668,6 +675,7 @@ permissions: mcmmo.commands.taming: true mcmmo.commands.unarmed: true mcmmo.commands.woodcutting: true + mcmmo.commands.xplock.all: true mcmmo.commands.defaultsop: description: Implies all default op mcmmo.commands permissions. children: @@ -796,6 +804,8 @@ permissions: description: Allows access to the mcgod command mcmmo.commands.mcgod.others: description: Allows access to the mcgod command for other players + mcmmo.commands.mchud: + description: Allows access to the mchud command mcmmo.commands.mcmmo.*: default: false description: Implies access to all mcmmo.commands.mcmmo permissions @@ -1151,6 +1161,56 @@ permissions: description: Allows access to the vampirism command to toggle vampirism on/off mcmmo.commands.woodcutting: description: Allows access to the woodcutting command + mcmmo.commands.xplock.*: + default: false + description: Implies access to all mcmmo.commands.xplock permissions + children: + mcmmo.commands.xplock.all: true + mcmmo.commands.xplock.all: + description: Implies access to all mcmmo.commands.xplock permissions + children: + mcmmo.commands.xplock: true + mcmmo.commands.xplock.acrobatics: true + mcmmo.commands.xplock.archery: true + mcmmo.commands.xplock.axes: true + mcmmo.commands.xplock.excavation: true + mcmmo.commands.xplock.fishing: true + mcmmo.commands.xplock.herbalism: true + mcmmo.commands.xplock.mining: true + mcmmo.commands.xplock.repair: true + mcmmo.commands.xplock.smelting: true + mcmmo.commands.xplock.swords: true + mcmmo.commands.xplock.taming: true + mcmmo.commands.xplock.unarmed: true + mcmmo.commands.xplock.woodcutting: true + mcmmo.commands.xplock: + description: Allows access to the xplock command + mcmmo.commands.xplock.acrobatics: + description: Allows access to the xplock command for acrobatics + mcmmo.commands.xplock.archery: + description: Allows access to the xplock command for archery + mcmmo.commands.xplock.axes: + description: Allows access to the xplock command for axes + mcmmo.commands.xplock.excavation: + description: Allows access to the xplock command for excavation + mcmmo.commands.xplock.fishing: + description: Allows access to the xplock command for fishing + mcmmo.commands.xplock.herbalism: + description: Allows access to the xplock command for herbalism + mcmmo.commands.xplock.mining: + description: Allows access to the xplock command for mining + mcmmo.commands.xplock.repair: + description: Allows access to the xplock command for repair + mcmmo.commands.xplock.smelting: + description: Allows access to the xplock command for smelting + mcmmo.commands.xplock.swords: + description: Allows access to the xplock command for swords + mcmmo.commands.xplock.taming: + description: Allows access to the xplock command for taming + mcmmo.commands.xplock.unarmed: + description: Allows access to the xplock command for unarmed + mcmmo.commands.xplock.woodcutting: + description: Allows access to the xplock command for woodcutting mcmmo.commands.xprate.*: default: false description: Implies access to all mcmmo.commands.xprate permissions @@ -1872,71 +1932,87 @@ permissions: children: mcmmo.ability.acrobatics.all: true mcmmo.commands.acrobatics: true +<<<<<<< HEAD mcmmo.skills.alchemy: description: Allows access to the Alchemy skill children: mcmmo.ability.alchemy.all: true mcmmo.commands.alchemy: true +======= + mcmmo.commands.xplock.acrobatics: true +>>>>>>> Revert "Dropped SpoutPlugin support" mcmmo.skills.archery: description: Allows access to the Archery skill children: mcmmo.ability.archery.all: true mcmmo.commands.archery: true + mcmmo.commands.xplock.archery: true mcmmo.skills.axes: description: Allows access to the Axes skill children: mcmmo.ability.axes.all: true mcmmo.commands.axes: true + mcmmo.commands.xplock.axes: true mcmmo.skills.excavation: description: Allows access to the Excavation skill children: mcmmo.ability.excavation.all: true mcmmo.commands.excavation: true + mcmmo.commands.xplock.excavation: true mcmmo.skills.fishing: description: Allows access to the Fishing skill children: mcmmo.ability.fishing.all: true mcmmo.commands.fishing: true + mcmmo.commands.xplock.fishing: true mcmmo.skills.herbalism: description: Allows access to the Herbalism skill children: mcmmo.ability.herbalism.all: true mcmmo.commands.herbalism: true + mcmmo.commands.xplock.herbalism: true mcmmo.skills.mining: description: Allows access to the Mining skill children: mcmmo.ability.mining.all: true mcmmo.commands.mining: true + mcmmo.commands.xplock.mining: true mcmmo.skills.repair: description: Allows access to the Repair skill children: mcmmo.ability.repair.all: true mcmmo.commands.repair: true + mcmmo.commands.xplock.repair: true mcmmo.skills.smelting: description: Allows access to the Smelting skill children: mcmmo.ability.smelting.all: true mcmmo.commands.smelting: true + mcmmo.commands.xplock.smelting: true mcmmo.skills.swords: description: Allows access to the Swords skill children: mcmmo.ability.swords.all: true mcmmo.commands.swords: true + mcmmo.commands.xplock.swords: true mcmmo.skills.taming: description: Allows access to the Taming skill children: mcmmo.ability.taming.all: true mcmmo.commands.taming: true + mcmmo.commands.xplock.taming: true mcmmo.skills.unarmed: description: Allows access to the Unarmed skill children: mcmmo.ability.unarmed.all: true mcmmo.commands.unarmed: true + mcmmo.commands.xplock.unarmed: true mcmmo.skills.woodcutting: description: Allows access to the Woodcutting skill children: mcmmo.ability.woodcutting.all: true mcmmo.commands.woodcutting: true + mcmmo.commands.xplock.woodcutting: true mcmmo.tools.*: default: false description: Implies all mcmmo.tools permissions. diff --git a/src/main/resources/skillicon/Acrobatics.png b/src/main/resources/skillicon/Acrobatics.png new file mode 100644 index 000000000..45ed57530 Binary files /dev/null and b/src/main/resources/skillicon/Acrobatics.png differ diff --git a/src/main/resources/skillicon/Acrobatics_r.png b/src/main/resources/skillicon/Acrobatics_r.png new file mode 100644 index 000000000..a2106d7e4 Binary files /dev/null and b/src/main/resources/skillicon/Acrobatics_r.png differ diff --git a/src/main/resources/skillicon/Archery.png b/src/main/resources/skillicon/Archery.png new file mode 100644 index 000000000..1f17f3b47 Binary files /dev/null and b/src/main/resources/skillicon/Archery.png differ diff --git a/src/main/resources/skillicon/Archery_r.png b/src/main/resources/skillicon/Archery_r.png new file mode 100644 index 000000000..5bba593ca Binary files /dev/null and b/src/main/resources/skillicon/Archery_r.png differ diff --git a/src/main/resources/skillicon/Axe_r.png b/src/main/resources/skillicon/Axe_r.png new file mode 100644 index 000000000..a6984ca47 Binary files /dev/null and b/src/main/resources/skillicon/Axe_r.png differ diff --git a/src/main/resources/skillicon/Axes.png b/src/main/resources/skillicon/Axes.png new file mode 100644 index 000000000..a7d24870e Binary files /dev/null and b/src/main/resources/skillicon/Axes.png differ diff --git a/src/main/resources/skillicon/Axes_r.png b/src/main/resources/skillicon/Axes_r.png new file mode 100644 index 000000000..d90c62808 Binary files /dev/null and b/src/main/resources/skillicon/Axes_r.png differ diff --git a/src/main/resources/skillicon/Excavation.png b/src/main/resources/skillicon/Excavation.png new file mode 100644 index 000000000..c3f7a8b9f Binary files /dev/null and b/src/main/resources/skillicon/Excavation.png differ diff --git a/src/main/resources/skillicon/Excavation_r.png b/src/main/resources/skillicon/Excavation_r.png new file mode 100644 index 000000000..d7d30b3e6 Binary files /dev/null and b/src/main/resources/skillicon/Excavation_r.png differ diff --git a/src/main/resources/skillicon/Fishing.png b/src/main/resources/skillicon/Fishing.png new file mode 100644 index 000000000..bf277c808 Binary files /dev/null and b/src/main/resources/skillicon/Fishing.png differ diff --git a/src/main/resources/skillicon/Fishing_r.png b/src/main/resources/skillicon/Fishing_r.png new file mode 100644 index 000000000..53a43d9f6 Binary files /dev/null and b/src/main/resources/skillicon/Fishing_r.png differ diff --git a/src/main/resources/skillicon/Herbalism.png b/src/main/resources/skillicon/Herbalism.png new file mode 100644 index 000000000..713b4d279 Binary files /dev/null and b/src/main/resources/skillicon/Herbalism.png differ diff --git a/src/main/resources/skillicon/Herbalism_r.png b/src/main/resources/skillicon/Herbalism_r.png new file mode 100644 index 000000000..d230eede3 Binary files /dev/null and b/src/main/resources/skillicon/Herbalism_r.png differ diff --git a/src/main/resources/skillicon/Icon.png b/src/main/resources/skillicon/Icon.png new file mode 100644 index 000000000..396839aa2 Binary files /dev/null and b/src/main/resources/skillicon/Icon.png differ diff --git a/src/main/resources/skillicon/Icon_old.png b/src/main/resources/skillicon/Icon_old.png new file mode 100644 index 000000000..8cc3e62a7 Binary files /dev/null and b/src/main/resources/skillicon/Icon_old.png differ diff --git a/src/main/resources/skillicon/Icon_r.png b/src/main/resources/skillicon/Icon_r.png new file mode 100644 index 000000000..f5e847dd3 Binary files /dev/null and b/src/main/resources/skillicon/Icon_r.png differ diff --git a/src/main/resources/skillicon/Mining.png b/src/main/resources/skillicon/Mining.png new file mode 100644 index 000000000..21e9ca827 Binary files /dev/null and b/src/main/resources/skillicon/Mining.png differ diff --git a/src/main/resources/skillicon/Mining_r.png b/src/main/resources/skillicon/Mining_r.png new file mode 100644 index 000000000..d24771d05 Binary files /dev/null and b/src/main/resources/skillicon/Mining_r.png differ diff --git a/src/main/resources/skillicon/Repair.png b/src/main/resources/skillicon/Repair.png new file mode 100644 index 000000000..129762e76 Binary files /dev/null and b/src/main/resources/skillicon/Repair.png differ diff --git a/src/main/resources/skillicon/Repair_r.png b/src/main/resources/skillicon/Repair_r.png new file mode 100644 index 000000000..208e3b543 Binary files /dev/null and b/src/main/resources/skillicon/Repair_r.png differ diff --git a/src/main/resources/skillicon/Swords.png b/src/main/resources/skillicon/Swords.png new file mode 100644 index 000000000..e174c0b52 Binary files /dev/null and b/src/main/resources/skillicon/Swords.png differ diff --git a/src/main/resources/skillicon/Swords_r.png b/src/main/resources/skillicon/Swords_r.png new file mode 100644 index 000000000..77939ced2 Binary files /dev/null and b/src/main/resources/skillicon/Swords_r.png differ diff --git a/src/main/resources/skillicon/Taming.png b/src/main/resources/skillicon/Taming.png new file mode 100644 index 000000000..60fcb37c1 Binary files /dev/null and b/src/main/resources/skillicon/Taming.png differ diff --git a/src/main/resources/skillicon/Taming_r.png b/src/main/resources/skillicon/Taming_r.png new file mode 100644 index 000000000..aac88be83 Binary files /dev/null and b/src/main/resources/skillicon/Taming_r.png differ diff --git a/src/main/resources/skillicon/Unarmed.png b/src/main/resources/skillicon/Unarmed.png new file mode 100644 index 000000000..f84c8fe86 Binary files /dev/null and b/src/main/resources/skillicon/Unarmed.png differ diff --git a/src/main/resources/skillicon/Unarmed_r.png b/src/main/resources/skillicon/Unarmed_r.png new file mode 100644 index 000000000..fd5c99f8a Binary files /dev/null and b/src/main/resources/skillicon/Unarmed_r.png differ diff --git a/src/main/resources/skillicon/Woodcutting.png b/src/main/resources/skillicon/Woodcutting.png new file mode 100644 index 000000000..f0276e184 Binary files /dev/null and b/src/main/resources/skillicon/Woodcutting.png differ diff --git a/src/main/resources/skillicon/Woodcutting_r.png b/src/main/resources/skillicon/Woodcutting_r.png new file mode 100644 index 000000000..af8f84241 Binary files /dev/null and b/src/main/resources/skillicon/Woodcutting_r.png differ diff --git a/src/main/resources/sound/level.wav b/src/main/resources/sound/level.wav new file mode 100644 index 000000000..b54951f9e Binary files /dev/null and b/src/main/resources/sound/level.wav differ diff --git a/src/main/resources/spout.yml b/src/main/resources/spout.yml new file mode 100644 index 000000000..d445a308a --- /dev/null +++ b/src/main/resources/spout.yml @@ -0,0 +1,77 @@ +Menu: + Key: KEY_M +XP: + Bar: + Enabled: true + X_POS: 95 + Y_POS: 6 + Icon: + Enabled: true + X_POS: 78 + Y_POS: 2 +HUD: + Show_Power_Level: true + Default: STANDARD + Retro: + Colors: + Swords: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Taming: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Acrobatics: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Border: + BLUE: 0.0 + GREEN: 0.0 + RED: 0.0 + Background: + BLUE: 0.75 + GREEN: 0.75 + RED: 0.75 + Woodcutting: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Archery: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Axes: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Repair: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Fishing: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Excavation: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Herbalism: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Unarmed: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 + Mining: + BLUE: 0.75 + GREEN: 0.3 + RED: 0.3 +Notifications: + Tier1: 200 + Tier2: 400 + Tier3: 600 + Tier4: 800 \ No newline at end of file diff --git a/src/main/resources/xpbar/xpbar_inc000.png b/src/main/resources/xpbar/xpbar_inc000.png new file mode 100644 index 000000000..d15d73c1a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc000.png differ diff --git a/src/main/resources/xpbar/xpbar_inc001.png b/src/main/resources/xpbar/xpbar_inc001.png new file mode 100644 index 000000000..cae4a5773 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc001.png differ diff --git a/src/main/resources/xpbar/xpbar_inc002.png b/src/main/resources/xpbar/xpbar_inc002.png new file mode 100644 index 000000000..8979efddb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc002.png differ diff --git a/src/main/resources/xpbar/xpbar_inc003.png b/src/main/resources/xpbar/xpbar_inc003.png new file mode 100644 index 000000000..012d8a939 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc003.png differ diff --git a/src/main/resources/xpbar/xpbar_inc004.png b/src/main/resources/xpbar/xpbar_inc004.png new file mode 100644 index 000000000..e7c67d344 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc004.png differ diff --git a/src/main/resources/xpbar/xpbar_inc005.png b/src/main/resources/xpbar/xpbar_inc005.png new file mode 100644 index 000000000..ff6236c65 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc005.png differ diff --git a/src/main/resources/xpbar/xpbar_inc006.png b/src/main/resources/xpbar/xpbar_inc006.png new file mode 100644 index 000000000..091881639 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc006.png differ diff --git a/src/main/resources/xpbar/xpbar_inc007.png b/src/main/resources/xpbar/xpbar_inc007.png new file mode 100644 index 000000000..80a1fe278 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc007.png differ diff --git a/src/main/resources/xpbar/xpbar_inc008.png b/src/main/resources/xpbar/xpbar_inc008.png new file mode 100644 index 000000000..06f1c091d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc008.png differ diff --git a/src/main/resources/xpbar/xpbar_inc009.png b/src/main/resources/xpbar/xpbar_inc009.png new file mode 100644 index 000000000..a6f422be4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc009.png differ diff --git a/src/main/resources/xpbar/xpbar_inc010.png b/src/main/resources/xpbar/xpbar_inc010.png new file mode 100644 index 000000000..4e993be07 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc010.png differ diff --git a/src/main/resources/xpbar/xpbar_inc011.png b/src/main/resources/xpbar/xpbar_inc011.png new file mode 100644 index 000000000..6cb5a7a9f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc011.png differ diff --git a/src/main/resources/xpbar/xpbar_inc012.png b/src/main/resources/xpbar/xpbar_inc012.png new file mode 100644 index 000000000..cf65d13e4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc012.png differ diff --git a/src/main/resources/xpbar/xpbar_inc013.png b/src/main/resources/xpbar/xpbar_inc013.png new file mode 100644 index 000000000..16c16618e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc013.png differ diff --git a/src/main/resources/xpbar/xpbar_inc014.png b/src/main/resources/xpbar/xpbar_inc014.png new file mode 100644 index 000000000..f1ca460d2 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc014.png differ diff --git a/src/main/resources/xpbar/xpbar_inc015.png b/src/main/resources/xpbar/xpbar_inc015.png new file mode 100644 index 000000000..c018e061f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc015.png differ diff --git a/src/main/resources/xpbar/xpbar_inc016.png b/src/main/resources/xpbar/xpbar_inc016.png new file mode 100644 index 000000000..e1fbe6106 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc016.png differ diff --git a/src/main/resources/xpbar/xpbar_inc017.png b/src/main/resources/xpbar/xpbar_inc017.png new file mode 100644 index 000000000..40afb4b57 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc017.png differ diff --git a/src/main/resources/xpbar/xpbar_inc018.png b/src/main/resources/xpbar/xpbar_inc018.png new file mode 100644 index 000000000..18f571141 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc018.png differ diff --git a/src/main/resources/xpbar/xpbar_inc019.png b/src/main/resources/xpbar/xpbar_inc019.png new file mode 100644 index 000000000..8d7842274 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc019.png differ diff --git a/src/main/resources/xpbar/xpbar_inc020.png b/src/main/resources/xpbar/xpbar_inc020.png new file mode 100644 index 000000000..825b4efd0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc020.png differ diff --git a/src/main/resources/xpbar/xpbar_inc021.png b/src/main/resources/xpbar/xpbar_inc021.png new file mode 100644 index 000000000..f796912a6 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc021.png differ diff --git a/src/main/resources/xpbar/xpbar_inc022.png b/src/main/resources/xpbar/xpbar_inc022.png new file mode 100644 index 000000000..4384a066b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc022.png differ diff --git a/src/main/resources/xpbar/xpbar_inc023.png b/src/main/resources/xpbar/xpbar_inc023.png new file mode 100644 index 000000000..8775cc50b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc023.png differ diff --git a/src/main/resources/xpbar/xpbar_inc024.png b/src/main/resources/xpbar/xpbar_inc024.png new file mode 100644 index 000000000..69f549873 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc024.png differ diff --git a/src/main/resources/xpbar/xpbar_inc025.png b/src/main/resources/xpbar/xpbar_inc025.png new file mode 100644 index 000000000..1d2c5b4fe Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc025.png differ diff --git a/src/main/resources/xpbar/xpbar_inc026.png b/src/main/resources/xpbar/xpbar_inc026.png new file mode 100644 index 000000000..8b88e028c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc026.png differ diff --git a/src/main/resources/xpbar/xpbar_inc027.png b/src/main/resources/xpbar/xpbar_inc027.png new file mode 100644 index 000000000..2667d9cb8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc027.png differ diff --git a/src/main/resources/xpbar/xpbar_inc028.png b/src/main/resources/xpbar/xpbar_inc028.png new file mode 100644 index 000000000..e4987db6f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc028.png differ diff --git a/src/main/resources/xpbar/xpbar_inc029.png b/src/main/resources/xpbar/xpbar_inc029.png new file mode 100644 index 000000000..edcd03b18 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc029.png differ diff --git a/src/main/resources/xpbar/xpbar_inc030.png b/src/main/resources/xpbar/xpbar_inc030.png new file mode 100644 index 000000000..3c2979e2b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc030.png differ diff --git a/src/main/resources/xpbar/xpbar_inc031.png b/src/main/resources/xpbar/xpbar_inc031.png new file mode 100644 index 000000000..ff3a8769e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc031.png differ diff --git a/src/main/resources/xpbar/xpbar_inc032.png b/src/main/resources/xpbar/xpbar_inc032.png new file mode 100644 index 000000000..54d629d62 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc032.png differ diff --git a/src/main/resources/xpbar/xpbar_inc033.png b/src/main/resources/xpbar/xpbar_inc033.png new file mode 100644 index 000000000..e704d64aa Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc033.png differ diff --git a/src/main/resources/xpbar/xpbar_inc034.png b/src/main/resources/xpbar/xpbar_inc034.png new file mode 100644 index 000000000..94878bab9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc034.png differ diff --git a/src/main/resources/xpbar/xpbar_inc035.png b/src/main/resources/xpbar/xpbar_inc035.png new file mode 100644 index 000000000..b536915e0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc035.png differ diff --git a/src/main/resources/xpbar/xpbar_inc036.png b/src/main/resources/xpbar/xpbar_inc036.png new file mode 100644 index 000000000..0d51fc181 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc036.png differ diff --git a/src/main/resources/xpbar/xpbar_inc037.png b/src/main/resources/xpbar/xpbar_inc037.png new file mode 100644 index 000000000..c91424123 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc037.png differ diff --git a/src/main/resources/xpbar/xpbar_inc038.png b/src/main/resources/xpbar/xpbar_inc038.png new file mode 100644 index 000000000..53647d0c3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc038.png differ diff --git a/src/main/resources/xpbar/xpbar_inc039.png b/src/main/resources/xpbar/xpbar_inc039.png new file mode 100644 index 000000000..d16ffa8f7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc039.png differ diff --git a/src/main/resources/xpbar/xpbar_inc040.png b/src/main/resources/xpbar/xpbar_inc040.png new file mode 100644 index 000000000..4bf09c782 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc040.png differ diff --git a/src/main/resources/xpbar/xpbar_inc041.png b/src/main/resources/xpbar/xpbar_inc041.png new file mode 100644 index 000000000..32edf751f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc041.png differ diff --git a/src/main/resources/xpbar/xpbar_inc042.png b/src/main/resources/xpbar/xpbar_inc042.png new file mode 100644 index 000000000..77c5a1a3e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc042.png differ diff --git a/src/main/resources/xpbar/xpbar_inc043.png b/src/main/resources/xpbar/xpbar_inc043.png new file mode 100644 index 000000000..8edb3110c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc043.png differ diff --git a/src/main/resources/xpbar/xpbar_inc044.png b/src/main/resources/xpbar/xpbar_inc044.png new file mode 100644 index 000000000..30e6b9d34 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc044.png differ diff --git a/src/main/resources/xpbar/xpbar_inc045.png b/src/main/resources/xpbar/xpbar_inc045.png new file mode 100644 index 000000000..0db111ad4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc045.png differ diff --git a/src/main/resources/xpbar/xpbar_inc046.png b/src/main/resources/xpbar/xpbar_inc046.png new file mode 100644 index 000000000..ba7215480 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc046.png differ diff --git a/src/main/resources/xpbar/xpbar_inc047.png b/src/main/resources/xpbar/xpbar_inc047.png new file mode 100644 index 000000000..5d9f334c7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc047.png differ diff --git a/src/main/resources/xpbar/xpbar_inc048.png b/src/main/resources/xpbar/xpbar_inc048.png new file mode 100644 index 000000000..52c40af82 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc048.png differ diff --git a/src/main/resources/xpbar/xpbar_inc049.png b/src/main/resources/xpbar/xpbar_inc049.png new file mode 100644 index 000000000..54eb37df4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc049.png differ diff --git a/src/main/resources/xpbar/xpbar_inc050.png b/src/main/resources/xpbar/xpbar_inc050.png new file mode 100644 index 000000000..89cb9c81e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc050.png differ diff --git a/src/main/resources/xpbar/xpbar_inc051.png b/src/main/resources/xpbar/xpbar_inc051.png new file mode 100644 index 000000000..03121403d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc051.png differ diff --git a/src/main/resources/xpbar/xpbar_inc052.png b/src/main/resources/xpbar/xpbar_inc052.png new file mode 100644 index 000000000..a18fe4340 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc052.png differ diff --git a/src/main/resources/xpbar/xpbar_inc053.png b/src/main/resources/xpbar/xpbar_inc053.png new file mode 100644 index 000000000..17b01fab0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc053.png differ diff --git a/src/main/resources/xpbar/xpbar_inc054.png b/src/main/resources/xpbar/xpbar_inc054.png new file mode 100644 index 000000000..21130d8f1 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc054.png differ diff --git a/src/main/resources/xpbar/xpbar_inc055.png b/src/main/resources/xpbar/xpbar_inc055.png new file mode 100644 index 000000000..4b898e72a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc055.png differ diff --git a/src/main/resources/xpbar/xpbar_inc056.png b/src/main/resources/xpbar/xpbar_inc056.png new file mode 100644 index 000000000..344d60950 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc056.png differ diff --git a/src/main/resources/xpbar/xpbar_inc057.png b/src/main/resources/xpbar/xpbar_inc057.png new file mode 100644 index 000000000..4f99af40c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc057.png differ diff --git a/src/main/resources/xpbar/xpbar_inc058.png b/src/main/resources/xpbar/xpbar_inc058.png new file mode 100644 index 000000000..9030430a5 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc058.png differ diff --git a/src/main/resources/xpbar/xpbar_inc059.png b/src/main/resources/xpbar/xpbar_inc059.png new file mode 100644 index 000000000..5d82e0f9b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc059.png differ diff --git a/src/main/resources/xpbar/xpbar_inc060.png b/src/main/resources/xpbar/xpbar_inc060.png new file mode 100644 index 000000000..9fa631aed Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc060.png differ diff --git a/src/main/resources/xpbar/xpbar_inc061.png b/src/main/resources/xpbar/xpbar_inc061.png new file mode 100644 index 000000000..3a6761c0c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc061.png differ diff --git a/src/main/resources/xpbar/xpbar_inc062.png b/src/main/resources/xpbar/xpbar_inc062.png new file mode 100644 index 000000000..b8a3b9117 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc062.png differ diff --git a/src/main/resources/xpbar/xpbar_inc063.png b/src/main/resources/xpbar/xpbar_inc063.png new file mode 100644 index 000000000..7331f8320 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc063.png differ diff --git a/src/main/resources/xpbar/xpbar_inc064.png b/src/main/resources/xpbar/xpbar_inc064.png new file mode 100644 index 000000000..704e10fd8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc064.png differ diff --git a/src/main/resources/xpbar/xpbar_inc065.png b/src/main/resources/xpbar/xpbar_inc065.png new file mode 100644 index 000000000..6b0e9291b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc065.png differ diff --git a/src/main/resources/xpbar/xpbar_inc066.png b/src/main/resources/xpbar/xpbar_inc066.png new file mode 100644 index 000000000..65c7afd5f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc066.png differ diff --git a/src/main/resources/xpbar/xpbar_inc067.png b/src/main/resources/xpbar/xpbar_inc067.png new file mode 100644 index 000000000..4b37fc259 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc067.png differ diff --git a/src/main/resources/xpbar/xpbar_inc068.png b/src/main/resources/xpbar/xpbar_inc068.png new file mode 100644 index 000000000..fea2ae413 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc068.png differ diff --git a/src/main/resources/xpbar/xpbar_inc069.png b/src/main/resources/xpbar/xpbar_inc069.png new file mode 100644 index 000000000..d929e9339 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc069.png differ diff --git a/src/main/resources/xpbar/xpbar_inc070.png b/src/main/resources/xpbar/xpbar_inc070.png new file mode 100644 index 000000000..491b833ab Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc070.png differ diff --git a/src/main/resources/xpbar/xpbar_inc071.png b/src/main/resources/xpbar/xpbar_inc071.png new file mode 100644 index 000000000..993dbaf05 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc071.png differ diff --git a/src/main/resources/xpbar/xpbar_inc072.png b/src/main/resources/xpbar/xpbar_inc072.png new file mode 100644 index 000000000..6f2f456c5 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc072.png differ diff --git a/src/main/resources/xpbar/xpbar_inc073.png b/src/main/resources/xpbar/xpbar_inc073.png new file mode 100644 index 000000000..417e02ac3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc073.png differ diff --git a/src/main/resources/xpbar/xpbar_inc074.png b/src/main/resources/xpbar/xpbar_inc074.png new file mode 100644 index 000000000..68c5f1dfe Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc074.png differ diff --git a/src/main/resources/xpbar/xpbar_inc075.png b/src/main/resources/xpbar/xpbar_inc075.png new file mode 100644 index 000000000..b0325f28c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc075.png differ diff --git a/src/main/resources/xpbar/xpbar_inc076.png b/src/main/resources/xpbar/xpbar_inc076.png new file mode 100644 index 000000000..9d50e3f7f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc076.png differ diff --git a/src/main/resources/xpbar/xpbar_inc077.png b/src/main/resources/xpbar/xpbar_inc077.png new file mode 100644 index 000000000..fc4d4b2ae Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc077.png differ diff --git a/src/main/resources/xpbar/xpbar_inc078.png b/src/main/resources/xpbar/xpbar_inc078.png new file mode 100644 index 000000000..bdf646230 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc078.png differ diff --git a/src/main/resources/xpbar/xpbar_inc079.png b/src/main/resources/xpbar/xpbar_inc079.png new file mode 100644 index 000000000..433443d26 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc079.png differ diff --git a/src/main/resources/xpbar/xpbar_inc080.png b/src/main/resources/xpbar/xpbar_inc080.png new file mode 100644 index 000000000..884fe20be Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc080.png differ diff --git a/src/main/resources/xpbar/xpbar_inc081.png b/src/main/resources/xpbar/xpbar_inc081.png new file mode 100644 index 000000000..de3813464 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc081.png differ diff --git a/src/main/resources/xpbar/xpbar_inc082.png b/src/main/resources/xpbar/xpbar_inc082.png new file mode 100644 index 000000000..de7309042 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc082.png differ diff --git a/src/main/resources/xpbar/xpbar_inc083.png b/src/main/resources/xpbar/xpbar_inc083.png new file mode 100644 index 000000000..64a831205 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc083.png differ diff --git a/src/main/resources/xpbar/xpbar_inc084.png b/src/main/resources/xpbar/xpbar_inc084.png new file mode 100644 index 000000000..28242647c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc084.png differ diff --git a/src/main/resources/xpbar/xpbar_inc085.png b/src/main/resources/xpbar/xpbar_inc085.png new file mode 100644 index 000000000..9713377e6 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc085.png differ diff --git a/src/main/resources/xpbar/xpbar_inc086.png b/src/main/resources/xpbar/xpbar_inc086.png new file mode 100644 index 000000000..9f8f68ce4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc086.png differ diff --git a/src/main/resources/xpbar/xpbar_inc087.png b/src/main/resources/xpbar/xpbar_inc087.png new file mode 100644 index 000000000..563c9f436 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc087.png differ diff --git a/src/main/resources/xpbar/xpbar_inc088.png b/src/main/resources/xpbar/xpbar_inc088.png new file mode 100644 index 000000000..4885cb3ce Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc088.png differ diff --git a/src/main/resources/xpbar/xpbar_inc089.png b/src/main/resources/xpbar/xpbar_inc089.png new file mode 100644 index 000000000..7375669c7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc089.png differ diff --git a/src/main/resources/xpbar/xpbar_inc090.png b/src/main/resources/xpbar/xpbar_inc090.png new file mode 100644 index 000000000..8e8d57a7a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc090.png differ diff --git a/src/main/resources/xpbar/xpbar_inc091.png b/src/main/resources/xpbar/xpbar_inc091.png new file mode 100644 index 000000000..939ae9c73 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc091.png differ diff --git a/src/main/resources/xpbar/xpbar_inc092.png b/src/main/resources/xpbar/xpbar_inc092.png new file mode 100644 index 000000000..9d7e1cf69 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc092.png differ diff --git a/src/main/resources/xpbar/xpbar_inc093.png b/src/main/resources/xpbar/xpbar_inc093.png new file mode 100644 index 000000000..941df5a20 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc093.png differ diff --git a/src/main/resources/xpbar/xpbar_inc094.png b/src/main/resources/xpbar/xpbar_inc094.png new file mode 100644 index 000000000..c338f5123 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc094.png differ diff --git a/src/main/resources/xpbar/xpbar_inc095.png b/src/main/resources/xpbar/xpbar_inc095.png new file mode 100644 index 000000000..799a357b8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc095.png differ diff --git a/src/main/resources/xpbar/xpbar_inc096.png b/src/main/resources/xpbar/xpbar_inc096.png new file mode 100644 index 000000000..59bf2a9cb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc096.png differ diff --git a/src/main/resources/xpbar/xpbar_inc097.png b/src/main/resources/xpbar/xpbar_inc097.png new file mode 100644 index 000000000..cd0e5e100 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc097.png differ diff --git a/src/main/resources/xpbar/xpbar_inc098.png b/src/main/resources/xpbar/xpbar_inc098.png new file mode 100644 index 000000000..ab93b2dc0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc098.png differ diff --git a/src/main/resources/xpbar/xpbar_inc099.png b/src/main/resources/xpbar/xpbar_inc099.png new file mode 100644 index 000000000..55a00931f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc099.png differ diff --git a/src/main/resources/xpbar/xpbar_inc100.png b/src/main/resources/xpbar/xpbar_inc100.png new file mode 100644 index 000000000..1a44b4340 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc100.png differ diff --git a/src/main/resources/xpbar/xpbar_inc101.png b/src/main/resources/xpbar/xpbar_inc101.png new file mode 100644 index 000000000..1b4f083a3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc101.png differ diff --git a/src/main/resources/xpbar/xpbar_inc102.png b/src/main/resources/xpbar/xpbar_inc102.png new file mode 100644 index 000000000..d387a668a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc102.png differ diff --git a/src/main/resources/xpbar/xpbar_inc103.png b/src/main/resources/xpbar/xpbar_inc103.png new file mode 100644 index 000000000..ce80fa693 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc103.png differ diff --git a/src/main/resources/xpbar/xpbar_inc104.png b/src/main/resources/xpbar/xpbar_inc104.png new file mode 100644 index 000000000..49210d0eb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc104.png differ diff --git a/src/main/resources/xpbar/xpbar_inc105.png b/src/main/resources/xpbar/xpbar_inc105.png new file mode 100644 index 000000000..687f25de8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc105.png differ diff --git a/src/main/resources/xpbar/xpbar_inc106.png b/src/main/resources/xpbar/xpbar_inc106.png new file mode 100644 index 000000000..6fd617df9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc106.png differ diff --git a/src/main/resources/xpbar/xpbar_inc107.png b/src/main/resources/xpbar/xpbar_inc107.png new file mode 100644 index 000000000..91124fa49 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc107.png differ diff --git a/src/main/resources/xpbar/xpbar_inc108.png b/src/main/resources/xpbar/xpbar_inc108.png new file mode 100644 index 000000000..a915dc293 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc108.png differ diff --git a/src/main/resources/xpbar/xpbar_inc109.png b/src/main/resources/xpbar/xpbar_inc109.png new file mode 100644 index 000000000..368cafe08 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc109.png differ diff --git a/src/main/resources/xpbar/xpbar_inc110.png b/src/main/resources/xpbar/xpbar_inc110.png new file mode 100644 index 000000000..ad6beb554 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc110.png differ diff --git a/src/main/resources/xpbar/xpbar_inc111.png b/src/main/resources/xpbar/xpbar_inc111.png new file mode 100644 index 000000000..6f32c8707 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc111.png differ diff --git a/src/main/resources/xpbar/xpbar_inc112.png b/src/main/resources/xpbar/xpbar_inc112.png new file mode 100644 index 000000000..838562ad7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc112.png differ diff --git a/src/main/resources/xpbar/xpbar_inc113.png b/src/main/resources/xpbar/xpbar_inc113.png new file mode 100644 index 000000000..e1a7b8430 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc113.png differ diff --git a/src/main/resources/xpbar/xpbar_inc114.png b/src/main/resources/xpbar/xpbar_inc114.png new file mode 100644 index 000000000..82fa227e3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc114.png differ diff --git a/src/main/resources/xpbar/xpbar_inc115.png b/src/main/resources/xpbar/xpbar_inc115.png new file mode 100644 index 000000000..7620754aa Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc115.png differ diff --git a/src/main/resources/xpbar/xpbar_inc116.png b/src/main/resources/xpbar/xpbar_inc116.png new file mode 100644 index 000000000..722d5d0ba Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc116.png differ diff --git a/src/main/resources/xpbar/xpbar_inc117.png b/src/main/resources/xpbar/xpbar_inc117.png new file mode 100644 index 000000000..18078a444 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc117.png differ diff --git a/src/main/resources/xpbar/xpbar_inc118.png b/src/main/resources/xpbar/xpbar_inc118.png new file mode 100644 index 000000000..0c3352cf0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc118.png differ diff --git a/src/main/resources/xpbar/xpbar_inc119.png b/src/main/resources/xpbar/xpbar_inc119.png new file mode 100644 index 000000000..6961d3c61 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc119.png differ diff --git a/src/main/resources/xpbar/xpbar_inc120.png b/src/main/resources/xpbar/xpbar_inc120.png new file mode 100644 index 000000000..f09c43f75 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc120.png differ diff --git a/src/main/resources/xpbar/xpbar_inc121.png b/src/main/resources/xpbar/xpbar_inc121.png new file mode 100644 index 000000000..e5a41b24d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc121.png differ diff --git a/src/main/resources/xpbar/xpbar_inc122.png b/src/main/resources/xpbar/xpbar_inc122.png new file mode 100644 index 000000000..5b0b4d513 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc122.png differ diff --git a/src/main/resources/xpbar/xpbar_inc123.png b/src/main/resources/xpbar/xpbar_inc123.png new file mode 100644 index 000000000..f25942cd2 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc123.png differ diff --git a/src/main/resources/xpbar/xpbar_inc124.png b/src/main/resources/xpbar/xpbar_inc124.png new file mode 100644 index 000000000..359edabd0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc124.png differ diff --git a/src/main/resources/xpbar/xpbar_inc125.png b/src/main/resources/xpbar/xpbar_inc125.png new file mode 100644 index 000000000..a44148bd2 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc125.png differ diff --git a/src/main/resources/xpbar/xpbar_inc126.png b/src/main/resources/xpbar/xpbar_inc126.png new file mode 100644 index 000000000..54b4ac627 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc126.png differ diff --git a/src/main/resources/xpbar/xpbar_inc127.png b/src/main/resources/xpbar/xpbar_inc127.png new file mode 100644 index 000000000..70ada6fd6 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc127.png differ diff --git a/src/main/resources/xpbar/xpbar_inc128.png b/src/main/resources/xpbar/xpbar_inc128.png new file mode 100644 index 000000000..b85eec658 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc128.png differ diff --git a/src/main/resources/xpbar/xpbar_inc129.png b/src/main/resources/xpbar/xpbar_inc129.png new file mode 100644 index 000000000..808390a67 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc129.png differ diff --git a/src/main/resources/xpbar/xpbar_inc130.png b/src/main/resources/xpbar/xpbar_inc130.png new file mode 100644 index 000000000..59e3b18b3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc130.png differ diff --git a/src/main/resources/xpbar/xpbar_inc131.png b/src/main/resources/xpbar/xpbar_inc131.png new file mode 100644 index 000000000..838ed14ba Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc131.png differ diff --git a/src/main/resources/xpbar/xpbar_inc132.png b/src/main/resources/xpbar/xpbar_inc132.png new file mode 100644 index 000000000..c8f8086e3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc132.png differ diff --git a/src/main/resources/xpbar/xpbar_inc133.png b/src/main/resources/xpbar/xpbar_inc133.png new file mode 100644 index 000000000..1c2b9309d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc133.png differ diff --git a/src/main/resources/xpbar/xpbar_inc134.png b/src/main/resources/xpbar/xpbar_inc134.png new file mode 100644 index 000000000..cbd5c3341 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc134.png differ diff --git a/src/main/resources/xpbar/xpbar_inc135.png b/src/main/resources/xpbar/xpbar_inc135.png new file mode 100644 index 000000000..ff3a1e7fb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc135.png differ diff --git a/src/main/resources/xpbar/xpbar_inc136.png b/src/main/resources/xpbar/xpbar_inc136.png new file mode 100644 index 000000000..cc12525a3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc136.png differ diff --git a/src/main/resources/xpbar/xpbar_inc137.png b/src/main/resources/xpbar/xpbar_inc137.png new file mode 100644 index 000000000..afa209e2d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc137.png differ diff --git a/src/main/resources/xpbar/xpbar_inc138.png b/src/main/resources/xpbar/xpbar_inc138.png new file mode 100644 index 000000000..af5cf692e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc138.png differ diff --git a/src/main/resources/xpbar/xpbar_inc139.png b/src/main/resources/xpbar/xpbar_inc139.png new file mode 100644 index 000000000..d24fd561f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc139.png differ diff --git a/src/main/resources/xpbar/xpbar_inc140.png b/src/main/resources/xpbar/xpbar_inc140.png new file mode 100644 index 000000000..a609052f9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc140.png differ diff --git a/src/main/resources/xpbar/xpbar_inc141.png b/src/main/resources/xpbar/xpbar_inc141.png new file mode 100644 index 000000000..65376f12f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc141.png differ diff --git a/src/main/resources/xpbar/xpbar_inc142.png b/src/main/resources/xpbar/xpbar_inc142.png new file mode 100644 index 000000000..5501fb4e4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc142.png differ diff --git a/src/main/resources/xpbar/xpbar_inc143.png b/src/main/resources/xpbar/xpbar_inc143.png new file mode 100644 index 000000000..d46c53b39 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc143.png differ diff --git a/src/main/resources/xpbar/xpbar_inc144.png b/src/main/resources/xpbar/xpbar_inc144.png new file mode 100644 index 000000000..cfa6ce208 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc144.png differ diff --git a/src/main/resources/xpbar/xpbar_inc145.png b/src/main/resources/xpbar/xpbar_inc145.png new file mode 100644 index 000000000..c24e57095 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc145.png differ diff --git a/src/main/resources/xpbar/xpbar_inc146.png b/src/main/resources/xpbar/xpbar_inc146.png new file mode 100644 index 000000000..f180b4bb8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc146.png differ diff --git a/src/main/resources/xpbar/xpbar_inc147.png b/src/main/resources/xpbar/xpbar_inc147.png new file mode 100644 index 000000000..4fed434a1 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc147.png differ diff --git a/src/main/resources/xpbar/xpbar_inc148.png b/src/main/resources/xpbar/xpbar_inc148.png new file mode 100644 index 000000000..792372162 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc148.png differ diff --git a/src/main/resources/xpbar/xpbar_inc149.png b/src/main/resources/xpbar/xpbar_inc149.png new file mode 100644 index 000000000..02e29e51a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc149.png differ diff --git a/src/main/resources/xpbar/xpbar_inc150.png b/src/main/resources/xpbar/xpbar_inc150.png new file mode 100644 index 000000000..6c41c6b15 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc150.png differ diff --git a/src/main/resources/xpbar/xpbar_inc151.png b/src/main/resources/xpbar/xpbar_inc151.png new file mode 100644 index 000000000..ad533b146 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc151.png differ diff --git a/src/main/resources/xpbar/xpbar_inc152.png b/src/main/resources/xpbar/xpbar_inc152.png new file mode 100644 index 000000000..f56019467 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc152.png differ diff --git a/src/main/resources/xpbar/xpbar_inc153.png b/src/main/resources/xpbar/xpbar_inc153.png new file mode 100644 index 000000000..bef5df408 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc153.png differ diff --git a/src/main/resources/xpbar/xpbar_inc154.png b/src/main/resources/xpbar/xpbar_inc154.png new file mode 100644 index 000000000..39babf7d9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc154.png differ diff --git a/src/main/resources/xpbar/xpbar_inc155.png b/src/main/resources/xpbar/xpbar_inc155.png new file mode 100644 index 000000000..aed3daac3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc155.png differ diff --git a/src/main/resources/xpbar/xpbar_inc156.png b/src/main/resources/xpbar/xpbar_inc156.png new file mode 100644 index 000000000..293e563d7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc156.png differ diff --git a/src/main/resources/xpbar/xpbar_inc157.png b/src/main/resources/xpbar/xpbar_inc157.png new file mode 100644 index 000000000..84831f79e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc157.png differ diff --git a/src/main/resources/xpbar/xpbar_inc158.png b/src/main/resources/xpbar/xpbar_inc158.png new file mode 100644 index 000000000..69cd97ca9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc158.png differ diff --git a/src/main/resources/xpbar/xpbar_inc159.png b/src/main/resources/xpbar/xpbar_inc159.png new file mode 100644 index 000000000..cdc92bea9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc159.png differ diff --git a/src/main/resources/xpbar/xpbar_inc160.png b/src/main/resources/xpbar/xpbar_inc160.png new file mode 100644 index 000000000..401176cde Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc160.png differ diff --git a/src/main/resources/xpbar/xpbar_inc161.png b/src/main/resources/xpbar/xpbar_inc161.png new file mode 100644 index 000000000..d77e67026 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc161.png differ diff --git a/src/main/resources/xpbar/xpbar_inc162.png b/src/main/resources/xpbar/xpbar_inc162.png new file mode 100644 index 000000000..dfd19d459 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc162.png differ diff --git a/src/main/resources/xpbar/xpbar_inc163.png b/src/main/resources/xpbar/xpbar_inc163.png new file mode 100644 index 000000000..64db26de9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc163.png differ diff --git a/src/main/resources/xpbar/xpbar_inc164.png b/src/main/resources/xpbar/xpbar_inc164.png new file mode 100644 index 000000000..66ab4cccc Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc164.png differ diff --git a/src/main/resources/xpbar/xpbar_inc165.png b/src/main/resources/xpbar/xpbar_inc165.png new file mode 100644 index 000000000..73d5fe529 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc165.png differ diff --git a/src/main/resources/xpbar/xpbar_inc166.png b/src/main/resources/xpbar/xpbar_inc166.png new file mode 100644 index 000000000..1602ee1ca Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc166.png differ diff --git a/src/main/resources/xpbar/xpbar_inc167.png b/src/main/resources/xpbar/xpbar_inc167.png new file mode 100644 index 000000000..c48aae936 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc167.png differ diff --git a/src/main/resources/xpbar/xpbar_inc168.png b/src/main/resources/xpbar/xpbar_inc168.png new file mode 100644 index 000000000..5eef10c6e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc168.png differ diff --git a/src/main/resources/xpbar/xpbar_inc169.png b/src/main/resources/xpbar/xpbar_inc169.png new file mode 100644 index 000000000..c2d1363d3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc169.png differ diff --git a/src/main/resources/xpbar/xpbar_inc170.png b/src/main/resources/xpbar/xpbar_inc170.png new file mode 100644 index 000000000..e116ae7d0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc170.png differ diff --git a/src/main/resources/xpbar/xpbar_inc171.png b/src/main/resources/xpbar/xpbar_inc171.png new file mode 100644 index 000000000..d267a7493 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc171.png differ diff --git a/src/main/resources/xpbar/xpbar_inc172.png b/src/main/resources/xpbar/xpbar_inc172.png new file mode 100644 index 000000000..e94de8cf8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc172.png differ diff --git a/src/main/resources/xpbar/xpbar_inc173.png b/src/main/resources/xpbar/xpbar_inc173.png new file mode 100644 index 000000000..6b15b3713 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc173.png differ diff --git a/src/main/resources/xpbar/xpbar_inc174.png b/src/main/resources/xpbar/xpbar_inc174.png new file mode 100644 index 000000000..d6537f8f4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc174.png differ diff --git a/src/main/resources/xpbar/xpbar_inc175.png b/src/main/resources/xpbar/xpbar_inc175.png new file mode 100644 index 000000000..d96af3fa9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc175.png differ diff --git a/src/main/resources/xpbar/xpbar_inc176.png b/src/main/resources/xpbar/xpbar_inc176.png new file mode 100644 index 000000000..8f977c4bc Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc176.png differ diff --git a/src/main/resources/xpbar/xpbar_inc177.png b/src/main/resources/xpbar/xpbar_inc177.png new file mode 100644 index 000000000..b893155bb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc177.png differ diff --git a/src/main/resources/xpbar/xpbar_inc178.png b/src/main/resources/xpbar/xpbar_inc178.png new file mode 100644 index 000000000..5b412f8cb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc178.png differ diff --git a/src/main/resources/xpbar/xpbar_inc179.png b/src/main/resources/xpbar/xpbar_inc179.png new file mode 100644 index 000000000..22a866de9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc179.png differ diff --git a/src/main/resources/xpbar/xpbar_inc180.png b/src/main/resources/xpbar/xpbar_inc180.png new file mode 100644 index 000000000..ec76c0c44 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc180.png differ diff --git a/src/main/resources/xpbar/xpbar_inc181.png b/src/main/resources/xpbar/xpbar_inc181.png new file mode 100644 index 000000000..b85ac151d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc181.png differ diff --git a/src/main/resources/xpbar/xpbar_inc182.png b/src/main/resources/xpbar/xpbar_inc182.png new file mode 100644 index 000000000..26f77178f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc182.png differ diff --git a/src/main/resources/xpbar/xpbar_inc183.png b/src/main/resources/xpbar/xpbar_inc183.png new file mode 100644 index 000000000..5dd1ed0be Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc183.png differ diff --git a/src/main/resources/xpbar/xpbar_inc184.png b/src/main/resources/xpbar/xpbar_inc184.png new file mode 100644 index 000000000..3350c1caa Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc184.png differ diff --git a/src/main/resources/xpbar/xpbar_inc185.png b/src/main/resources/xpbar/xpbar_inc185.png new file mode 100644 index 000000000..3c54e7662 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc185.png differ diff --git a/src/main/resources/xpbar/xpbar_inc186.png b/src/main/resources/xpbar/xpbar_inc186.png new file mode 100644 index 000000000..3ecd585d9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc186.png differ diff --git a/src/main/resources/xpbar/xpbar_inc187.png b/src/main/resources/xpbar/xpbar_inc187.png new file mode 100644 index 000000000..3d4a5ade4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc187.png differ diff --git a/src/main/resources/xpbar/xpbar_inc188.png b/src/main/resources/xpbar/xpbar_inc188.png new file mode 100644 index 000000000..5238e8f87 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc188.png differ diff --git a/src/main/resources/xpbar/xpbar_inc189.png b/src/main/resources/xpbar/xpbar_inc189.png new file mode 100644 index 000000000..15e18f8b4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc189.png differ diff --git a/src/main/resources/xpbar/xpbar_inc190.png b/src/main/resources/xpbar/xpbar_inc190.png new file mode 100644 index 000000000..e6b3f2469 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc190.png differ diff --git a/src/main/resources/xpbar/xpbar_inc191.png b/src/main/resources/xpbar/xpbar_inc191.png new file mode 100644 index 000000000..0fc1ee072 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc191.png differ diff --git a/src/main/resources/xpbar/xpbar_inc192.png b/src/main/resources/xpbar/xpbar_inc192.png new file mode 100644 index 000000000..4199cdca8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc192.png differ diff --git a/src/main/resources/xpbar/xpbar_inc193.png b/src/main/resources/xpbar/xpbar_inc193.png new file mode 100644 index 000000000..e217f9220 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc193.png differ diff --git a/src/main/resources/xpbar/xpbar_inc194.png b/src/main/resources/xpbar/xpbar_inc194.png new file mode 100644 index 000000000..545c53da7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc194.png differ diff --git a/src/main/resources/xpbar/xpbar_inc195.png b/src/main/resources/xpbar/xpbar_inc195.png new file mode 100644 index 000000000..2d870bbe7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc195.png differ diff --git a/src/main/resources/xpbar/xpbar_inc196.png b/src/main/resources/xpbar/xpbar_inc196.png new file mode 100644 index 000000000..c1641144c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc196.png differ diff --git a/src/main/resources/xpbar/xpbar_inc197.png b/src/main/resources/xpbar/xpbar_inc197.png new file mode 100644 index 000000000..7c60ee3e9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc197.png differ diff --git a/src/main/resources/xpbar/xpbar_inc198.png b/src/main/resources/xpbar/xpbar_inc198.png new file mode 100644 index 000000000..5686b1827 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc198.png differ diff --git a/src/main/resources/xpbar/xpbar_inc199.png b/src/main/resources/xpbar/xpbar_inc199.png new file mode 100644 index 000000000..1df6ec591 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc199.png differ diff --git a/src/main/resources/xpbar/xpbar_inc200.png b/src/main/resources/xpbar/xpbar_inc200.png new file mode 100644 index 000000000..947baef50 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc200.png differ diff --git a/src/main/resources/xpbar/xpbar_inc201.png b/src/main/resources/xpbar/xpbar_inc201.png new file mode 100644 index 000000000..39648ef14 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc201.png differ diff --git a/src/main/resources/xpbar/xpbar_inc202.png b/src/main/resources/xpbar/xpbar_inc202.png new file mode 100644 index 000000000..7b1160ccd Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc202.png differ diff --git a/src/main/resources/xpbar/xpbar_inc203.png b/src/main/resources/xpbar/xpbar_inc203.png new file mode 100644 index 000000000..4d741afc5 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc203.png differ diff --git a/src/main/resources/xpbar/xpbar_inc204.png b/src/main/resources/xpbar/xpbar_inc204.png new file mode 100644 index 000000000..9e435277b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc204.png differ diff --git a/src/main/resources/xpbar/xpbar_inc205.png b/src/main/resources/xpbar/xpbar_inc205.png new file mode 100644 index 000000000..daf861298 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc205.png differ diff --git a/src/main/resources/xpbar/xpbar_inc206.png b/src/main/resources/xpbar/xpbar_inc206.png new file mode 100644 index 000000000..b892e3f2b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc206.png differ diff --git a/src/main/resources/xpbar/xpbar_inc207.png b/src/main/resources/xpbar/xpbar_inc207.png new file mode 100644 index 000000000..df1a32f6f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc207.png differ diff --git a/src/main/resources/xpbar/xpbar_inc208.png b/src/main/resources/xpbar/xpbar_inc208.png new file mode 100644 index 000000000..e073409e3 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc208.png differ diff --git a/src/main/resources/xpbar/xpbar_inc209.png b/src/main/resources/xpbar/xpbar_inc209.png new file mode 100644 index 000000000..672a29aeb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc209.png differ diff --git a/src/main/resources/xpbar/xpbar_inc210.png b/src/main/resources/xpbar/xpbar_inc210.png new file mode 100644 index 000000000..acd2dcfe8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc210.png differ diff --git a/src/main/resources/xpbar/xpbar_inc211.png b/src/main/resources/xpbar/xpbar_inc211.png new file mode 100644 index 000000000..4d1a76bb8 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc211.png differ diff --git a/src/main/resources/xpbar/xpbar_inc212.png b/src/main/resources/xpbar/xpbar_inc212.png new file mode 100644 index 000000000..df4bb0fa7 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc212.png differ diff --git a/src/main/resources/xpbar/xpbar_inc213.png b/src/main/resources/xpbar/xpbar_inc213.png new file mode 100644 index 000000000..e8b93f0c4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc213.png differ diff --git a/src/main/resources/xpbar/xpbar_inc214.png b/src/main/resources/xpbar/xpbar_inc214.png new file mode 100644 index 000000000..c79e908c4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc214.png differ diff --git a/src/main/resources/xpbar/xpbar_inc215.png b/src/main/resources/xpbar/xpbar_inc215.png new file mode 100644 index 000000000..9d2a374f1 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc215.png differ diff --git a/src/main/resources/xpbar/xpbar_inc216.png b/src/main/resources/xpbar/xpbar_inc216.png new file mode 100644 index 000000000..f74d1c59b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc216.png differ diff --git a/src/main/resources/xpbar/xpbar_inc217.png b/src/main/resources/xpbar/xpbar_inc217.png new file mode 100644 index 000000000..1d44500b0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc217.png differ diff --git a/src/main/resources/xpbar/xpbar_inc218.png b/src/main/resources/xpbar/xpbar_inc218.png new file mode 100644 index 000000000..8f6ad5452 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc218.png differ diff --git a/src/main/resources/xpbar/xpbar_inc219.png b/src/main/resources/xpbar/xpbar_inc219.png new file mode 100644 index 000000000..60fca4869 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc219.png differ diff --git a/src/main/resources/xpbar/xpbar_inc220.png b/src/main/resources/xpbar/xpbar_inc220.png new file mode 100644 index 000000000..8c506620f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc220.png differ diff --git a/src/main/resources/xpbar/xpbar_inc221.png b/src/main/resources/xpbar/xpbar_inc221.png new file mode 100644 index 000000000..ed91ae79b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc221.png differ diff --git a/src/main/resources/xpbar/xpbar_inc222.png b/src/main/resources/xpbar/xpbar_inc222.png new file mode 100644 index 000000000..936887d72 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc222.png differ diff --git a/src/main/resources/xpbar/xpbar_inc223.png b/src/main/resources/xpbar/xpbar_inc223.png new file mode 100644 index 000000000..3f4d526ba Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc223.png differ diff --git a/src/main/resources/xpbar/xpbar_inc224.png b/src/main/resources/xpbar/xpbar_inc224.png new file mode 100644 index 000000000..0102c06f0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc224.png differ diff --git a/src/main/resources/xpbar/xpbar_inc225.png b/src/main/resources/xpbar/xpbar_inc225.png new file mode 100644 index 000000000..82396db90 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc225.png differ diff --git a/src/main/resources/xpbar/xpbar_inc226.png b/src/main/resources/xpbar/xpbar_inc226.png new file mode 100644 index 000000000..31f89bc58 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc226.png differ diff --git a/src/main/resources/xpbar/xpbar_inc227.png b/src/main/resources/xpbar/xpbar_inc227.png new file mode 100644 index 000000000..05e8161ab Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc227.png differ diff --git a/src/main/resources/xpbar/xpbar_inc228.png b/src/main/resources/xpbar/xpbar_inc228.png new file mode 100644 index 000000000..196d4534d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc228.png differ diff --git a/src/main/resources/xpbar/xpbar_inc229.png b/src/main/resources/xpbar/xpbar_inc229.png new file mode 100644 index 000000000..7b35443ab Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc229.png differ diff --git a/src/main/resources/xpbar/xpbar_inc230.png b/src/main/resources/xpbar/xpbar_inc230.png new file mode 100644 index 000000000..79087987b Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc230.png differ diff --git a/src/main/resources/xpbar/xpbar_inc231.png b/src/main/resources/xpbar/xpbar_inc231.png new file mode 100644 index 000000000..601c282da Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc231.png differ diff --git a/src/main/resources/xpbar/xpbar_inc232.png b/src/main/resources/xpbar/xpbar_inc232.png new file mode 100644 index 000000000..a40208dc4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc232.png differ diff --git a/src/main/resources/xpbar/xpbar_inc233.png b/src/main/resources/xpbar/xpbar_inc233.png new file mode 100644 index 000000000..a3f1da981 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc233.png differ diff --git a/src/main/resources/xpbar/xpbar_inc234.png b/src/main/resources/xpbar/xpbar_inc234.png new file mode 100644 index 000000000..fa545842a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc234.png differ diff --git a/src/main/resources/xpbar/xpbar_inc235.png b/src/main/resources/xpbar/xpbar_inc235.png new file mode 100644 index 000000000..4d5892f0a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc235.png differ diff --git a/src/main/resources/xpbar/xpbar_inc236.png b/src/main/resources/xpbar/xpbar_inc236.png new file mode 100644 index 000000000..1e4176223 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc236.png differ diff --git a/src/main/resources/xpbar/xpbar_inc237.png b/src/main/resources/xpbar/xpbar_inc237.png new file mode 100644 index 000000000..ae310f00d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc237.png differ diff --git a/src/main/resources/xpbar/xpbar_inc238.png b/src/main/resources/xpbar/xpbar_inc238.png new file mode 100644 index 000000000..a0a9c03eb Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc238.png differ diff --git a/src/main/resources/xpbar/xpbar_inc239.png b/src/main/resources/xpbar/xpbar_inc239.png new file mode 100644 index 000000000..1a33d560a Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc239.png differ diff --git a/src/main/resources/xpbar/xpbar_inc240.png b/src/main/resources/xpbar/xpbar_inc240.png new file mode 100644 index 000000000..417f43db0 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc240.png differ diff --git a/src/main/resources/xpbar/xpbar_inc241.png b/src/main/resources/xpbar/xpbar_inc241.png new file mode 100644 index 000000000..26bc81258 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc241.png differ diff --git a/src/main/resources/xpbar/xpbar_inc242.png b/src/main/resources/xpbar/xpbar_inc242.png new file mode 100644 index 000000000..b1efefaab Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc242.png differ diff --git a/src/main/resources/xpbar/xpbar_inc243.png b/src/main/resources/xpbar/xpbar_inc243.png new file mode 100644 index 000000000..42f8b9dc9 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc243.png differ diff --git a/src/main/resources/xpbar/xpbar_inc244.png b/src/main/resources/xpbar/xpbar_inc244.png new file mode 100644 index 000000000..d6941d28f Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc244.png differ diff --git a/src/main/resources/xpbar/xpbar_inc245.png b/src/main/resources/xpbar/xpbar_inc245.png new file mode 100644 index 000000000..3b780728d Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc245.png differ diff --git a/src/main/resources/xpbar/xpbar_inc246.png b/src/main/resources/xpbar/xpbar_inc246.png new file mode 100644 index 000000000..0933c65b5 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc246.png differ diff --git a/src/main/resources/xpbar/xpbar_inc247.png b/src/main/resources/xpbar/xpbar_inc247.png new file mode 100644 index 000000000..c9016709e Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc247.png differ diff --git a/src/main/resources/xpbar/xpbar_inc248.png b/src/main/resources/xpbar/xpbar_inc248.png new file mode 100644 index 000000000..71825bab4 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc248.png differ diff --git a/src/main/resources/xpbar/xpbar_inc249.png b/src/main/resources/xpbar/xpbar_inc249.png new file mode 100644 index 000000000..7b4398903 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc249.png differ diff --git a/src/main/resources/xpbar/xpbar_inc250.png b/src/main/resources/xpbar/xpbar_inc250.png new file mode 100644 index 000000000..775f931bc Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc250.png differ diff --git a/src/main/resources/xpbar/xpbar_inc251.png b/src/main/resources/xpbar/xpbar_inc251.png new file mode 100644 index 000000000..55c160795 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc251.png differ diff --git a/src/main/resources/xpbar/xpbar_inc252.png b/src/main/resources/xpbar/xpbar_inc252.png new file mode 100644 index 000000000..031f6d27c Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc252.png differ diff --git a/src/main/resources/xpbar/xpbar_inc253.png b/src/main/resources/xpbar/xpbar_inc253.png new file mode 100644 index 000000000..e35d30e52 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc253.png differ diff --git a/src/main/resources/xpbar/xpbar_inc254.png b/src/main/resources/xpbar/xpbar_inc254.png new file mode 100644 index 000000000..eab8c9143 Binary files /dev/null and b/src/main/resources/xpbar/xpbar_inc254.png differ