diff --git a/README.md b/README.md index c616074..ba54b02 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# BobRewards -BobRewards provides a simple key + "crate" rewards system for your players. -It is very simple to setup and use, and configuring the rewards that will be possible to obtain from each crate is all done through an Inventory GUI! - -# Commands & Permissions - -- `/givebox `: Gives you a Rewards Box that players can bring keys to in order to collect rewards. Requires permission: `bob.rewards.give.box`. -- `/givekey `: Gives a key to a player. Requires permission: `bob.rewards.give.key`. +# BobRewards +BobRewards provides a simple key + "crate" rewards system for your players. +It is very simple to setup and use, and configuring the rewards that will be possible to obtain from each crate is all done through an Inventory GUI! + +# Commands & Permissions + +- `/givebox `: Gives you a Rewards Box that players can bring keys to in order to collect rewards. Requires permission: `bob.rewards.give.box`. +- `/givekey `: Gives a key to a player. Requires permission: `bob.rewards.give.key`. - `/setrewards `: Opens up the rewards pool inventory so that you can set the items for the given box. Requires permission: `bob.rewards.set`. \ No newline at end of file diff --git a/pom.xml b/pom.xml index 280d6cd..909d598 100644 --- a/pom.xml +++ b/pom.xml @@ -1,87 +1,87 @@ - - - 4.0.0 - - com.survivorbob - bobrewards - 1.0-RC1 - jar - - BobRewards - - Rewards system that uses boxes which are unlocked with keys to distribute configured rewards. - - - 1.8 - UTF-8 - - https://www.SurvivorBob.com/ - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - ${java.version} - ${java.version} - - - - org.apache.maven.plugins - maven-shade-plugin - 3.2.4 - - - package - - shade - - - false - - - - - - - - src/main/resources - true - - - - - - - spigotmc-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - sonatype - https://oss.sonatype.org/content/groups/public/ - - - jitpack.io - https://jitpack.io - - - - - - org.spigotmc - spigot-api - 1.16.5-R0.1-SNAPSHOT - provided - - - com.github.MilkBowl - VaultAPI - 1.7 - provided - - - + + + 4.0.0 + + com.survivorbob + bobrewards + 1.0-RC1 + jar + + BobRewards + + Rewards system that uses boxes which are unlocked with keys to distribute configured rewards. + + + 1.8 + UTF-8 + + https://www.SurvivorBob.com/ + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + package + + shade + + + false + + + + + + + + src/main/resources + true + + + + + + + spigotmc-repo + https://hub.spigotmc.org/nexus/content/repositories/snapshots/ + + + sonatype + https://oss.sonatype.org/content/groups/public/ + + + jitpack.io + https://jitpack.io + + + + + + org.spigotmc + spigot-api + 1.16.5-R0.1-SNAPSHOT + provided + + + com.github.MilkBowl + VaultAPI + 1.7 + provided + + + diff --git a/src/main/java/com/survivorbob/bobrewards/Commands/GiveKey.java b/src/main/java/com/survivorbob/bobrewards/Commands/GiveKey.java index eb57719..92efd8d 100644 --- a/src/main/java/com/survivorbob/bobrewards/Commands/GiveKey.java +++ b/src/main/java/com/survivorbob/bobrewards/Commands/GiveKey.java @@ -1,84 +1,84 @@ -package com.survivorbob.bobrewards.Commands; - -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; - -import java.util.ArrayList; -import java.util.List; - -public class GiveKey implements CommandExecutor { - @Override - public boolean onCommand(CommandSender sender, Command command, String label, String[] args) - { - if(!sender.hasPermission("bob.rewards.give.key")) - { - return false; - } - Player p = null; - if(!args[1].isEmpty()) - { - p = (Player) sender.getServer().getPlayer(args[1]); - if(p == null) { - sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.RESET + " Could not find player: " + args[1] + "!"); - return true; - } - } else { - p = (Player) sender; - } - ItemStack theKey; - ItemMeta theKeyMeta; - List theLore = new ArrayList(); - switch(args[0].toLowerCase()) { - case "green": - theKey = new ItemStack(Material.PAPER, 1); - theKeyMeta = theKey.getItemMeta(); - theKeyMeta.setDisplayName(ChatColor.GREEN + "Green Key"); - theLore.add("Use this " + ChatColor.GREEN + "Green Key" + ChatColor.RESET + " to claim rewards!"); - theKeyMeta.setLore(theLore); - theKey.setItemMeta(theKeyMeta); - p.getInventory().addItem(theKey); - sender.sendMessage("A " + ChatColor.GREEN + "Green Key" + ChatColor.RESET + " should now be in your inventory!"); - break; - case "blue": - theKey = new ItemStack(Material.PAPER, 1); - theKeyMeta = theKey.getItemMeta(); - theKeyMeta.setDisplayName(ChatColor.BLUE + "Blue Key"); - theLore.add("Use this " + ChatColor.BLUE + "Blue Key" + ChatColor.RESET + " to claim rewards!"); - theKeyMeta.setLore(theLore); - theKey.setItemMeta(theKeyMeta); - p.getInventory().addItem(theKey); - sender.sendMessage("A " + ChatColor.BLUE + "Blue Key" + ChatColor.RESET + " should now be in your inventory!"); - break; - case "red": - theKey = new ItemStack(Material.PAPER, 1); - theKeyMeta = theKey.getItemMeta(); - theKeyMeta.setDisplayName(ChatColor.RED + "Red Key"); - theLore.add("Use this " + ChatColor.RED + "Red Key" + ChatColor.RESET + " to claim rewards!"); - theKeyMeta.setLore(theLore); - theKey.setItemMeta(theKeyMeta); - p.getInventory().addItem(theKey); - sender.sendMessage("A " + ChatColor.RED + "Red Key" + ChatColor.RESET + " should now be in your inventory!"); - break; - case "black": - theKey = new ItemStack(Material.PAPER, 1); - theKeyMeta = theKey.getItemMeta(); - theKeyMeta.setDisplayName(ChatColor.BLACK + "Black Key"); - theLore.add("Use this " + ChatColor.BLACK + "Black Key" + ChatColor.RESET + " to claim rewards!"); - theKeyMeta.setLore(theLore); - theKey.setItemMeta(theKeyMeta); - p.getInventory().addItem(theKey); - sender.sendMessage("A " + ChatColor.BLACK + "Black Key" + ChatColor.RESET + " should now be in your inventory!"); - break; - default: - sender.sendMessage("You must specify a Key of green, blue, red, or black!"); - break; - } - return true; - } -} +package com.survivorbob.bobrewards.Commands; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import java.util.ArrayList; +import java.util.List; + +public class GiveKey implements CommandExecutor { + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if(!sender.hasPermission("bob.rewards.give.key")) + { + return false; + } + Player p = null; + if(!args[1].isEmpty()) + { + p = (Player) sender.getServer().getPlayer(args[1]); + if(p == null) { + sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.RESET + " Could not find player: " + args[1] + "!"); + return true; + } + } else { + p = (Player) sender; + } + ItemStack theKey; + ItemMeta theKeyMeta; + List theLore = new ArrayList(); + switch(args[0].toLowerCase()) { + case "green": + theKey = new ItemStack(Material.PAPER, 1); + theKeyMeta = theKey.getItemMeta(); + theKeyMeta.setDisplayName(ChatColor.GREEN + "Green Key"); + theLore.add("Use this " + ChatColor.GREEN + "Green Key" + ChatColor.RESET + " to claim rewards!"); + theKeyMeta.setLore(theLore); + theKey.setItemMeta(theKeyMeta); + p.getInventory().addItem(theKey); + sender.sendMessage("A " + ChatColor.GREEN + "Green Key" + ChatColor.RESET + " should now be in your inventory!"); + break; + case "blue": + theKey = new ItemStack(Material.PAPER, 1); + theKeyMeta = theKey.getItemMeta(); + theKeyMeta.setDisplayName(ChatColor.BLUE + "Blue Key"); + theLore.add("Use this " + ChatColor.BLUE + "Blue Key" + ChatColor.RESET + " to claim rewards!"); + theKeyMeta.setLore(theLore); + theKey.setItemMeta(theKeyMeta); + p.getInventory().addItem(theKey); + sender.sendMessage("A " + ChatColor.BLUE + "Blue Key" + ChatColor.RESET + " should now be in your inventory!"); + break; + case "red": + theKey = new ItemStack(Material.PAPER, 1); + theKeyMeta = theKey.getItemMeta(); + theKeyMeta.setDisplayName(ChatColor.RED + "Red Key"); + theLore.add("Use this " + ChatColor.RED + "Red Key" + ChatColor.RESET + " to claim rewards!"); + theKeyMeta.setLore(theLore); + theKey.setItemMeta(theKeyMeta); + p.getInventory().addItem(theKey); + sender.sendMessage("A " + ChatColor.RED + "Red Key" + ChatColor.RESET + " should now be in your inventory!"); + break; + case "black": + theKey = new ItemStack(Material.PAPER, 1); + theKeyMeta = theKey.getItemMeta(); + theKeyMeta.setDisplayName(ChatColor.BLACK + "Black Key"); + theLore.add("Use this " + ChatColor.BLACK + "Black Key" + ChatColor.RESET + " to claim rewards!"); + theKeyMeta.setLore(theLore); + theKey.setItemMeta(theKeyMeta); + p.getInventory().addItem(theKey); + sender.sendMessage("A " + ChatColor.BLACK + "Black Key" + ChatColor.RESET + " should now be in your inventory!"); + break; + default: + sender.sendMessage("You must specify a Key of green, blue, red, or black!"); + break; + } + return true; + } +} diff --git a/src/main/java/com/survivorbob/bobrewards/Commands/RewardsBox.java b/src/main/java/com/survivorbob/bobrewards/Commands/RewardsBox.java index ec81d33..8fa3da6 100644 --- a/src/main/java/com/survivorbob/bobrewards/Commands/RewardsBox.java +++ b/src/main/java/com/survivorbob/bobrewards/Commands/RewardsBox.java @@ -1,74 +1,74 @@ -package com.survivorbob.bobrewards.Commands; - -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; - -import java.util.ArrayList; -import java.util.List; - -public class RewardsBox implements CommandExecutor { - @Override - public boolean onCommand(CommandSender sender, Command command, String label, String[] args) - { - if(!sender.hasPermission("bob.rewards.give.box")) - { - return false; - } - Player p = (Player) sender; - ItemStack theBox; - ItemMeta theBoxMeta; - List theLore = new ArrayList(); - switch(args[0].toLowerCase()) { - case "green": - theBox = new ItemStack(Material.GREEN_SHULKER_BOX, 1); - theBoxMeta = theBox.getItemMeta(); - theBoxMeta.setDisplayName(ChatColor.GREEN + "Green Rewards Box"); - theLore.add("Place this box to allow players with " + ChatColor.GREEN + "Green Keys" + ChatColor.RESET + " to claim rewards!"); - theBoxMeta.setLore(theLore); - theBox.setItemMeta(theBoxMeta); - p.getInventory().addItem(theBox); - sender.sendMessage("A " + ChatColor.GREEN + "Green Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); - break; - case "blue": - theBox = new ItemStack(Material.BLUE_SHULKER_BOX, 1); - theBoxMeta = theBox.getItemMeta(); - theBoxMeta.setDisplayName(ChatColor.BLUE + "Blue Rewards Box"); - theLore.add("Place this box to allow players with " + ChatColor.BLUE + "Blue Keys" + ChatColor.RESET + " to claim rewards!"); - theBoxMeta.setLore(theLore); - theBox.setItemMeta(theBoxMeta); - p.getInventory().addItem(theBox); - sender.sendMessage("A " + ChatColor.BLUE + "Blue Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); - break; - case "red": - theBox = new ItemStack(Material.RED_SHULKER_BOX, 1); - theBoxMeta = theBox.getItemMeta(); - theBoxMeta.setDisplayName(ChatColor.RED + "Red Rewards Box"); - theLore.add("Place this box to allow players with " + ChatColor.RED + "Red Keys" + ChatColor.RESET + " to claim rewards!"); - theBoxMeta.setLore(theLore); - theBox.setItemMeta(theBoxMeta); - p.getInventory().addItem(theBox); - sender.sendMessage("A " + ChatColor.RED + "Red Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); - break; - case "black": - theBox = new ItemStack(Material.BLACK_SHULKER_BOX, 1); - theBoxMeta = theBox.getItemMeta(); - theBoxMeta.setDisplayName(ChatColor.BLACK + "Black Rewards Box"); - theLore.add("Place this box to allow players with " + ChatColor.BLACK + "Black Keys" + ChatColor.RESET + " to claim rewards!"); - theBoxMeta.setLore(theLore); - theBox.setItemMeta(theBoxMeta); - p.getInventory().addItem(theBox); - sender.sendMessage("A " + ChatColor.BLACK + "Black Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); - break; - default: - sender.sendMessage("You must specify a rewards box of green, blue, red, or black!"); - break; - } - return true; - } -} +package com.survivorbob.bobrewards.Commands; + +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; + +import java.util.ArrayList; +import java.util.List; + +public class RewardsBox implements CommandExecutor { + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) + { + if(!sender.hasPermission("bob.rewards.give.box")) + { + return false; + } + Player p = (Player) sender; + ItemStack theBox; + ItemMeta theBoxMeta; + List theLore = new ArrayList(); + switch(args[0].toLowerCase()) { + case "green": + theBox = new ItemStack(Material.GREEN_SHULKER_BOX, 1); + theBoxMeta = theBox.getItemMeta(); + theBoxMeta.setDisplayName(ChatColor.GREEN + "Green Rewards Box"); + theLore.add("Place this box to allow players with " + ChatColor.GREEN + "Green Keys" + ChatColor.RESET + " to claim rewards!"); + theBoxMeta.setLore(theLore); + theBox.setItemMeta(theBoxMeta); + p.getInventory().addItem(theBox); + sender.sendMessage("A " + ChatColor.GREEN + "Green Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); + break; + case "blue": + theBox = new ItemStack(Material.BLUE_SHULKER_BOX, 1); + theBoxMeta = theBox.getItemMeta(); + theBoxMeta.setDisplayName(ChatColor.BLUE + "Blue Rewards Box"); + theLore.add("Place this box to allow players with " + ChatColor.BLUE + "Blue Keys" + ChatColor.RESET + " to claim rewards!"); + theBoxMeta.setLore(theLore); + theBox.setItemMeta(theBoxMeta); + p.getInventory().addItem(theBox); + sender.sendMessage("A " + ChatColor.BLUE + "Blue Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); + break; + case "red": + theBox = new ItemStack(Material.RED_SHULKER_BOX, 1); + theBoxMeta = theBox.getItemMeta(); + theBoxMeta.setDisplayName(ChatColor.RED + "Red Rewards Box"); + theLore.add("Place this box to allow players with " + ChatColor.RED + "Red Keys" + ChatColor.RESET + " to claim rewards!"); + theBoxMeta.setLore(theLore); + theBox.setItemMeta(theBoxMeta); + p.getInventory().addItem(theBox); + sender.sendMessage("A " + ChatColor.RED + "Red Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); + break; + case "black": + theBox = new ItemStack(Material.BLACK_SHULKER_BOX, 1); + theBoxMeta = theBox.getItemMeta(); + theBoxMeta.setDisplayName(ChatColor.BLACK + "Black Rewards Box"); + theLore.add("Place this box to allow players with " + ChatColor.BLACK + "Black Keys" + ChatColor.RESET + " to claim rewards!"); + theBoxMeta.setLore(theLore); + theBox.setItemMeta(theBoxMeta); + p.getInventory().addItem(theBox); + sender.sendMessage("A " + ChatColor.BLACK + "Black Rewards Box" + ChatColor.RESET + " should now be in your inventory!"); + break; + default: + sender.sendMessage("You must specify a rewards box of green, blue, red, or black!"); + break; + } + return true; + } +} diff --git a/src/main/java/com/survivorbob/bobrewards/Commands/setRewards.java b/src/main/java/com/survivorbob/bobrewards/Commands/setRewards.java index 5fa9dda..e7aeb6a 100644 --- a/src/main/java/com/survivorbob/bobrewards/Commands/setRewards.java +++ b/src/main/java/com/survivorbob/bobrewards/Commands/setRewards.java @@ -1,72 +1,72 @@ -package com.survivorbob.bobrewards.Commands; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; -import org.bukkit.plugin.Plugin; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Locale; - -public class setRewards implements CommandExecutor { - @Override - public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { - if (!sender.hasPermission("bob.rewards.set")) { - return false; - } - if(args[0].isEmpty()) - { - sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.RESET + "You must specify a rewards box color!"); - return true; - } - String rewards_box; - switch(args[0].toLowerCase()) - { - case "green": - rewards_box = "green"; - break; - case "blue": - rewards_box = "blue"; - break; - case "red": - rewards_box = "red"; - break; - case "black": - rewards_box = "black"; - break; - default: - sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.RESET + "You must specify a rewards box color!"); - return true; - } - Player p = (Player) sender; - - if(p.getInventory().getContents().length <= 0) - { - sender.sendMessage(ChatColor.RED + "Error:" + ChatColor.RESET + " Not enough items in your inventory!"); - return true; - } - - Plugin plugin = sender.getServer().getPluginManager().getPlugin("BobRewards"); - FileConfiguration config = plugin.getConfig(); - - - Inventory rewards_pool_inv = Bukkit.createInventory(null, 54, ChatColor.GOLD + "Rewards Editor: " + rewards_box.toUpperCase(Locale.ENGLISH) + " Rewards"); - - ArrayList rewards_pool = (ArrayList) config.getList("rewards."+rewards_box.toLowerCase()+".items"); - - for(ItemStack item : rewards_pool) { - rewards_pool_inv.addItem(item); - } - - p.openInventory(rewards_pool_inv); - - return true; - } -} +package com.survivorbob.bobrewards.Commands; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.plugin.Plugin; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Locale; + +public class setRewards implements CommandExecutor { + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { + if (!sender.hasPermission("bob.rewards.set")) { + return false; + } + if(args[0].isEmpty()) + { + sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.RESET + "You must specify a rewards box color!"); + return true; + } + String rewards_box; + switch(args[0].toLowerCase()) + { + case "green": + rewards_box = "green"; + break; + case "blue": + rewards_box = "blue"; + break; + case "red": + rewards_box = "red"; + break; + case "black": + rewards_box = "black"; + break; + default: + sender.sendMessage(ChatColor.RED + "Error: " + ChatColor.RESET + "You must specify a rewards box color!"); + return true; + } + Player p = (Player) sender; + + if(p.getInventory().getContents().length <= 0) + { + sender.sendMessage(ChatColor.RED + "Error:" + ChatColor.RESET + " Not enough items in your inventory!"); + return true; + } + + Plugin plugin = sender.getServer().getPluginManager().getPlugin("BobRewards"); + FileConfiguration config = plugin.getConfig(); + + + Inventory rewards_pool_inv = Bukkit.createInventory(null, 54, ChatColor.GOLD + "Rewards Editor: " + rewards_box.toUpperCase(Locale.ENGLISH) + " Rewards"); + + ArrayList rewards_pool = (ArrayList) config.getList("rewards."+rewards_box.toLowerCase()+".items"); + + for(ItemStack item : rewards_pool) { + rewards_pool_inv.addItem(item); + } + + p.openInventory(rewards_pool_inv); + + return true; + } +} diff --git a/src/main/java/com/survivorbob/bobrewards/Events/ClickRewardsBox.java b/src/main/java/com/survivorbob/bobrewards/Events/ClickRewardsBox.java index 6a37141..b19d73d 100644 --- a/src/main/java/com/survivorbob/bobrewards/Events/ClickRewardsBox.java +++ b/src/main/java/com/survivorbob/bobrewards/Events/ClickRewardsBox.java @@ -1,136 +1,136 @@ -package com.survivorbob.bobrewards.Events; - -import net.milkbowl.vault.economy.Economy; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.Material; -import org.bukkit.OfflinePlayer; -import org.bukkit.block.Block; -import org.bukkit.block.Container; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.ItemStack; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.RegisteredServiceProvider; - -import java.util.ArrayList; -import java.util.Random; -import java.util.logging.Logger; - -public class ClickRewardsBox implements Listener { - @EventHandler - public void onRightClickRewardsBox(PlayerInteractEvent event) - { - Block theBox = event.getClickedBlock(); - Player player = (Player) event.getPlayer(); - Logger logger = player.getServer().getLogger(); - Plugin plugin = player.getServer().getPluginManager().getPlugin("BobRewards"); - FileConfiguration config = plugin.getConfig(); - - if(theBox.getState() instanceof Container && ((Container) theBox.getState()).getCustomName().contains("Rewards Box")) - { - event.setCancelled(true); - ItemStack heldItem = player.getInventory().getItemInMainHand(); - - int min_money = 0; - int max_money = 0; - - int min_items = 2; - int max_items = 3; - - ArrayList reward_pool = null; - if(((Container) theBox.getState()).getCustomName().contains(ChatColor.GREEN + "Green Rewards Box")) - { - if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.GREEN + "Green Key")) { - player.sendMessage("You do not have a " + ChatColor.GREEN + "Green Key" + ChatColor.RESET + " in your main hand!"); - return; - } - min_money = config.getInt("rewards.green.money.min"); - max_money = config.getInt("rewards.green.money.max"); - - max_items = (config.getInt("rewards.green.max_items")|config.getInt("default_max_items")|3); - min_items = (config.getInt("rewards.green.min_items")|config.getInt("default_min_items")|2); - - reward_pool = (ArrayList) config.getList("rewards.green.items"); - } - - if(((Container) theBox.getState()).getCustomName().contains(ChatColor.BLUE + "Blue Rewards Box")) - { - if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.BLUE + "Blue Key")) { - player.sendMessage("You do not have a " + ChatColor.BLUE + "Blue Key" + ChatColor.RESET + " in your main hand!"); - return; - } - min_money = config.getInt("rewards.blue.money.min"); - max_money = config.getInt("rewards.blue.money.max"); - - max_items = (config.getInt("rewards.blue.max_items")|config.getInt("default_max_items")|3); - min_items = (config.getInt("rewards.blue.min_items")|config.getInt("default_min_items")|2); - - reward_pool = (ArrayList) config.getList("rewards.blue.items"); - } - - if(((Container) theBox.getState()).getCustomName().contains(ChatColor.RED + "Red Rewards Box")) - { - if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.RED + "Red Key")) { - player.sendMessage("You do not have a " + ChatColor.RED + "Red Key" + ChatColor.RESET + " in your main hand!"); - return; - } - min_money = config.getInt("rewards.red.money.min"); - max_money = config.getInt("rewards.red.money.max"); - - max_items = (config.getInt("rewards.red.max_items")|config.getInt("default_max_items")|3); - min_items = (config.getInt("rewards.red.min_items")|config.getInt("default_min_items")|2); - - reward_pool = (ArrayList) config.getList("rewards.red.items"); - } - - if(((Container) theBox.getState()).getCustomName().contains(ChatColor.BLACK + "Black Rewards Box")) - { - if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.BLACK + "Black Key")) { - player.sendMessage("You do not have a " + ChatColor.BLACK + "Black Key" + ChatColor.RESET + " in your main hand!"); - return; - } - min_money = config.getInt("rewards.black.money.min"); - max_money = config.getInt("rewards.black.money.max"); - - max_items = (config.getInt("rewards.black.max_items")|config.getInt("default_max_items")|3); - min_items = (config.getInt("rewards.black.min_items")|config.getInt("default_min_items")|2); - - reward_pool = (ArrayList) config.getList("rewards.black.items"); - } - - - logger.info(player.getName() + " claimed a " + heldItem.getItemMeta().getDisplayName() + ChatColor.RESET + "!"); - heldItem.setAmount(Math.subtractExact(heldItem.getAmount(), 1)); - player.getInventory().setItemInMainHand(heldItem); - - Inventory rewards = Bukkit.createInventory(null, 36, ChatColor.GOLD + "Rewards Box"); - - Random randomNum = new Random(); - - int myRandNum = randomNum.nextInt((max_items - min_items) + 1); - for(int i = 0; i <= myRandNum; i++) - { - int randSel = randomNum.nextInt(reward_pool.size()-1); - rewards.addItem(reward_pool.get(randSel)); - } - player.openInventory(rewards); - - if(min_money > 0 && max_money > 0) - { - int myRandMoney = randomNum.nextInt((config.getInt("rewards.green.money.max") - config.getInt("rewards.green.money.min"))) + 1; - RegisteredServiceProvider economyService = plugin.getServer().getServicesManager().getRegistration(Economy.class); - Economy economy = economyService.getProvider(); - if(economy != null) - { - economy.depositPlayer((OfflinePlayer) Bukkit.getOfflinePlayer(player.getUniqueId()), myRandMoney); - player.sendMessage("You received " + ChatColor.GREEN + "$" + myRandMoney); - } - } - } - } -} +package com.survivorbob.bobrewards.Events; + +import net.milkbowl.vault.economy.Economy; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.OfflinePlayer; +import org.bukkit.block.Block; +import org.bukkit.block.Container; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.ItemStack; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.RegisteredServiceProvider; + +import java.util.ArrayList; +import java.util.Random; +import java.util.logging.Logger; + +public class ClickRewardsBox implements Listener { + @EventHandler + public void onRightClickRewardsBox(PlayerInteractEvent event) + { + Block theBox = event.getClickedBlock(); + Player player = (Player) event.getPlayer(); + Logger logger = player.getServer().getLogger(); + Plugin plugin = player.getServer().getPluginManager().getPlugin("BobRewards"); + FileConfiguration config = plugin.getConfig(); + + if(theBox.getState() instanceof Container && ((Container) theBox.getState()).getCustomName().contains("Rewards Box")) + { + event.setCancelled(true); + ItemStack heldItem = player.getInventory().getItemInMainHand(); + + int min_money = 0; + int max_money = 0; + + int min_items = 2; + int max_items = 3; + + ArrayList reward_pool = null; + if(((Container) theBox.getState()).getCustomName().contains(ChatColor.GREEN + "Green Rewards Box")) + { + if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.GREEN + "Green Key")) { + player.sendMessage("You do not have a " + ChatColor.GREEN + "Green Key" + ChatColor.RESET + " in your main hand!"); + return; + } + min_money = config.getInt("rewards.green.money.min"); + max_money = config.getInt("rewards.green.money.max"); + + max_items = (config.getInt("rewards.green.max_items")|config.getInt("default_max_items")|3); + min_items = (config.getInt("rewards.green.min_items")|config.getInt("default_min_items")|2); + + reward_pool = (ArrayList) config.getList("rewards.green.items"); + } + + if(((Container) theBox.getState()).getCustomName().contains(ChatColor.BLUE + "Blue Rewards Box")) + { + if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.BLUE + "Blue Key")) { + player.sendMessage("You do not have a " + ChatColor.BLUE + "Blue Key" + ChatColor.RESET + " in your main hand!"); + return; + } + min_money = config.getInt("rewards.blue.money.min"); + max_money = config.getInt("rewards.blue.money.max"); + + max_items = (config.getInt("rewards.blue.max_items")|config.getInt("default_max_items")|3); + min_items = (config.getInt("rewards.blue.min_items")|config.getInt("default_min_items")|2); + + reward_pool = (ArrayList) config.getList("rewards.blue.items"); + } + + if(((Container) theBox.getState()).getCustomName().contains(ChatColor.RED + "Red Rewards Box")) + { + if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.RED + "Red Key")) { + player.sendMessage("You do not have a " + ChatColor.RED + "Red Key" + ChatColor.RESET + " in your main hand!"); + return; + } + min_money = config.getInt("rewards.red.money.min"); + max_money = config.getInt("rewards.red.money.max"); + + max_items = (config.getInt("rewards.red.max_items")|config.getInt("default_max_items")|3); + min_items = (config.getInt("rewards.red.min_items")|config.getInt("default_min_items")|2); + + reward_pool = (ArrayList) config.getList("rewards.red.items"); + } + + if(((Container) theBox.getState()).getCustomName().contains(ChatColor.BLACK + "Black Rewards Box")) + { + if(!heldItem.getType().equals(Material.PAPER) || !heldItem.getItemMeta().getDisplayName().contains(ChatColor.BLACK + "Black Key")) { + player.sendMessage("You do not have a " + ChatColor.BLACK + "Black Key" + ChatColor.RESET + " in your main hand!"); + return; + } + min_money = config.getInt("rewards.black.money.min"); + max_money = config.getInt("rewards.black.money.max"); + + max_items = (config.getInt("rewards.black.max_items")|config.getInt("default_max_items")|3); + min_items = (config.getInt("rewards.black.min_items")|config.getInt("default_min_items")|2); + + reward_pool = (ArrayList) config.getList("rewards.black.items"); + } + + + logger.info(player.getName() + " claimed a " + heldItem.getItemMeta().getDisplayName() + ChatColor.RESET + "!"); + heldItem.setAmount(Math.subtractExact(heldItem.getAmount(), 1)); + player.getInventory().setItemInMainHand(heldItem); + + Inventory rewards = Bukkit.createInventory(null, 36, ChatColor.GOLD + "Rewards Box"); + + Random randomNum = new Random(); + + int myRandNum = randomNum.nextInt((max_items - min_items) + 1); + for(int i = 0; i <= myRandNum; i++) + { + int randSel = randomNum.nextInt(reward_pool.size()-1); + rewards.addItem(reward_pool.get(randSel)); + } + player.openInventory(rewards); + + if(min_money > 0 && max_money > 0) + { + int myRandMoney = randomNum.nextInt((config.getInt("rewards.green.money.max") - config.getInt("rewards.green.money.min"))) + 1; + RegisteredServiceProvider economyService = plugin.getServer().getServicesManager().getRegistration(Economy.class); + Economy economy = economyService.getProvider(); + if(economy != null) + { + economy.depositPlayer((OfflinePlayer) Bukkit.getOfflinePlayer(player.getUniqueId()), myRandMoney); + player.sendMessage("You received " + ChatColor.GREEN + "$" + myRandMoney); + } + } + } + } +} diff --git a/src/main/java/com/survivorbob/bobrewards/Events/InventoryCloseEvent.java b/src/main/java/com/survivorbob/bobrewards/Events/InventoryCloseEvent.java index 3066cf7..0537b80 100644 --- a/src/main/java/com/survivorbob/bobrewards/Events/InventoryCloseEvent.java +++ b/src/main/java/com/survivorbob/bobrewards/Events/InventoryCloseEvent.java @@ -1,57 +1,57 @@ -package com.survivorbob.bobrewards.Events; - -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; -import org.bukkit.configuration.file.FileConfiguration; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.InventoryView; -import org.bukkit.inventory.ItemStack; -import org.bukkit.plugin.Plugin; - -import java.util.ArrayList; -import java.util.logging.Logger; - -public class InventoryCloseEvent implements Listener { - @EventHandler - public void onCloseInventory(org.bukkit.event.inventory.InventoryCloseEvent event) - { - Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin("BobRewards"); - FileConfiguration config = plugin.getConfig(); - Inventory inv = event.getInventory(); - InventoryView alsoInv = inv.getViewers().get(0).getOpenInventory(); - - if(alsoInv.getTitle().startsWith(ChatColor.GOLD + "Rewards Editor: ")) - { - Player vp = (Player) Bukkit.getServer().getPlayer(inv.getViewers().get(0).getUniqueId()); - Logger logger = Bukkit.getLogger(); - if(!vp.hasPermission("bob.rewards.set")) - { - logger.warning(vp.getName() + " tried to edit rewards!"); - return; - } - String theBoxName = alsoInv.getTitle().toLowerCase(); - theBoxName = theBoxName.replaceAll(".*rewards editor: ", ""); - theBoxName = theBoxName.replaceAll(" rewards$", ""); - ArrayList toSave = new ArrayList(); - for(ItemStack theItem : inv.getContents()) - { - if(theItem != null) - { - toSave.add(theItem); - } - } - config.set("rewards." + theBoxName + ".items", toSave); - try { - vp.sendMessage("Saving Reward items for " + theBoxName.toUpperCase()); - plugin.saveConfig(); - vp.sendMessage("Wrote reward items to configuration file!"); - } catch (Exception e) { - vp.sendMessage("Failed to write to configuration!"); - } - } - } -} +package com.survivorbob.bobrewards.Events; + +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryView; +import org.bukkit.inventory.ItemStack; +import org.bukkit.plugin.Plugin; + +import java.util.ArrayList; +import java.util.logging.Logger; + +public class InventoryCloseEvent implements Listener { + @EventHandler + public void onCloseInventory(org.bukkit.event.inventory.InventoryCloseEvent event) + { + Plugin plugin = Bukkit.getServer().getPluginManager().getPlugin("BobRewards"); + FileConfiguration config = plugin.getConfig(); + Inventory inv = event.getInventory(); + InventoryView alsoInv = inv.getViewers().get(0).getOpenInventory(); + + if(alsoInv.getTitle().startsWith(ChatColor.GOLD + "Rewards Editor: ")) + { + Player vp = (Player) Bukkit.getServer().getPlayer(inv.getViewers().get(0).getUniqueId()); + Logger logger = Bukkit.getLogger(); + if(!vp.hasPermission("bob.rewards.set")) + { + logger.warning(vp.getName() + " tried to edit rewards!"); + return; + } + String theBoxName = alsoInv.getTitle().toLowerCase(); + theBoxName = theBoxName.replaceAll(".*rewards editor: ", ""); + theBoxName = theBoxName.replaceAll(" rewards$", ""); + ArrayList toSave = new ArrayList(); + for(ItemStack theItem : inv.getContents()) + { + if(theItem != null) + { + toSave.add(theItem); + } + } + config.set("rewards." + theBoxName + ".items", toSave); + try { + vp.sendMessage("Saving Reward items for " + theBoxName.toUpperCase()); + plugin.saveConfig(); + vp.sendMessage("Wrote reward items to configuration file!"); + } catch (Exception e) { + vp.sendMessage("Failed to write to configuration!"); + } + } + } +} diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e1a2449..e875500 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,321 +1,321 @@ -default_min_items: 1 -default_max_items: 4 -rewards: - green: - min_items: 2 - max_items: 5 - money: - min: 100 - max: 1000 - items: - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: IRON_SWORD - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - DAMAGE_ALL: 2 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: BOW - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - ARROW_INFINITE: 1 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: ARROW - amount: 64 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: IRON_HELMET - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 2 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: IRON_CHESTPLATE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 2 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: IRON_LEGGINGS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 2 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: IRON_BOOTS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 2 - blue: - min_items: 2 - max_items: 5 - money: - min: 500 - max: 2500 - items: - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_SWORD - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - SWEEPING_EDGE: 3 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_HELMET - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_CHESTPLATE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_LEGGINGS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_BOOTS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_PICKAXE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - SILK_TOUCH: 1 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_AXE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - SILK_TOUCH: 1 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_SHOVEL - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: FISHING_ROD - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - LUCK: 3 - LURE: 3 - DURABILITY: 3 - red: - min_items: 3 - max_items: 5 - money: - min: 1500 - max: 5000 - items: - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: FISHING_ROD - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - LUCK: 3 - LURE: 3 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_PICKAXE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - SILK_TOUCH: 1 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_AXE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - SILK_TOUCH: 1 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_SHOVEL - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_HELMET - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_CHESTPLATE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_LEGGINGS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_BOOTS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_FALL: 4 - PROTECTION_ENVIRONMENTAL: 4 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: DIAMOND_SWORD - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - DAMAGE_ALL: 5 - black: - min_items: 3 - max_items: 5 - money: - min: 2500 - max: 10000 - items: - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_SWORD - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - DAMAGE_ALL: 5 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_HELMET - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_CHESTPLATE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_LEGGINGS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_BOOTS - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - PROTECTION_FALL: 4 - PROTECTION_ENVIRONMENTAL: 4 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: BOW - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - ARROW_FIRE: 1 - ARROW_INFINITE: 1 - ARROW_DAMAGE: 5 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_PICKAXE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - LOOT_BONUS_BLOCKS: 3 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: NETHERITE_AXE - meta: - ==: ItemMeta - meta-type: UNSPECIFIC - enchants: - LOOT_BONUS_BLOCKS: 3 - DURABILITY: 3 - - ==: org.bukkit.inventory.ItemStack - v: 2586 - type: GOLDEN_APPLE - amount: 16 +default_min_items: 1 +default_max_items: 4 +rewards: + green: + min_items: 2 + max_items: 5 + money: + min: 100 + max: 1000 + items: + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: IRON_SWORD + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + DAMAGE_ALL: 2 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: BOW + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + ARROW_INFINITE: 1 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: ARROW + amount: 64 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: IRON_HELMET + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 2 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: IRON_CHESTPLATE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 2 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: IRON_LEGGINGS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 2 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: IRON_BOOTS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 2 + blue: + min_items: 2 + max_items: 5 + money: + min: 500 + max: 2500 + items: + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_SWORD + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + SWEEPING_EDGE: 3 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_HELMET + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_CHESTPLATE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_LEGGINGS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_BOOTS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_PICKAXE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + SILK_TOUCH: 1 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_AXE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + SILK_TOUCH: 1 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_SHOVEL + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: FISHING_ROD + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + LUCK: 3 + LURE: 3 + DURABILITY: 3 + red: + min_items: 3 + max_items: 5 + money: + min: 1500 + max: 5000 + items: + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: FISHING_ROD + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + LUCK: 3 + LURE: 3 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_PICKAXE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + SILK_TOUCH: 1 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_AXE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + SILK_TOUCH: 1 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_SHOVEL + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_HELMET + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_CHESTPLATE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_LEGGINGS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_BOOTS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_FALL: 4 + PROTECTION_ENVIRONMENTAL: 4 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: DIAMOND_SWORD + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + DAMAGE_ALL: 5 + black: + min_items: 3 + max_items: 5 + money: + min: 2500 + max: 10000 + items: + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_SWORD + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + DAMAGE_ALL: 5 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_HELMET + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_CHESTPLATE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_LEGGINGS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_BOOTS + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + PROTECTION_FALL: 4 + PROTECTION_ENVIRONMENTAL: 4 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: BOW + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + ARROW_FIRE: 1 + ARROW_INFINITE: 1 + ARROW_DAMAGE: 5 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_PICKAXE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + LOOT_BONUS_BLOCKS: 3 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: NETHERITE_AXE + meta: + ==: ItemMeta + meta-type: UNSPECIFIC + enchants: + LOOT_BONUS_BLOCKS: 3 + DURABILITY: 3 + - ==: org.bukkit.inventory.ItemStack + v: 2586 + type: GOLDEN_APPLE + amount: 16 conf_version: 1.0 \ No newline at end of file