Skip to content

Commit

Permalink
Updated Gem boosters
Browse files Browse the repository at this point in the history
Previously, a CitizensListener was being initialized in place of a GemBoosterListener.
  • Loading branch information
MrEminent42 authored Dec 1, 2017
1 parent 04b8aad commit 4205472
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/me/mrCookieSlime/QuickSell/QuickSell.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void onSell(Player p, Type type, int itemsSold, double money) {

if (isMCMMOInstalled()) new MCMMOBoosterListener(this);
if (isCitizensInstalled()) new CitizensListener(this);
if (isPrisonGemsInstalled()) new CitizensListener(this);
if (isPrisonGemsInstalled()) new GemBoosterListener(this);

for (int i = 0; i < 1000; i++) {
if (new File("data-storage/QuickSell/boosters/" + i + ".booster").exists()) {
Expand Down Expand Up @@ -349,12 +349,12 @@ else if (cmd.getName().equalsIgnoreCase("booster")) {
}
}
catch(NumberFormatException x) {
sender.sendMessage("§4Usage: §c/booster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
sender.sendMessage("§4Usage: §c/booster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
}
}
else local.sendTranslation(sender, "commands.booster.permission", false);
}
else sender.sendMessage("§4Usage: §c/booster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
else sender.sendMessage("§4Usage: §c/booster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
}
else if (cmd.getName().equalsIgnoreCase("pbooster")) {
if (args.length == 4) {
Expand Down Expand Up @@ -394,12 +394,12 @@ else if (cmd.getName().equalsIgnoreCase("pbooster")) {
}
}
catch(NumberFormatException x) {
sender.sendMessage("§4Usage: §c/pbooster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
sender.sendMessage("§4Usage: §c/pbooster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
}
}
else local.sendTranslation(sender, "commands.booster.permission", false);
}
else sender.sendMessage("§4Usage: §c/pbooster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
else sender.sendMessage("§4Usage: §c/pbooster <all/monetary/prisongems/exp/mcmmo/casino> <Name of the Player> <Multiplier> <Duration in Minutes>");
}
else if (cmd.getName().equalsIgnoreCase("boosters")) {
if (sender instanceof Player) BoosterMenu.showBoosterOverview((Player) sender);
Expand All @@ -416,7 +416,7 @@ else if (args[0].equalsIgnoreCase("editor")) {
if (sender instanceof Player) editor.openEditor((Player) sender);
}
else if (args[0].equalsIgnoreCase("edit")) {
sender.sendMessage("§4DEPRECATED! Use §c/quicksell editor §4instead!");
sender.sendMessage("§4DEPRECATED! Use §c/quicksell editor §4instead!");
if (args.length == 4) {
if (Shop.getShop(args[1]) != null) {
boolean number = true;
Expand All @@ -438,7 +438,7 @@ else if (args[0].equalsIgnoreCase("edit")) {
else local.sendTranslation(sender, "commands.usage", false, new Variable("%usage%", "/quicksell edit <ShopName> <Item> <Price>"));
}
else if (args[0].equalsIgnoreCase("create")) {
sender.sendMessage("§4DEPRECATED! Use §c/quicksell editor §4instead!");
sender.sendMessage("§4DEPRECATED! Use §c/quicksell editor §4instead!");
if (args.length == 2) {
List<String> list = new ArrayList<String>();
for (Shop shop: Shop.list()) {
Expand All @@ -453,7 +453,7 @@ else if (args[0].equalsIgnoreCase("create")) {
else local.sendTranslation(sender, "commands.usage", false, new Variable("%usage%", "/quicksell create <ShopName>"));
}
else if (args[0].equalsIgnoreCase("delete")) {
sender.sendMessage("§4DEPRECATED! Use §c/quicksell editor §4instead!");
sender.sendMessage("§4DEPRECATED! Use §c/quicksell editor §4instead!");
if (Shop.getShop(args[1]) == null) local.sendTranslation(sender, "messages.unknown-shop", false);
else if (args.length == 2) {
List<String> list = new ArrayList<String>();
Expand All @@ -470,37 +470,37 @@ else if (args.length == 2) {
}
else if (args[0].equalsIgnoreCase("linknpc")) {
if (!isCitizensInstalled()) {
sender.sendMessage("§4You do not have Citizens installed!");
sender.sendMessage("§4You do not have Citizens installed!");
return true;
}

if (args.length == 3) {
NPC npc = CitizensAPI.getDefaultNPCSelector().getSelected(sender);
if (npc == null) sender.sendMessage("§cYou must select an NPC before linking it!");
if (npc == null) sender.sendMessage("§cYou must select an NPC before linking it!");
else if (Shop.getShop(args[1]) == null) local.sendTranslation(sender, "messages.unknown-shop", false);
else if (!args[2].equalsIgnoreCase("sell") && !args[2].equalsIgnoreCase("sellall"));
else {
npcs.setValue(String.valueOf(npc.getId()), args[1] + " ; " + args[2].toUpperCase());
npcs.save();
sender.sendMessage(npc.getName() + " §7is now a Remote §r" + StringUtils.format(args[2]) + "§7Shop for the Shop §r" + args[1] + "§7");
sender.sendMessage(npc.getName() + " §7is now a Remote §r" + StringUtils.format(args[2]) + "§7Shop for the Shop §r" + args[1] + "§7");
}
}
else local.sendTranslation(sender, "commands.usage", false, new Variable("%usage%", "/quicksell linknpc <ShopName> <sell/sellall>"));
}
else if (args[0].equalsIgnoreCase("unlinknpc")) {
if (!isCitizensInstalled()) {
sender.sendMessage("§4You do not have Citizens installed!");
sender.sendMessage("§4You do not have Citizens installed!");
return true;
}

NPC npc = CitizensAPI.getDefaultNPCSelector().getSelected(sender);
if (npc == null) sender.sendMessage("§cYou must select an NPC before linking it!");
if (npc == null) sender.sendMessage("§cYou must select an NPC before linking it!");
else if (npcs.contains(String.valueOf(npc.getId()))) {
npcs.setValue(String.valueOf(npc.getId()), null);
npcs.save();
sender.sendMessage(npc.getName() + " §cis no longer linked to any Shop!");
sender.sendMessage(npc.getName() + " §cis no longer linked to any Shop!");
}
else sender.sendMessage(npc.getName() + " §cis not linked to any Shop!");
else sender.sendMessage(npc.getName() + " §cis not linked to any Shop!");
}
else if (args[0].equalsIgnoreCase("stopboosters")) {
if (args.length == 2) {
Expand Down Expand Up @@ -536,15 +536,15 @@ else if (args.length == 1) {

private void sendHelpMessager(CommandSender sender) {
sender.sendMessage("");
sender.sendMessage("§e§lQuickSell v" + getDescription().getVersion() + " by §6mrCookieSlime");
sender.sendMessage("§e§lQuickSell v" + getDescription().getVersion() + " by §6mrCookieSlime");
sender.sendMessage("");
sender.sendMessage("§7\u21E8 /quicksell: §bDisplays this Help Menu");
sender.sendMessage("§7\u21E8 /quicksell reload: §bReloads all of QuickSell's Files and Systems");
sender.sendMessage("§7\u21E8 /quicksell editor: §bOpens up the Ingame Shop Editor");
sender.sendMessage("§7\u21E8 /quicksell stopboosters [Player]: §bStops certain Boosters");
sender.sendMessage("§7\u21E8 /quicksell: §bDisplays this Help Menu");
sender.sendMessage("§7\u21E8 /quicksell reload: §bReloads all of QuickSell's Files and Systems");
sender.sendMessage("§7\u21E8 /quicksell editor: §bOpens up the Ingame Shop Editor");
sender.sendMessage("§7\u21E8 /quicksell stopboosters [Player]: §bStops certain Boosters");
if (isCitizensInstalled()) {
sender.sendMessage("§7\u21E8 /quicksell linknpc <Shop> <sell/sellall>: §bLinks a Citizens NPC to a Shop");
sender.sendMessage("§7\u21E8 /quicksell unlinknpc: §bUnlinks your selected NPC from a Shop");
sender.sendMessage("§7\u21E8 /quicksell linknpc <Shop> <sell/sellall>: §bLinks a Citizens NPC to a Shop");
sender.sendMessage("§7\u21E8 /quicksell unlinknpc: §bUnlinks your selected NPC from a Shop");
}
}

Expand Down

0 comments on commit 4205472

Please sign in to comment.