From 171eec5a373e88c42f9f442d273bbf93d38c7cda Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Mon, 1 Dec 2014 00:05:57 -0800 Subject: [PATCH] Removed reward logging. --- .../src/mineplex/core/reward/Reward.java | 10 +- .../mineplex/core/reward/RewardManager.java | 149 ++++++++---------- .../core/reward/RewardRepository.java | 52 ------ .../core/reward/rewards/CoinReward.java | 8 +- .../core/reward/rewards/InventoryReward.java | 8 +- .../core/reward/rewards/PetReward.java | 5 +- .../reward/rewards/UnknownPackageReward.java | 4 +- 7 files changed, 80 insertions(+), 156 deletions(-) delete mode 100644 Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRepository.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java index 2a6df5926..67659dc64 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/Reward.java @@ -11,24 +11,18 @@ public abstract class Reward { protected static final Random RANDOM = new Random(); - // Reward Manager used to log rewards given to players. - private RewardManager _rewardManager; - private RewardRarity _rarity; private int _weight; - public Reward(RewardManager rewardManager, RewardRarity rarity, int weight) + public Reward(RewardRarity rarity, int weight) { - _rewardManager = rewardManager; _rarity = rarity; _weight = weight; } public final RewardData giveReward(String type, Player player) { - RewardData rewardData = giveRewardCustom(player); - _rewardManager.logReward(player, type, getRarity().name(), rewardData.getFriendlyName()); - return rewardData; + return giveRewardCustom(player); } protected abstract RewardData giveRewardCustom(Player player); diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java index cb9bf6192..8a1f0aa54 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardManager.java @@ -20,13 +20,9 @@ import mineplex.core.reward.rewards.InventoryReward; import mineplex.core.reward.rewards.PetReward; import mineplex.core.reward.rewards.UnknownPackageReward; -/** - * Created by shaun on 2014-09-04. - */ public class RewardManager { private JavaPlugin _plugin; - private RewardRepository _repository; private HashMap> _treasureMap; private Random _random; @@ -40,7 +36,6 @@ public class RewardManager boolean doubleGadgetValue) { _plugin = donationManager.GetPlugin(); - _repository = new RewardRepository(_plugin); _treasureMap = new HashMap>(); _random = new Random(); @@ -62,7 +57,7 @@ public class RewardManager RewardRarity rarity = RewardRarity.COMMON; // Coins - addReward(new CoinReward(this, donationManager, (int)minValue, (int)maxValue, 1, rarity)); + addReward(new CoinReward(donationManager, (int)minValue, (int)maxValue, 1, rarity)); //Increase Value if (_doubleGadgetValue) @@ -72,31 +67,31 @@ public class RewardManager } // Gadgets - addReward(new InventoryReward(this, inventoryManager, "Paintball Gun Ammo", "Paintball Gun", + addReward(new InventoryReward(inventoryManager, "Paintball Gun Ammo", "Paintball Gun", (int)(100*(minValue/500)), (int)(100*(maxValue/500)), new ItemStack(Material.GOLD_BARDING), rarity, 1)); - addReward(new InventoryReward(this, inventoryManager, "Fireworks", "Fireworks", + addReward(new InventoryReward(inventoryManager, "Fireworks", "Fireworks", (int)(50*(minValue/500)), (int)(50*(maxValue/500)), new ItemStack(Material.FIREWORK), rarity, 1)); - addReward(new InventoryReward(this, inventoryManager, "Melon Launcher Ammo", "Melon Launcher", + addReward(new InventoryReward(inventoryManager, "Melon Launcher Ammo", "Melon Launcher", (int)(50*(minValue/500)), (int)(50*(maxValue/500)), new ItemStack(Material.MELON_BLOCK), rarity, 1)); - addReward(new InventoryReward(this, inventoryManager, "Flesh Hooks", "Flesh Hook", + addReward(new InventoryReward(inventoryManager, "Flesh Hooks", "Flesh Hook", (int)(40*(minValue/500)), (int)(40*(maxValue/500)), new ItemStack(Material.getMaterial(131)), rarity, 1)); - addReward(new InventoryReward(this, inventoryManager, "Ethereal Pearls", "Ethereal Pearl", + addReward(new InventoryReward(inventoryManager, "Ethereal Pearls", "Ethereal Pearl", (int)(30*(minValue/500)), (int)(30*(maxValue/500)), new ItemStack(Material.ENDER_PEARL), rarity, 1)); - addReward(new InventoryReward(this, inventoryManager, "Bat Blaster Ammo", "Bat Blaster", + addReward(new InventoryReward(inventoryManager, "Bat Blaster Ammo", "Bat Blaster", (int)(20*(minValue/500)), (int)(20*(maxValue/500)), new ItemStack(Material.IRON_BARDING), rarity, 1)); - addReward(new InventoryReward(this, inventoryManager, "TNT", "TNT", + addReward(new InventoryReward(inventoryManager, "TNT", "TNT", (int)(20*(minValue/500)), (int)(20*(maxValue/500)), new ItemStack(Material.TNT), rarity, 1)); } @@ -106,7 +101,7 @@ public class RewardManager RewardRarity rarity = RewardRarity.UNCOMMON; // Coins - addReward(new CoinReward(this, donationManager, (int)minValue, (int)maxValue, 250, RewardRarity.UNCOMMON)); + addReward(new CoinReward(donationManager, (int)minValue, (int)maxValue, 250, RewardRarity.UNCOMMON)); //Increase Value if (_doubleGadgetValue) @@ -116,74 +111,74 @@ public class RewardManager } // Gadgets - addReward(new InventoryReward(this, inventoryManager, "Paintball Gun Ammo", "Paintball Gun", + addReward(new InventoryReward(inventoryManager, "Paintball Gun Ammo", "Paintball Gun", (int)(100*(minValue/500)), (int)(100*(maxValue/500)), new ItemStack(Material.GOLD_BARDING), rarity, 250)); - addReward(new InventoryReward(this, inventoryManager, "Fireworks", "Fireworks", + addReward(new InventoryReward(inventoryManager, "Fireworks", "Fireworks", (int)(50*(minValue/500)), (int)(50*(maxValue/500)), new ItemStack(Material.FIREWORK), rarity, 250)); - addReward(new InventoryReward(this, inventoryManager, "Melon Launcher Ammo", "Melon Launcher", + addReward(new InventoryReward(inventoryManager, "Melon Launcher Ammo", "Melon Launcher", (int)(50*(minValue/500)), (int)(50*(maxValue/500)), new ItemStack(Material.MELON_BLOCK), rarity, 250)); - addReward(new InventoryReward(this, inventoryManager, "Flesh Hook Ammo", "Flesh Hook", + addReward(new InventoryReward(inventoryManager, "Flesh Hook Ammo", "Flesh Hook", (int)(40*(minValue/500)), (int)(40*(maxValue/500)), new ItemStack(Material.getMaterial(131)), rarity, 250)); - addReward(new InventoryReward(this, inventoryManager, "Ethereal Pearls", "Ethereal Pearl", + addReward(new InventoryReward(inventoryManager, "Ethereal Pearls", "Ethereal Pearl", (int)(30*(minValue/500)), (int)(30*(maxValue/500)), new ItemStack(Material.ENDER_PEARL), rarity, 250)); - addReward(new InventoryReward(this, inventoryManager, "Bat Blaster Ammo", "Bat Blaster", + addReward(new InventoryReward(inventoryManager, "Bat Blaster Ammo", "Bat Blaster", (int)(20*(minValue/500)), (int)(20*(maxValue/500)), new ItemStack(Material.IRON_BARDING), rarity, 250)); - addReward(new InventoryReward(this, inventoryManager, "TNT", "TNT", + addReward(new InventoryReward(inventoryManager, "TNT", "TNT", (int)(20*(minValue/500)), (int)(20*(maxValue/500)), new ItemStack(Material.TNT), rarity, 250)); // Pets - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Cow Pet", "Cow", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Cow Pet", "Cow", EntityType.COW, rarity, 500)); - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Sheep Pet", "Sheep", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Sheep Pet", "Sheep", EntityType.SHEEP, rarity, 333)); - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Mooshroom Pet", "Mooshroom", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Mooshroom Pet", "Mooshroom", EntityType.MUSHROOM_COW, rarity, 200)); - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Pig Pet", "Pig", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Pig Pet", "Pig", EntityType.PIG, rarity, 200)); - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Ocelot Pet", "Cat", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Ocelot Pet", "Cat", EntityType.OCELOT, rarity, 167)); - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Chicken Pet", "Chicken", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Chicken Pet", "Chicken", EntityType.CHICKEN, rarity, 143)); - addReward(new PetReward(petManager, inventoryManager, this, donationManager, "Wolf Pet", "Dog", + addReward(new PetReward(petManager, inventoryManager, donationManager, "Wolf Pet", "Dog", EntityType.WOLF, rarity, 125)); // Music Discs - addReward(new UnknownPackageReward(this, donationManager, "13 Disc", "13 Disc", + addReward(new UnknownPackageReward(donationManager, "13 Disc", "13 Disc", new ItemStack(2256), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Cat Disc", "Cat Disc", + addReward(new UnknownPackageReward(donationManager, "Cat Disc", "Cat Disc", new ItemStack(2257), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Blocks Disc", "Blocks Disc", + addReward(new UnknownPackageReward(donationManager, "Blocks Disc", "Blocks Disc", new ItemStack(2258), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Chirp Disc", "Chirp Disc", + addReward(new UnknownPackageReward(donationManager, "Chirp Disc", "Chirp Disc", new ItemStack(2259), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Far Disc", "Far Disc", + addReward(new UnknownPackageReward(donationManager, "Far Disc", "Far Disc", new ItemStack(2260), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Mall Disc", "Mall Disc", + addReward(new UnknownPackageReward(donationManager, "Mall Disc", "Mall Disc", new ItemStack(2261), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Mellohi Disc", "Mellohi Disc", + addReward(new UnknownPackageReward(donationManager, "Mellohi Disc", "Mellohi Disc", new ItemStack(2262), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Stal Disc", "Stal Disc", + addReward(new UnknownPackageReward(donationManager, "Stal Disc", "Stal Disc", new ItemStack(2263), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Strad Disc", "Strad Disc", + addReward(new UnknownPackageReward(donationManager, "Strad Disc", "Strad Disc", new ItemStack(2264), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Ward Disc", "Ward Disc", + addReward(new UnknownPackageReward(donationManager, "Ward Disc", "Ward Disc", new ItemStack(2265), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "11 Disc", "11 Disc", + addReward(new UnknownPackageReward(donationManager, "11 Disc", "11 Disc", new ItemStack(2266), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Wait Disc", "Wait Disc", + addReward(new UnknownPackageReward(donationManager, "Wait Disc", "Wait Disc", new ItemStack(2267), rarity, 25)); } @@ -192,49 +187,49 @@ public class RewardManager RewardRarity rarity = RewardRarity.RARE; // Coins - addReward(new CoinReward(this, donationManager, (int)minValue, (int)maxValue, 100, RewardRarity.RARE)); + addReward(new CoinReward(donationManager, (int)minValue, (int)maxValue, 100, RewardRarity.RARE)); // Mounts - addReward(new UnknownPackageReward(this, donationManager, "Mount Mule", "Mount Mule", + addReward(new UnknownPackageReward(donationManager, "Mount Mule", "Mount Mule", new ItemStack(Material.HAY_BLOCK), rarity, 200)); - addReward(new UnknownPackageReward(this, donationManager, "Minecart Mount", "Minecart", + addReward(new UnknownPackageReward(donationManager, "Minecart Mount", "Minecart", new ItemStack(Material.MINECART), rarity, 100)); - addReward(new UnknownPackageReward(this, donationManager, "Slime Mount", "Slime Mount", + addReward(new UnknownPackageReward(donationManager, "Slime Mount", "Slime Mount", new ItemStack(Material.SLIME_BALL), rarity, 67)); - addReward(new UnknownPackageReward(this, donationManager, "Glacial Steed", "Glacial Steed", + addReward(new UnknownPackageReward(donationManager, "Glacial Steed", "Glacial Steed", new ItemStack(Material.SNOW_BALL), rarity, 50)); // Morphs - addReward(new UnknownPackageReward(this, donationManager, "Cow Morph", "Cow Morph", + addReward(new UnknownPackageReward(donationManager, "Cow Morph", "Cow Morph", new ItemStack(Material.LEATHER), rarity, 167)); - addReward(new UnknownPackageReward(this, donationManager, "Villager Morph", "Villager Morph", + addReward(new UnknownPackageReward(donationManager, "Villager Morph", "Villager Morph", new ItemStack(Material.EMERALD), rarity, 83)); - addReward(new UnknownPackageReward(this, donationManager, "Chicken Morph", "Chicken Morph", + addReward(new UnknownPackageReward(donationManager, "Chicken Morph", "Chicken Morph", new ItemStack(Material.FEATHER), rarity, 50)); - addReward(new UnknownPackageReward(this, donationManager, "Enderman Morph", "Enderman Morph", + addReward(new UnknownPackageReward(donationManager, "Enderman Morph", "Enderman Morph", new ItemStack(Material.ENDER_PEARL), rarity, 33)); // Gadgets - addReward(new InventoryReward(this, inventoryManager, "Coin Party Bomb", "Coin Party Bomb", 1, 1, + addReward(new InventoryReward(inventoryManager, "Coin Party Bomb", "Coin Party Bomb", 1, 1, new ItemStack(Material.getMaterial(175)), rarity, 100)); // Costumes - addReward(new UnknownPackageReward(this, donationManager, "Rave Hat", "Rave Hat", + addReward(new UnknownPackageReward(donationManager, "Rave Hat", "Rave Hat", new ItemStack(Material.LEATHER_HELMET), rarity, 30)); - addReward(new UnknownPackageReward(this, donationManager, "Rave Shirt", "Rave Shirt", + addReward(new UnknownPackageReward(donationManager, "Rave Shirt", "Rave Shirt", new ItemStack(Material.LEATHER_CHESTPLATE), rarity, 30)); - addReward(new UnknownPackageReward(this, donationManager, "Rave Pants", "Rave Pants", + addReward(new UnknownPackageReward(donationManager, "Rave Pants", "Rave Pants", new ItemStack(Material.LEATHER_LEGGINGS), rarity, 30)); - addReward(new UnknownPackageReward(this, donationManager, "Rave Boots", "Rave Boots", + addReward(new UnknownPackageReward(donationManager, "Rave Boots", "Rave Boots", new ItemStack(Material.LEATHER_BOOTS), rarity, 30)); - addReward(new UnknownPackageReward(this, donationManager, "Space Helmet", "Space Helmet", + addReward(new UnknownPackageReward(donationManager, "Space Helmet", "Space Helmet", new ItemStack(Material.GLASS), rarity, 50)); - addReward(new UnknownPackageReward(this, donationManager, "Space Jacket", "Space Jacket", + addReward(new UnknownPackageReward(donationManager, "Space Jacket", "Space Jacket", new ItemStack(Material.GOLD_CHESTPLATE), rarity, 50)); - addReward(new UnknownPackageReward(this, donationManager, "Space Pants", "Space Pants", + addReward(new UnknownPackageReward(donationManager, "Space Pants", "Space Pants", new ItemStack(Material.GOLD_LEGGINGS), rarity, 50)); - addReward(new UnknownPackageReward(this, donationManager, "Space Boots", "Space Boots", + addReward(new UnknownPackageReward(donationManager, "Space Boots", "Space Boots", new ItemStack(Material.GOLD_BOOTS), rarity, 50)); } @@ -244,34 +239,34 @@ public class RewardManager RewardRarity rarity = RewardRarity.LEGENDARY; // Coins - addReward(new CoinReward(this, donationManager, (int)minValue, (int)maxValue, 25, RewardRarity.LEGENDARY)); + addReward(new CoinReward(donationManager, (int)minValue, (int)maxValue, 25, RewardRarity.LEGENDARY)); // Mounts - addReward(new UnknownPackageReward(this, donationManager, "Infernal Horror", "Infernal Horror", + addReward(new UnknownPackageReward(donationManager, "Infernal Horror", "Infernal Horror", new ItemStack(Material.BONE), rarity, 33)); // Morphs - addReward(new UnknownPackageReward(this, donationManager, "Bat Morph", "Bat Morph", + addReward(new UnknownPackageReward(donationManager, "Bat Morph", "Bat Morph", new ItemStack(Material.SKULL_ITEM, 1, (short) 0, (byte) 1), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Block Morph", "Block Morph", + addReward(new UnknownPackageReward(donationManager, "Block Morph", "Block Morph", new ItemStack(Material.EMERALD_BLOCK), rarity, 20)); // Particles - addReward(new UnknownPackageReward(this, donationManager, "Shadow Walk Particles", "Shadow Walk", + addReward(new UnknownPackageReward(donationManager, "Shadow Walk Particles", "Shadow Walk", new ItemStack(Material.LEATHER_BOOTS), rarity, 33)); - addReward(new UnknownPackageReward(this, donationManager, "Enchanted Particles", "Enchanted", + addReward(new UnknownPackageReward(donationManager, "Enchanted Particles", "Enchanted", new ItemStack(Material.BOOK), rarity, 25)); - addReward(new UnknownPackageReward(this, donationManager, "Flame Rings Particles", "Flame Rings", + addReward(new UnknownPackageReward(donationManager, "Flame Rings Particles", "Flame Rings", new ItemStack(Material.BLAZE_POWDER), rarity, 17)); - addReward(new UnknownPackageReward(this, donationManager, "Rain Cloud Particles", "Rain Cloud", + addReward(new UnknownPackageReward(donationManager, "Rain Cloud Particles", "Rain Cloud", new ItemStack(Material.INK_SACK, 1, (short) 0, (byte) 4), rarity, 13)); - addReward(new UnknownPackageReward(this, donationManager, "Blood Helix Particles", "Blood Helix", + addReward(new UnknownPackageReward(donationManager, "Blood Helix Particles", "Blood Helix", new ItemStack(Material.REDSTONE), rarity, 10)); - addReward(new UnknownPackageReward(this, donationManager, "Emerald Twirl Particles", "Green Ring", + addReward(new UnknownPackageReward(donationManager, "Emerald Twirl Particles", "Green Ring", new ItemStack(Material.EMERALD), rarity, 8)); - addReward(new UnknownPackageReward(this, donationManager, "Flame Fairy Particles", "Flame Fairy", + addReward(new UnknownPackageReward(donationManager, "Flame Fairy Particles", "Flame Fairy", new ItemStack(Material.APPLE), rarity, 4)); - addReward(new UnknownPackageReward(this, donationManager, "Heart Particles", "I Heart You", + addReward(new UnknownPackageReward(donationManager, "Heart Particles", "I Heart You", new ItemStack(Material.BLAZE_POWDER), rarity, 2)); } @@ -394,18 +389,4 @@ public class RewardManager return null; } - - public void logReward(final Player player, final String type, final String rarity, final String reward) - { - final String parsedReward = ChatColor.stripColor(reward); - - _plugin.getServer().getScheduler().runTaskAsynchronously(_plugin, new Runnable() - { - @Override - public void run() - { - _repository.logReward(player, type, rarity, parsedReward); - } - }); - } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRepository.java deleted file mode 100644 index b9e40ca3a..000000000 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/RewardRepository.java +++ /dev/null @@ -1,52 +0,0 @@ -package mineplex.core.reward; - -import org.bukkit.entity.Player; -import org.bukkit.plugin.java.JavaPlugin; - -import mineplex.core.database.RepositoryBase; -import mineplex.database.Tables; -import org.jooq.DSLContext; -import org.jooq.impl.DSL; - -/** - * Created by shaun on 14-09-18. - */ -public class RewardRepository extends RepositoryBase -{ - public RewardRepository(JavaPlugin plugin) - { - super(plugin, "jdbc:mysql://db.mineplex.com:3306/Account?autoReconnect=true&failOverReadOnly=false&maxReconnects=10", "root", "tAbechAk3wR7tuTh"); - } - - @Override - protected void initialize() - { - - } - - @Override - protected void update() - { - - } - - public void logReward(Player player, String type, String rarity, String reward) - { - DSLContext context; - - synchronized (this) - { - context = DSL.using(getConnection()); - } - - context.insertInto(Tables.rewardLog) - .set(Tables.rewardLog.accountId, DSL.select(Tables.accounts.id) - .from(Tables.accounts) - .where(Tables.accounts.uuid.eq(player.getUniqueId().toString()))) - .set(Tables.rewardLog.date, DSL.currentTimestamp()) - .set(Tables.rewardLog.type, type) - .set(Tables.rewardLog.rarity, rarity) - .set(Tables.rewardLog.reward, reward) - .execute(); - } -} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/CoinReward.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/CoinReward.java index b2405deeb..bcbeddb3a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/CoinReward.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/CoinReward.java @@ -26,14 +26,14 @@ public class CoinReward extends Reward private int _minCoinCount; private int _maxCoinCount; - public CoinReward(RewardManager rewardManager, DonationManager donationManager, int minCoinCount, int maxCoinCount, int weight, RewardRarity rarity) + public CoinReward(DonationManager donationManager, int minCoinCount, int maxCoinCount, int weight, RewardRarity rarity) { - this(rewardManager, donationManager, minCoinCount, maxCoinCount, weight, rarity, RANDOM); + this(donationManager, minCoinCount, maxCoinCount, weight, rarity, RANDOM); } - public CoinReward(RewardManager rewardManager, DonationManager donationManager, int minCoinCount, int maxCoinCount, int weight, RewardRarity rarity, Random random) + public CoinReward(DonationManager donationManager, int minCoinCount, int maxCoinCount, int weight, RewardRarity rarity, Random random) { - super(rewardManager, rarity, weight); + super(rarity, weight); _donationManager = donationManager; _minCoinCount = minCoinCount; _maxCoinCount = maxCoinCount; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/InventoryReward.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/InventoryReward.java index 5903febf6..83c219e1c 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/InventoryReward.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/InventoryReward.java @@ -25,14 +25,14 @@ public class InventoryReward extends Reward private int _minAmount; private int _maxAmount; - public InventoryReward(RewardManager rewardManager, InventoryManager inventoryManager, String name, String packageName, int minAmount, int maxAmount, ItemStack itemStack, RewardRarity rarity, int weight) + public InventoryReward(InventoryManager inventoryManager, String name, String packageName, int minAmount, int maxAmount, ItemStack itemStack, RewardRarity rarity, int weight) { - this(RANDOM, rewardManager, inventoryManager, name, packageName, minAmount, maxAmount, itemStack, rarity, weight); + this(RANDOM, inventoryManager, name, packageName, minAmount, maxAmount, itemStack, rarity, weight); } - public InventoryReward(Random random, RewardManager rewardManager, InventoryManager inventoryManager, String name, String packageName, int minAmount, int maxAmount, ItemStack itemStack, RewardRarity rarity, int weight) + public InventoryReward(Random random, InventoryManager inventoryManager, String name, String packageName, int minAmount, int maxAmount, ItemStack itemStack, RewardRarity rarity, int weight) { - super(rewardManager, rarity, weight); + super(rarity, weight); _random = random; _name = name; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/PetReward.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/PetReward.java index 77413a025..ff9d1ad4d 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/PetReward.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/PetReward.java @@ -23,9 +23,10 @@ public class PetReward extends UnknownPackageReward private PetManager _petManager; private EntityType _petEntity; - public PetReward(PetManager petManager, InventoryManager inventoryManager, RewardManager rewardManager, DonationManager donationManager, String name, String packageName, EntityType petEntity, RewardRarity rarity, int weight) + public PetReward(PetManager petManager, InventoryManager inventoryManager, DonationManager donationManager, String name, String packageName, EntityType petEntity, RewardRarity rarity, int weight) { - super(rewardManager, donationManager, name, packageName, new ItemStack(Material.MONSTER_EGG, 1, petEntity.getTypeId()), rarity, weight); + super(donationManager, name, packageName, new ItemStack(Material.MONSTER_EGG, 1, petEntity.getTypeId()), rarity, weight); + _petManager = petManager; _inventoryManager = inventoryManager; _petEntity = petEntity; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/UnknownPackageReward.java b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/UnknownPackageReward.java index e1fa42c00..97cc9cadd 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/UnknownPackageReward.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/reward/rewards/UnknownPackageReward.java @@ -19,9 +19,9 @@ public class UnknownPackageReward extends Reward private String _name; private String _packageName; - public UnknownPackageReward(RewardManager rewardManager, DonationManager donationManager, String name, String packageName, ItemStack itemStack, RewardRarity rarity, int weight) + public UnknownPackageReward(DonationManager donationManager, String name, String packageName, ItemStack itemStack, RewardRarity rarity, int weight) { - super(rewardManager, rarity, weight); + super(rarity, weight); _donationManager = donationManager; _name = name; _packageName = packageName;