diff --git a/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java b/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java index 3d8875619..42b7364e3 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/inventory/InventoryManager.java @@ -13,9 +13,14 @@ import mineplex.core.MiniClientPlugin; import mineplex.core.account.CoreClientManager; import mineplex.core.account.event.RetrieveClientInformationEvent; import mineplex.core.common.util.C; +import mineplex.core.common.util.NautHashMap; import mineplex.core.donation.DonationManager; import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.Gadget; +import mineplex.core.gadget.types.GadgetType; +import mineplex.core.inventory.data.Category; import mineplex.core.inventory.data.InventoryRepository; +import mineplex.core.inventory.data.Item; import mineplex.core.inventory.ui.InventoryShop; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.mount.MountManager; @@ -31,6 +36,9 @@ public class InventoryManager extends MiniClientPlugin private InventoryRepository _repository; + private NautHashMap _items; + private NautHashMap _categories; + public InventoryManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, GadgetManager gadgetManager, MountManager mountManager, PetManager petManager) { super("Inventory Manager", plugin); @@ -42,6 +50,20 @@ public class InventoryManager extends MiniClientPlugin _inventoryShop = new InventoryShop(this, clientManager, donationManager, _moduleName); _repository = new InventoryRepository(plugin); + + /* + for (GadgetType gadgetType : GadgetType.values()) + { + if (!_categories.containsKey(gadgetType.name())) + _repository.addCategory(new Category(0, gadgetType.name())); + + for (Gadget gadget : _gadgetManager.getGadgets(gadgetType)) + { + if (!_items.containsKey(gadget.GetName())) + _repository.addItem(new Item(0, gadget.GetName(), null)); + } + } + */ } @Override diff --git a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java index bda582e9f..4ec9bea8f 100644 --- a/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java +++ b/Plugins/Mineplex.EnjinTranslator/src/mineplex/enjinTranslator/Enjin.java @@ -1,5 +1,7 @@ package mineplex.enjinTranslator; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.List; import org.bukkit.command.Command; @@ -27,6 +29,8 @@ public class Enjin extends MiniPlugin implements CommandExecutor public long _lastPoll = System.currentTimeMillis() - 120000; + private SimpleDateFormat _dateFormat = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss"); + public Enjin(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, Punish punish) { super("Enjin", plugin); @@ -58,16 +62,22 @@ public class Enjin extends MiniPlugin implements CommandExecutor if (label.equalsIgnoreCase("enjin_mineplex")) { - System.out.println("enjin command"); - if (args.length == 3 && args[0].equalsIgnoreCase("gem")) { String name = args[1]; int amount = Integer.parseInt(args[2]); _donationManager.RewardGems(null, "purchase", name, amount); - System.out.println("enjin gem"); + System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + amount + " gems."); } + else if (args.length == 3 && args[0].equalsIgnoreCase("coin")) + { + String name = args[1]; + int amount = Integer.parseInt(args[2]); + + _donationManager.RewardCoins(null, "purchase", name, amount); + System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + amount + " coins."); + } else if (args.length == 4 && args[0].equalsIgnoreCase("rank")) { String name = args[1]; @@ -75,7 +85,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor boolean perm = Boolean.parseBoolean(args[3]); _clientManager.SaveRank(name, mineplex.core.common.Rank.valueOf(rank), perm); - System.out.println("enjin rank"); + System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + rank + " " + (perm ? "permanently." : "for 1 month.")); } else if (args.length >= 3 && args[0].equalsIgnoreCase("purchase")) { @@ -88,8 +98,8 @@ public class Enjin extends MiniPlugin implements CommandExecutor packageName += " " + args[i]; } - _donationManager.PurchaseUnknownSalesPackage(null, name, packageName, 0, false); - System.out.println("enjin purchase"); + _donationManager.PurchaseUnknownSalesPackage(null, name, packageName, false, 0, false); + System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " received " + packageName + "."); } else if (args.length >= 3 && args[0].equalsIgnoreCase("unban")) { @@ -102,7 +112,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor } _punish.RemoveBan(name, reason); - System.out.println("enjin unban"); + System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " unbanned for " + reason); } else if (args.length >= 3 && args[0].equalsIgnoreCase("ban")) { @@ -115,7 +125,7 @@ public class Enjin extends MiniPlugin implements CommandExecutor } _punish.AddPunishment(name, Category.Other, reason, null, 3, true, -1); - System.out.println("enjin ban"); + System.out.println("[" + _dateFormat.format(new Date()) + "] " + name + " banned for " + reason); } } diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 9309867d0..4c0420838 100644 Binary files a/Website/LOCWebsite.suo and b/Website/LOCWebsite.suo differ