diff --git a/README.md b/README.md
index 0337239..b6d704f 100644
--- a/README.md
+++ b/README.md
@@ -3,3 +3,10 @@
I created this Minecraft server plugin using the Bukkit API to minimize the pain of inventory management. It automatically sorts player and chest inventories, intelligently deposits player loot into correct containers, and auto-refills hotbar slots when players use the last item in a stack (or break a tool!) but have more of the same in their backpacks.
I stopped working on this project after Minecraft 1.10. Anyone may use my source code to continue the project, but see the LICENSE file for restrictions.
+
+# The future of this project
+Actually, me (crazyhoorse961) i want to continue this project with a fork. Ill try update it, i won't publish it on spigot or bukkit but feel free to build it, i've now leaved releases too.
+
+# READ
+I'm realizing that i haven't much time to take this project but, i will take it updated to 1.12 and all the future versions, but, i won't (probably) add many features and i won't be that active on solving issues. Sorry
+
diff --git a/plugin.yml b/plugin.yml
index e2ff124..86e02b7 100644
--- a/plugin.yml
+++ b/plugin.yml
@@ -1,17 +1,17 @@
+main: me.ryanhamshire.automaticinventory.AutomaticInventory
name: AutomaticInventory
-main: me.ryanhamshire.AutomaticInventory.AutomaticInventory
-version: 2.7.1
+version: 2.7.2 Fork
commands:
debugai:
- description: Debug command for AutomaticInventory.
+ description: The debug command for AutomaticInventory
usage: /debugai
permission: automaticinventory.debug
autosort:
description: Toggles auto-sorting options.
- usage: /AutoSort
+ usage: /autosort
depositall:
description: Deposits your non-hotbar inventory into any nearby chests containing matching items.
- usage: /DepositAll
+ usage: /depositall
aliases: [da, dumpitems, dumploot, depositloot]
permission: automaticinventory.depositall
permissions:
@@ -44,4 +44,8 @@ permissions:
default: true
automaticinventory.depositall:
description: Grants permission to use /DepositAll.
- default: true
\ No newline at end of file
+ default: true
+load: STARTUP
+authors: [ryanhamshire,crazyhoorse961]
+website: https://github.com/crazyhorse961/AutomaticInventory
+database: false
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..c148703
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,49 @@
+
+ 4.0.0
+ com.crazyhoorse961
+ auto-inv
+ 0.0.1-SNAPSHOT
+ AutomaticInventory
+
+ src
+
+
+ maven-compiler-plugin
+ 3.5.1
+
+ 1.8
+ 1.8
+
+
+
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+
+
+
+ org.spigotmc
+ spigot-api
+ 1.11-R0.1-SNAPSHOT
+ provided
+
+
+
+ org.bukkit
+ bukkit
+ 1.11-R0.1-SNAPSHOT
+ provided
+
+
+
+ org.bukkit
+ craftbukkit
+ 1.11-R0.1-SNAPSHOT
+ provided
+
+
+
diff --git a/src/me/ryanhamshire/AutomaticInventory/Features.java b/src/me/ryanhamshire/AutomaticInventory/Features.java
deleted file mode 100644
index b96dd14..0000000
--- a/src/me/ryanhamshire/AutomaticInventory/Features.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package me.ryanhamshire.AutomaticInventory;
-
-enum Features
-{
- RefillStacks,
- SortInventory,
- SortChests,
- QuickDeposit,
- DepositAll
-}
diff --git a/src/me/ryanhamshire/AutomaticInventory/Messages.java b/src/me/ryanhamshire/AutomaticInventory/Messages.java
deleted file mode 100644
index a8328ae..0000000
--- a/src/me/ryanhamshire/AutomaticInventory/Messages.java
+++ /dev/null
@@ -1,23 +0,0 @@
-//Copyright 2015 Ryan Hamshire
-
-package me.ryanhamshire.AutomaticInventory;
-
-public enum Messages
-{
- AutoSortHelp,
- NoPermissionForFeature,
- ChestSortEnabled,
- ChestSortDisabled,
- InventorySortEnabled,
- InventorySortDisabled,
- AutoRefillEducation,
- InventorySortEducation,
- ChestSortEducation3,
- SuccessfulDeposit2,
- FailedDepositNoMatch,
- FailedDepositChestFull2,
- SuccessfulDepositAll2,
- ChestLidBlocked,
- DepositAllAdvertisement,
- QuickDepositAdvertisement3
-}
diff --git a/src/me/ryanhamshire/AutomaticInventory/TextMode.java b/src/me/ryanhamshire/AutomaticInventory/TextMode.java
deleted file mode 100644
index 68c29ca..0000000
--- a/src/me/ryanhamshire/AutomaticInventory/TextMode.java
+++ /dev/null
@@ -1,15 +0,0 @@
-//Copyright 2015 Ryan Hamshire
-
-package me.ryanhamshire.AutomaticInventory;
-
-import org.bukkit.ChatColor;
-
-//just a few constants for chat color codes
-class TextMode
-{
- final static ChatColor Info = ChatColor.AQUA;
- final static ChatColor Instr = ChatColor.YELLOW;
- final static ChatColor Warn = ChatColor.GOLD;
- final static ChatColor Err = ChatColor.RED;
- final static ChatColor Success = ChatColor.GREEN;
-}
diff --git a/src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java b/src/me/ryanhamshire/automaticinventory/AIEventHandler
similarity index 86%
rename from src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java
rename to src/me/ryanhamshire/automaticinventory/AIEventHandler
index bd8a9c6..cf69c0a 100644
--- a/src/me/ryanhamshire/AutomaticInventory/AIEventHandler.java
+++ b/src/me/ryanhamshire/automaticinventory/AIEventHandler
@@ -1,6 +1,6 @@
//Copyright 2015 Ryan Hamshire
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
import java.util.ArrayList;
import java.util.Collections;
@@ -98,7 +98,7 @@ private void tryRefillStackInHand(Player player, EquipmentSlot slot, boolean dat
{
if(slot == null) return;
- if(!featureEnabled(Features.RefillStacks, player)) return;
+ if(!featureEnabled(Features.REFILLSTACKS, player)) return;
ItemStack stack = null;
int slotIndex = 0;
@@ -117,18 +117,18 @@ else if(slot == EquipmentSlot.OFF_HAND)
return;
}
- if(AutomaticInventory.instance.config_noAutoRefillIDs.contains(stack.getTypeId())) return;
+ if(AutomaticInventory.getInstance().config_noAutoRefillIDs.contains(stack.getTypeId())) return;
if(!dataValueMatters || stack.getAmount() == 1)
{
PlayerInventory inventory = player.getInventory();
- AutomaticInventory.instance.getServer().getScheduler().scheduleSyncDelayedTask(
- AutomaticInventory.instance,
+ AutomaticInventory.getInstance().getServer().getScheduler().scheduleSyncDelayedTask(
+ AutomaticInventory.getInstance(),
new AutoRefillHotBarTask(player, inventory, slotIndex, stack.clone(), dataValueMatters),
2L);
}
}
- static boolean featureEnabled(Features feature, Player player)
+ public static boolean featureEnabled(Features feature, Player player)
{
if(!AutomaticInventory.hasPermission(feature, player)) return false;
@@ -136,17 +136,17 @@ static boolean featureEnabled(Features feature, Player player)
switch(feature)
{
- case SortInventory:
+ case SORTINVENTORY:
if(data.isSortInventory()) return true;
break;
- case SortChests:
+ case SORTCHESTS:
if(data.isSortChests()) return true;
break;
- case RefillStacks:
+ case REFILLSTACKS:
return true;
- case QuickDeposit:
+ case QUICKDEPOSIT:
return true;
- case DepositAll:
+ case DEPOSITALL:
return true;
}
@@ -154,7 +154,7 @@ static boolean featureEnabled(Features feature, Player player)
}
@SuppressWarnings("deprecation")
- private static boolean itemsAreSimilar(ItemStack a, ItemStack b, boolean dataValueMatters)
+ private boolean itemsAreSimilar(ItemStack a, ItemStack b, boolean dataValueMatters)
{
if(a.getType() == b.getType() && (!dataValueMatters || a.getData().getData() == b.getData().getData()))
{
@@ -237,7 +237,7 @@ public void run()
PlayerData playerData = PlayerData.FromPlayer(player);
if(!playerData.isGotRestackInfo())
{
- AutomaticInventory.sendMessage(player, TextMode.Info, Messages.AutoRefillEducation);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.INFO, Messages.AUTOREFILLEDUCATION);
playerData.setGotRestackInfo(true);
}
}
@@ -249,7 +249,7 @@ public void onBlockDamage(BlockDamageEvent event)
Player player = event.getPlayer();
if(!player.isSneaking()) return;
- if(!featureEnabled(Features.QuickDeposit, player)) return;
+ if(!featureEnabled(Features.QUICKDEPOSIT, player)) return;
Block clickedBlock = event.getBlock();
if(clickedBlock == null) return;
@@ -258,9 +258,10 @@ public void onBlockDamage(BlockDamageEvent event)
if(clickedMaterial != Material.CHEST && clickedMaterial != Material.TRAPPED_CHEST) return;
@SuppressWarnings("deprecation")
- PlayerInteractEvent fakeEvent = AutomaticInventory.instance.new FakePlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, player.getItemInHand(), clickedBlock, BlockFace.EAST);
+ PlayerInteractEvent fakeEvent = AutomaticInventory.getInstance().new FakePlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, player.getItemInHand(), clickedBlock, BlockFace.EAST);
Bukkit.getServer().getPluginManager().callEvent(fakeEvent);
- if(fakeEvent.isCancelled()) return;
+ if(fakeEvent.isCancelled())
+ { return; }
InventoryHolder chest = (InventoryHolder)clickedBlock.getState();
Inventory chestInventory = chest.getInventory();
@@ -270,9 +271,9 @@ public void onBlockDamage(BlockDamageEvent event)
@SuppressWarnings("deprecation")
int aboveBlockID = clickedBlock.getRelative(BlockFace.UP).getTypeId();
- if(AutomaticInventory.preventsChestOpen(aboveBlockID))
+ if(AutomaticInventory.getInstance().preventsChestOpen(aboveBlockID))
{
- AutomaticInventory.sendMessage(player, TextMode.Err, Messages.ChestLidBlocked);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.ERR, Messages.CHESTLIDBLOCKED);
return;
}
@@ -281,15 +282,15 @@ public void onBlockDamage(BlockDamageEvent event)
//send confirmation message to player with counts deposited. if none deposited, give instructions on how to set up the chest.
if(deposits.destinationFull && deposits.totalItems == 0)
{
- AutomaticInventory.sendMessage(player, TextMode.Err, Messages.FailedDepositChestFull2);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.ERR, Messages.FAILEDDEPOSITCHESTFULL2);
}
else if(deposits.totalItems == 0)
{
- AutomaticInventory.sendMessage(player, TextMode.Info, Messages.FailedDepositNoMatch);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.INFO, Messages.FAILEDDEPOSITNOMATCH);
}
else
{
- AutomaticInventory.sendMessage(player, TextMode.Success, Messages.SuccessfulDeposit2, String.valueOf(deposits.totalItems));
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.SUCCESS, Messages.SUCCESSFULDEPOSIT2, String.valueOf(deposits.totalItems));
//make a note that quick deposit was used so that player will not be bothered with advertisement messages again.
PlayerData playerData = PlayerData.FromPlayer(player);
@@ -314,17 +315,17 @@ public void onInventoryOpen(InventoryOpenEvent event)
PlayerData playerData = PlayerData.FromPlayer(player);
sortPlayerIfEnabled(player, playerData, bottomInventory);
- if(!player.isSneaking() && featureEnabled(Features.SortChests, player))
+ if(!player.isSneaking() && featureEnabled(Features.SORTCHESTS, player))
{
Inventory topInventory = event.getView().getTopInventory();
if(!isSortableChestInventory(topInventory)) return;
InventorySorter sorter = new InventorySorter(topInventory, 0);
- Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(AutomaticInventory.instance, sorter, 1L);
+ Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(AutomaticInventory.getInstance(), sorter, 1L);
if(!playerData.isGotChestSortInfo())
{
- AutomaticInventory.sendMessage(player, TextMode.Info, Messages.ChestSortEducation3);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.INFO, Messages.CHESTSORTEDUCATION3);
playerData.setGotChestSortInfo(true);
}
}
@@ -345,12 +346,12 @@ public void onInventoryClose(InventoryCloseEvent event)
sortPlayerIfEnabled(player, playerData, bottomInventory);
- if(player.getGameMode() != GameMode.CREATIVE && Math.random() < .1 && !playerData.isGotDepositAllInfo() && featureEnabled(Features.DepositAll, player))
+ if(player.getGameMode() != GameMode.CREATIVE && Math.random() < .1 && !playerData.isGotDepositAllInfo() && featureEnabled(Features.DEPOSITALL, player))
{
Inventory topInventory = event.getView().getTopInventory();
if(topInventory != null && topInventory.getType() == InventoryType.CHEST)
{
- AutomaticInventory.sendMessage(player, TextMode.Instr, Messages.DepositAllAdvertisement);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.INSTR, Messages.DEPOSITALLADVERTISEMENT);
playerData.setGotDepositAllInfo(true);
}
}
@@ -360,7 +361,7 @@ public void onInventoryClose(InventoryCloseEvent event)
public void onPickupItem(PlayerPickupItemEvent event)
{
Player player = event.getPlayer();
- if(featureEnabled(Features.SortInventory, player))
+ if(featureEnabled(Features.SORTINVENTORY, player))
{
PlayerData playerData = PlayerData.FromPlayer(player);
if(playerData.firstEmptySlot >= 0) return;
@@ -370,25 +371,25 @@ public void onPickupItem(PlayerPickupItemEvent event)
if(firstEmpty < 9) return;
playerData.firstEmptySlot = firstEmpty;
PickupSortTask task = new PickupSortTask(player, playerData, inventory);
- Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(AutomaticInventory.instance, task, 100L);
+ Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(AutomaticInventory.getInstance(), task, 100L);
}
}
- static void sortPlayerIfEnabled(Player player, PlayerData playerData, Inventory inventory)
+ public static void sortPlayerIfEnabled(Player player, PlayerData playerData, Inventory inventory)
{
- if(featureEnabled(Features.SortInventory, player))
+ if(featureEnabled(Features.SORTINVENTORY, player))
{
new InventorySorter(inventory, 9).run();
if(!playerData.isGotInventorySortInfo())
{
- AutomaticInventory.sendMessage(player, TextMode.Info, Messages.InventorySortEducation);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.INFO, Messages.INVENTORYSORTEDUCATION);
playerData.setGotInventorySortInfo(true);
}
}
}
- static boolean isSortableChestInventory(Inventory inventory)
+ public static boolean isSortableChestInventory(Inventory inventory)
{
if(inventory == null) return false;
@@ -405,14 +406,14 @@ static boolean isSortableChestInventory(Inventory inventory)
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
- void onPlayerJoin(PlayerJoinEvent event)
+ public void onPlayerJoin(PlayerJoinEvent event)
{
Player player = event.getPlayer();
PlayerData.Preload(player);
}
@EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR)
- void onPlayerQuit(PlayerQuitEvent event)
+ public void onPlayerQuit(PlayerQuitEvent event)
{
Player player = event.getPlayer();
PlayerData.FromPlayer(player).saveChanges();
diff --git a/src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java b/src/me/ryanhamshire/automaticinventory/AutomaticInventory
similarity index 86%
rename from src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java
rename to src/me/ryanhamshire/automaticinventory/AutomaticInventory
index 8c2fb6e..72501b6 100644
--- a/src/me/ryanhamshire/AutomaticInventory/AutomaticInventory.java
+++ b/src/me/ryanhamshire/automaticinventory/AutomaticInventory
@@ -1,6 +1,6 @@
//Copyright 2015 Ryan Hamshire
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
@@ -33,7 +33,7 @@
public class AutomaticInventory extends JavaPlugin
{
//for convenience, a reference to the instance of this plugin
- public static AutomaticInventory instance;
+ private static AutomaticInventory instance;
//for logging to the console and log file
private static Logger log = Logger.getLogger("Minecraft");
@@ -44,14 +44,14 @@ public class AutomaticInventory extends JavaPlugin
//this handles data storage, like player and region data
public DataStore dataStore;
- public synchronized static void AddLogEntry(String entry)
+ public synchronized static void addLogEntry(String entry)
{
log.info("AutomaticInventory: " + entry);
}
public void onEnable()
{
- AddLogEntry("AutomaticInventory enabled.");
+ addLogEntry("AutomaticInventory enabled.");
instance = this;
@@ -109,7 +109,7 @@ public void onEnable()
}
catch(IOException e)
{
- AddLogEntry("Encountered an issue while writing to the config file.");
+ addLogEntry("Encountered an issue while writing to the config file.");
e.printStackTrace();
}
@@ -156,44 +156,44 @@ else if(cmd.getName().equalsIgnoreCase("autosort") && player != null)
{
if(args.length < 1)
{
- sendMessage(player, TextMode.Instr, Messages.AutoSortHelp);
+ sendMessage(player, TextMode.INSTR, Messages.AUTOSORTHELP);
return true;
}
String optionName = args[0].toLowerCase();
if(optionName.startsWith("chest"))
{
- if(!hasPermission(Features.SortChests, player))
+ if(!hasPermission(Features.SORTCHESTS, player))
{
- sendMessage(player, TextMode.Err, Messages.NoPermissionForFeature);
+ sendMessage(player, TextMode.ERR, Messages.NOPERMISSIONFORFEATURE);
return true;
}
playerData.setSortChests(!playerData.isSortChests());
if(playerData.isSortChests())
- sendMessage(player, TextMode.Success, Messages.ChestSortEnabled);
+ sendMessage(player, TextMode.SUCCESS, Messages.CHESTSORTENABLED);
else
- sendMessage(player, TextMode.Success, Messages.ChestSortDisabled);
+ sendMessage(player, TextMode.SUCCESS, Messages.CHESTSORTDISABLED);
}
else if(optionName.startsWith("inv"))
{
- if(!hasPermission(Features.SortInventory, player))
+ if(!hasPermission(Features.SORTINVENTORY, player))
{
- sendMessage(player, TextMode.Err, Messages.NoPermissionForFeature);
+ sendMessage(player, TextMode.ERR, Messages.NOPERMISSIONFORFEATURE);
return true;
}
playerData.setSortInventory(!playerData.isSortInventory());
if(playerData.isSortInventory())
- sendMessage(player, TextMode.Success, Messages.InventorySortEnabled);
+ sendMessage(player, TextMode.SUCCESS, Messages.INVENTORYSORTENABLED);
else
- sendMessage(player, TextMode.Success, Messages.InventorySortDisabled);
+ sendMessage(player, TextMode.SUCCESS, Messages.INVENTORYSORTDISABLED);
}
else
{
- sendMessage(player, TextMode.Err, Messages.AutoSortHelp);
+ sendMessage(player, TextMode.ERR, Messages.AUTOSORTHELP);
return true;
}
@@ -205,9 +205,9 @@ else if(optionName.startsWith("inv"))
else if(cmd.getName().equalsIgnoreCase("depositall") && player != null)
{
//ensure player has feature enabled
- if(!AIEventHandler.featureEnabled(Features.DepositAll, player))
+ if(!AIEventHandler.featureEnabled(Features.DEPOSITALL, player))
{
- AutomaticInventory.sendMessage(player, TextMode.Err, Messages.NoPermissionForFeature);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.ERR, Messages.NOPERMISSIONFORFEATURE);
return true;
}
@@ -258,7 +258,7 @@ public void onDisable()
data.waitForSaveComplete();
}
- AddLogEntry("AutomaticInventory disabled.");
+ addLogEntry("AutomaticInventory disabled.");
}
static boolean hasPermission(Features feature, Player player)
@@ -266,19 +266,19 @@ static boolean hasPermission(Features feature, Player player)
boolean hasPermission = false;
switch(feature)
{
- case SortInventory:
+ case SORTINVENTORY:
hasPermission = player.hasPermission("automaticinventory.sortinventory");
break;
- case SortChests:
+ case SORTCHESTS:
hasPermission = player.hasPermission("automaticinventory.sortchests");
break;
- case RefillStacks:
+ case REFILLSTACKS:
hasPermission = player.hasPermission("automaticinventory.refillstacks");
break;
- case QuickDeposit:
+ case QUICKDEPOSIT:
hasPermission = player.hasPermission("automaticinventory.quickdeposit");
break;
- case DepositAll:
+ case DEPOSITALL:
hasPermission = player.hasPermission("automaticinventory.depositall");
break;
}
@@ -287,7 +287,7 @@ static boolean hasPermission(Features feature, Player player)
}
@SuppressWarnings("unused")
- private static void sendMessage(Player player, String message)
+ private void sendMessage(Player player, String message)
{
if(player != null)
{
@@ -295,28 +295,28 @@ private static void sendMessage(Player player, String message)
}
else
{
- AutomaticInventory.AddLogEntry(message);
+ AutomaticInventory.addLogEntry(message);
}
}
- static void sendMessage(Player player, ChatColor color, Messages messageID, String... args)
+ public void sendMessage(Player player, ChatColor color, Messages messageID, String... args)
{
sendMessage(player, color, messageID, 0, args);
}
- static void sendMessage(Player player, ChatColor color, Messages messageID, long delayInTicks, String... args)
+ public void sendMessage(Player player, ChatColor color, Messages messageID, long delayInTicks, String... args)
{
String message = AutomaticInventory.instance.dataStore.getMessage(messageID, args);
sendMessage(player, color, message, delayInTicks);
}
- static void sendMessage(Player player, ChatColor color, String message)
+ public void sendMessage(Player player, ChatColor color, String message)
{
if(message == null || message.length() == 0) return;
if(player == null)
{
- AutomaticInventory.AddLogEntry(color + message);
+ AutomaticInventory.addLogEntry(color + message);
}
else
{
@@ -324,7 +324,7 @@ static void sendMessage(Player player, ChatColor color, String message)
}
}
- static void sendMessage(Player player, ChatColor color, String message, long delayInTicks)
+ public void sendMessage(Player player, ChatColor color, String message, long delayInTicks)
{
SendPlayerMessageTask task = new SendPlayerMessageTask(player, color, message);
if(delayInTicks > 0)
@@ -338,7 +338,7 @@ static void sendMessage(Player player, ChatColor color, String message, long del
}
@SuppressWarnings("deprecation")
- static DepositRecord depositMatching(PlayerInventory source, Inventory destination, boolean depositHotbar)
+ public static DepositRecord depositMatching(PlayerInventory source, Inventory destination, boolean depositHotbar)
{
HashSet eligibleSignatures = new HashSet();
DepositRecord deposits = new DepositRecord();
@@ -417,7 +417,7 @@ public FakePlayerInteractEvent(Player player, Action rightClickBlock, ItemStack
}
}
- static boolean preventsChestOpen(int aboveBlockID)
+ public boolean preventsChestOpen(int aboveBlockID)
{
switch(aboveBlockID)
{
@@ -447,4 +447,7 @@ static boolean preventsChestOpen(int aboveBlockID)
return true;
}
}
-}
\ No newline at end of file
+ public static AutomaticInventory getInstance() {
+ return instance;
+ }
+}
diff --git a/src/me/ryanhamshire/AutomaticInventory/CustomizableMessage.java b/src/me/ryanhamshire/automaticinventory/CustomizableMessage
similarity index 85%
rename from src/me/ryanhamshire/AutomaticInventory/CustomizableMessage.java
rename to src/me/ryanhamshire/automaticinventory/CustomizableMessage
index 4031f48..bb4d991 100644
--- a/src/me/ryanhamshire/AutomaticInventory/CustomizableMessage.java
+++ b/src/me/ryanhamshire/automaticinventory/CustomizableMessage
@@ -1,6 +1,6 @@
//Copyright 2015 Ryan Hamshire
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
public class CustomizableMessage
{
@@ -14,4 +14,4 @@ public CustomizableMessage(Messages id, String text, String notes)
this.text = text;
this.notes = notes;
}
-}
\ No newline at end of file
+}
diff --git a/src/me/ryanhamshire/AutomaticInventory/DataStore.java b/src/me/ryanhamshire/automaticinventory/DataStore
similarity index 77%
rename from src/me/ryanhamshire/AutomaticInventory/DataStore.java
rename to src/me/ryanhamshire/automaticinventory/DataStore
index 72dd22c..4b4d1cd 100644
--- a/src/me/ryanhamshire/AutomaticInventory/DataStore.java
+++ b/src/me/ryanhamshire/automaticinventory/DataStore
@@ -1,5 +1,5 @@
//Copyright 2015 Ryan Hamshire
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
import java.io.File;
import java.io.IOException;
@@ -38,22 +38,22 @@ private void loadMessages()
//initialize defaults
//this.addDefault(defaults, Messages.NoManagedWorld, "The PopulationDensity plugin has not been properly configured. Please update your config.yml to specify a world to manage.", null);
- this.addDefault(defaults, Messages.NoPermissionForFeature, "You don't have permission to use that feature.", null);
- this.addDefault(defaults, Messages.ChestSortEnabled, "Now auto-sorting any chests you use.", null);
- this.addDefault(defaults, Messages.ChestSortDisabled, "Stopped auto-sorting chests you use.", null);
- this.addDefault(defaults, Messages.InventorySortEnabled, "Now auto-sorting your personal inventory.", null);
- this.addDefault(defaults, Messages.InventorySortDisabled, "Stopped auto-sorting your personal inventory.", null);
- this.addDefault(defaults, Messages.AutoSortHelp, "Options are /AutoSort Chests and /AutoSort Inventory.", null);
- this.addDefault(defaults, Messages.AutoRefillEducation, "AutomaticInventory(AI) will auto-replace broken tools and depleted hotbar stacks from your inventory.", null);
- this.addDefault(defaults, Messages.InventorySortEducation, "AutomaticInventory(AI) will keep your inventory sorted. Use /AutoSort to disable.", null);
- this.addDefault(defaults, Messages.ChestSortEducation3, "AutomaticInventory(AI) will sort the contents of chests you access. Use /AutoSort to toggle. TIP: Want some chests sorted but not others? Chests with names including an asterisk (*) won't auto-sort. You can rename any chest using an anvil.", null);
- this.addDefault(defaults, Messages.SuccessfulDeposit2, "Deposited {0} items.", null);
- this.addDefault(defaults, Messages.FailedDepositNoMatch, "No items deposited - none of your inventory items match items in that chest.", null);
- this.addDefault(defaults, Messages.QuickDepositAdvertisement3, "Want to deposit quickly from your hotbar? Just pick a specific chest and sneak (hold shift) while hitting it.", null);
- this.addDefault(defaults, Messages.FailedDepositChestFull2, "That chest is full.", null);
- this.addDefault(defaults, Messages.SuccessfulDepositAll2, "Deposited {0} items into nearby chests.", null);
- this.addDefault(defaults, Messages.ChestLidBlocked, "That chest isn't accessible.", null);
- this.addDefault(defaults, Messages.DepositAllAdvertisement, "TIP: Instantly deposit all items from your inventory into all the right nearby boxes with /DepositAll!", null);
+ this.addDefault(defaults, Messages.NOPERMISSIONFORFEATURE, "You don't have permission to use that feature.", null);
+ this.addDefault(defaults, Messages.CHESTSORTENABLED, "Now auto-sorting any chests you use.", null);
+ this.addDefault(defaults, Messages.CHESTSORTDISABLED, "Stopped auto-sorting chests you use.", null);
+ this.addDefault(defaults, Messages.INVENTORYSORTENABLED, "Now auto-sorting your personal inventory.", null);
+ this.addDefault(defaults, Messages.INVENTORYSORTDISABLED, "Stopped auto-sorting your personal inventory.", null);
+ this.addDefault(defaults, Messages.AUTOSORTHELP, "Options are /AutoSort Chests and /AutoSort Inventory.", null);
+ this.addDefault(defaults, Messages.AUTOREFILLEDUCATION, "AutomaticInventory(AI) will auto-replace broken tools and depleted hotbar stacks from your inventory.", null);
+ this.addDefault(defaults, Messages.INVENTORYSORTEDUCATION, "AutomaticInventory(AI) will keep your inventory sorted. Use /AutoSort to disable.", null);
+ this.addDefault(defaults, Messages.CHESTSORTEDUCATION3, "AutomaticInventory(AI) will sort the contents of chests you access. Use /AutoSort to toggle. TIP: Want some chests sorted but not others? Chests with names including an asterisk (*) won't auto-sort. You can rename any chest using an anvil.", null);
+ this.addDefault(defaults, Messages.SUCCESSFULDEPOSIT2, "Deposited {0} items.", null);
+ this.addDefault(defaults, Messages.FAILEDDEPOSITNOMATCH, "No items deposited - none of your inventory items match items in that chest.", null);
+ this.addDefault(defaults, Messages.QUICKDEPOSITADVERTISEMENT3, "Want to deposit quickly from your hotbar? Just pick a specific chest and sneak (hold shift) while hitting it.", null);
+ this.addDefault(defaults, Messages.FAILEDDEPOSITCHESTFULL2, "That chest is full.", null);
+ this.addDefault(defaults, Messages.SUCCESSFULDEPOSITALL2, "Deposited {0} items into nearby chests.", null);
+ this.addDefault(defaults, Messages.CHESTLIDBLOCKED, "That chest isn't accessible.", null);
+ this.addDefault(defaults, Messages.DEPOSITALLADVERTISEMENT, "TIP: Instantly deposit all items from your inventory into all the right nearby boxes with /DepositAll!", null);
//load the config file
FileConfiguration config = YamlConfiguration.loadConfiguration(new File(messagesFilePath));
@@ -69,7 +69,7 @@ private void loadMessages()
//if default is missing, log an error and use some fake data for now so that the plugin can run
if(messageData == null)
{
- AutomaticInventory.AddLogEntry("Missing message for " + messageID.name() + ". Please contact the developer.");
+ AutomaticInventory.addLogEntry("Missing message for " + messageID.name() + ". Please contact the developer.");
messageData = new CustomizableMessage(messageID, "Missing message! ID: " + messageID.name() + ". Please contact a server admin.", null);
}
@@ -95,7 +95,7 @@ private void loadMessages()
}
catch(IOException exception)
{
- AutomaticInventory.AddLogEntry("Unable to write to the configuration file at \"" + DataStore.messagesFilePath + "\"");
+ AutomaticInventory.addLogEntry("Unable to write to the configuration file at \"" + DataStore.messagesFilePath + "\"");
}
defaults.clear();
diff --git a/src/me/ryanhamshire/AutomaticInventory/DepositRecord.java b/src/me/ryanhamshire/automaticinventory/DepositRecord
similarity index 55%
rename from src/me/ryanhamshire/AutomaticInventory/DepositRecord.java
rename to src/me/ryanhamshire/automaticinventory/DepositRecord
index a405073..009c055 100644
--- a/src/me/ryanhamshire/AutomaticInventory/DepositRecord.java
+++ b/src/me/ryanhamshire/automaticinventory/DepositRecord
@@ -1,6 +1,6 @@
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
-class DepositRecord
+public class DepositRecord
{
DepositRecord() {}
int totalItems = 0;
diff --git a/src/me/ryanhamshire/automaticinventory/Features b/src/me/ryanhamshire/automaticinventory/Features
new file mode 100644
index 0000000..38dbe68
--- /dev/null
+++ b/src/me/ryanhamshire/automaticinventory/Features
@@ -0,0 +1,10 @@
+package me.ryanhamshire.automaticinventory;
+
+public enum Features
+{
+ REFILLSTACKS,
+ SORTINVENTORY,
+ SORTCHESTS,
+ QUICKDEPOSIT,
+ DEPOSITALL
+}
diff --git a/src/me/ryanhamshire/AutomaticInventory/FindChestsThread.java b/src/me/ryanhamshire/automaticinventory/FindChestsThread
similarity index 91%
rename from src/me/ryanhamshire/AutomaticInventory/FindChestsThread.java
rename to src/me/ryanhamshire/automaticinventory/FindChestsThread
index a1e0fbc..b4bad89 100644
--- a/src/me/ryanhamshire/AutomaticInventory/FindChestsThread.java
+++ b/src/me/ryanhamshire/automaticinventory/FindChestsThread
@@ -1,4 +1,4 @@
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
@@ -63,7 +63,7 @@ public void run()
if(isChestID(typeID))
{
int overTypeID = this.getTypeID(new Vector(current.getBlockX(), current.getBlockY() + 1, current.getBlockZ()));
- if(!AutomaticInventory.preventsChestOpen(overTypeID))
+ if(!AutomaticInventory.getInstance().preventsChestOpen(overTypeID))
{
chestLocations.add(this.makeLocation(current));
}
@@ -92,7 +92,7 @@ public void run()
}
QuickDepositChain chain = new QuickDepositChain(chestLocations, new DepositRecord(), player, true);
- Bukkit.getScheduler().runTaskLater(AutomaticInventory.instance, chain, 1L);
+ Bukkit.getScheduler().runTaskLater(AutomaticInventory.getInstance(), chain, 1L);
}
private Location makeLocation(Vector location)
@@ -184,18 +184,18 @@ public void run()
Location chestLocation = this.remainingChestLocations.poll();
if(chestLocation == null)
{
- AutomaticInventory.sendMessage(this.player, TextMode.Success, Messages.SuccessfulDepositAll2, String.valueOf(this.runningDepositRecord.totalItems));
+ AutomaticInventory.getInstance().sendMessage(this.player, TextMode.SUCCESS, Messages.SUCCESSFULDEPOSITALL2, String.valueOf(this.runningDepositRecord.totalItems));
PlayerData playerData = PlayerData.FromPlayer(player);
- if(Math.random() < .1 && !playerData.isGotQuickDepositInfo() && AIEventHandler.featureEnabled(Features.QuickDeposit, player))
+ if(Math.random() < .1 && !playerData.isGotQuickDepositInfo() && AIEventHandler.featureEnabled(Features.QUICKDEPOSIT, player))
{
- AutomaticInventory.sendMessage(player, TextMode.Instr, Messages.QuickDepositAdvertisement3);
+ AutomaticInventory.getInstance().sendMessage(player, TextMode.INSTR, Messages.QUICKDEPOSITADVERTISEMENT3);
playerData.setGotQuickDepositInfo(true);
}
}
else
{
Block block = chestLocation.getBlock();
- PlayerInteractEvent fakeEvent = AutomaticInventory.instance.new FakePlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, player.getInventory().getItemInMainHand(), block, BlockFace.UP);
+ PlayerInteractEvent fakeEvent = AutomaticInventory.getInstance().new FakePlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, player.getInventory().getItemInMainHand(), block, BlockFace.UP);
Bukkit.getServer().getPluginManager().callEvent(fakeEvent);
if(!fakeEvent.isCancelled())
{
@@ -216,7 +216,7 @@ public void run()
}
QuickDepositChain chain = new QuickDepositChain(this.remainingChestLocations, this.runningDepositRecord, this.player, this.respectExclusions);
- Bukkit.getScheduler().runTaskLater(AutomaticInventory.instance, chain, 1L);
+ Bukkit.getScheduler().runTaskLater(AutomaticInventory.getInstance(), chain, 1L);
}
}
}
diff --git a/src/me/ryanhamshire/automaticinventory/Messages b/src/me/ryanhamshire/automaticinventory/Messages
new file mode 100644
index 0000000..dff61dc
--- /dev/null
+++ b/src/me/ryanhamshire/automaticinventory/Messages
@@ -0,0 +1,23 @@
+//Copyright 2015 Ryan Hamshire
+
+package me.ryanhamshire.automaticinventory;
+
+public enum Messages
+{
+ AUTOSORTHELP,
+ NOPERMISSIONFORFEATURE,
+ CHESTSORTENABLED,
+ CHESTSORTDISABLED,
+ INVENTORYSORTENABLED,
+ INVENTORYSORTDISABLED,
+ AUTOREFILLEDUCATION,
+ INVENTORYSORTEDUCATION,
+ CHESTSORTEDUCATION3,
+ SUCCESSFULDEPOSIT2,
+ FAILEDDEPOSITNOMATCH,
+ FAILEDDEPOSITCHESTFULL2,
+ SUCCESSFULDEPOSITALL2,
+ CHESTLIDBLOCKED,
+ DEPOSITALLADVERTISEMENT,
+ QUICKDEPOSITADVERTISEMENT3
+}
diff --git a/src/me/ryanhamshire/AutomaticInventory/PlayerData.java b/src/me/ryanhamshire/automaticinventory/PlayerData
similarity index 84%
rename from src/me/ryanhamshire/AutomaticInventory/PlayerData.java
rename to src/me/ryanhamshire/automaticinventory/PlayerData
index 48cfae7..99ef0a2 100644
--- a/src/me/ryanhamshire/AutomaticInventory/PlayerData.java
+++ b/src/me/ryanhamshire/automaticinventory/PlayerData
@@ -1,6 +1,6 @@
//Copyright 2015 Ryan Hamshire
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
import java.io.File;
import java.io.PrintWriter;
@@ -14,7 +14,7 @@
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.metadata.MetadataValue;
-class PlayerData
+public class PlayerData
{
private final static String METADATA_TAG = "AI_PlayerData";
private Thread loadingThread;
@@ -28,70 +28,74 @@ class PlayerData
private boolean gotQuickDepositInfo = false;
private boolean gotDepositAllInfo = false;
private boolean usedDepositAll = false;
+ private UUID playerID;
+ private boolean isDirty = false;
+ private boolean sortChests = true;
+ public int firstEmptySlot = -1;
+ private boolean sortInventory = true;
- boolean isUsedQuickDeposit()
+
+ public boolean isUsedQuickDeposit()
{
return usedQuickDeposit;
}
- void setUsedQuickDeposit(boolean usedQuickDeposit)
+ public void setUsedQuickDeposit(boolean usedQuickDeposit)
{
this.usedQuickDeposit = usedQuickDeposit;
this.isDirty = true;
}
- boolean isUsedDepositAll()
+ public boolean isUsedDepositAll()
{
return usedDepositAll;
}
- void setUsedDepositAll(boolean usedDepositAll)
+ public void setUsedDepositAll(boolean usedDepositAll)
{
this.usedDepositAll = usedDepositAll;
this.isDirty = true;
}
- boolean isGotChestSortInfo()
+ public boolean isGotChestSortInfo()
{
return gotChestSortInfo;
}
- void setGotChestSortInfo(boolean gotChestSortInfo)
+ public void setGotChestSortInfo(boolean gotChestSortInfo)
{
this.gotChestSortInfo = gotChestSortInfo;
this.isDirty = true;
}
- boolean isGotInventorySortInfo()
+ public boolean isGotInventorySortInfo()
{
return gotInventorySortInfo;
}
- void setGotInventorySortInfo(boolean gotInventorySortInfo)
+ public void setGotInventorySortInfo(boolean gotInventorySortInfo)
{
this.gotInventorySortInfo = gotInventorySortInfo;
this.isDirty = true;
}
- boolean isGotRestackInfo()
+ public boolean isGotRestackInfo()
{
return gotRestackInfo;
}
- void setGotRestackInfo(boolean gotRestackInfo)
+ public void setGotRestackInfo(boolean gotRestackInfo)
{
this.gotRestackInfo = gotRestackInfo;
this.isDirty = true;
}
-
- private UUID playerID;
- static void Preload(Player player)
+ public static void Preload(Player player)
{
new PlayerData(player);
}
- static PlayerData FromPlayer(Player player)
+ public static PlayerData FromPlayer(Player player)
{
List data = player.getMetadata(METADATA_TAG);
if(data == null || data.isEmpty())
@@ -111,61 +115,53 @@ private PlayerData(Player player)
this.playerID = player.getUniqueId();
this.loadingThread = new Thread(new DataLoader());
this.loadingThread.start();
- player.setMetadata(METADATA_TAG, new FixedMetadataValue(AutomaticInventory.instance, this));
+ player.setMetadata(METADATA_TAG, new FixedMetadataValue(AutomaticInventory.getInstance(), this));
}
-
- int firstEmptySlot = -1;
-
- private boolean isDirty = false;
-
- private boolean sortChests = true;
- boolean isSortChests()
+
+ public boolean isSortChests()
{
this.waitForLoadComplete();
return sortChests;
}
- void setSortChests(boolean sortChests)
+ public void setSortChests(boolean sortChests)
{
this.isDirty = true;
this.sortChests = sortChests;
}
-
- private boolean sortInventory = true;
-
- boolean isSortInventory()
+ public boolean isSortInventory()
{
this.waitForLoadComplete();
return sortInventory;
}
- void setSortInventory(boolean sortInventory)
+ public void setSortInventory(boolean sortInventory)
{
this.isDirty = true;
this.sortInventory = sortInventory;
}
- void incrementManualDeposits()
+ public void incrementManualDeposits()
{
this.manualDepositsThisSession++;
}
- int getManualDeposits()
+ public int getManualDeposits()
{
return this.manualDepositsThisSession;
}
- boolean isGotQuickDepositInfo()
+ public boolean isGotQuickDepositInfo()
{
return gotQuickDepositInfo;
}
- void setGotQuickDepositInfo(boolean newValue)
+ public void setGotQuickDepositInfo(boolean newValue)
{
this.gotQuickDepositInfo = newValue;
}
- void saveChanges()
+ public void saveChanges()
{
- if(!this.isDirty) return;
+ if(!this.isDirty){ return; }
this.waitForLoadComplete();
this.savingThread = new Thread(new DataSaver());
@@ -185,7 +181,7 @@ private void waitForLoadComplete()
}
}
- void waitForSaveComplete()
+ public void waitForSaveComplete()
{
if(this.savingThread != null)
{
@@ -217,7 +213,7 @@ private void writeDataToFile()
{
StringWriter errors = new StringWriter();
e.printStackTrace(new PrintWriter(errors));
- AutomaticInventory.AddLogEntry("Failed to save player data for " + playerID + " " + errors.toString());
+ AutomaticInventory.addLogEntry("Failed to save player data for " + playerID + " " + errors.toString());
}
this.savingThread = null;
@@ -270,7 +266,7 @@ private void readDataFromFile()
{
StringWriter errors = new StringWriter();
latestException.printStackTrace(new PrintWriter(errors));
- AutomaticInventory.AddLogEntry("Failed to load data for " + playerID + " " + errors.toString());
+ AutomaticInventory.addLogEntry("Failed to load data for " + playerID + " " + errors.toString());
}
}
}
@@ -293,7 +289,7 @@ public void run()
}
}
- boolean isGotDepositAllInfo()
+ public boolean isGotDepositAllInfo()
{
return this.gotDepositAllInfo;
}
@@ -303,4 +299,4 @@ public void setGotDepositAllInfo(boolean status)
this.gotDepositAllInfo = status;
this.isDirty = true;
}
-}
\ No newline at end of file
+}
diff --git a/src/me/ryanhamshire/AutomaticInventory/SendPlayerMessageTask.java b/src/me/ryanhamshire/automaticinventory/SendPlayerMessageTask
similarity index 68%
rename from src/me/ryanhamshire/AutomaticInventory/SendPlayerMessageTask.java
rename to src/me/ryanhamshire/automaticinventory/SendPlayerMessageTask
index 1ebe963..8c15432 100644
--- a/src/me/ryanhamshire/AutomaticInventory/SendPlayerMessageTask.java
+++ b/src/me/ryanhamshire/automaticinventory/SendPlayerMessageTask
@@ -1,13 +1,13 @@
//Copyright 2015 Ryan Hamshire
-package me.ryanhamshire.AutomaticInventory;
+package me.ryanhamshire.automaticinventory;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
//sends a message to a player
//used to send delayed messages, for example help text triggered by a player's chat
-class SendPlayerMessageTask implements Runnable
+public class SendPlayerMessageTask implements Runnable
{
private Player player;
private ChatColor color;
@@ -25,10 +25,10 @@ public void run()
{
if(player == null)
{
- AutomaticInventory.AddLogEntry(color + message);
+ AutomaticInventory.addLogEntry(color + message);
return;
}
- AutomaticInventory.sendMessage(this.player, this.color, this.message);
+ AutomaticInventory.getInstance().sendMessage(this.player, this.color, this.message);
}
}
diff --git a/src/me/ryanhamshire/automaticinventory/TextMode b/src/me/ryanhamshire/automaticinventory/TextMode
new file mode 100644
index 0000000..e2e102a
--- /dev/null
+++ b/src/me/ryanhamshire/automaticinventory/TextMode
@@ -0,0 +1,15 @@
+//Copyright 2015 Ryan Hamshire
+
+package me.ryanhamshire.automaticinventory;
+
+import org.bukkit.ChatColor;
+
+//just a few constants for chat color codes
+public class TextMode
+{
+ public final static ChatColor INFO = ChatColor.AQUA;
+ public final static ChatColor INSTR = ChatColor.YELLOW;
+ public final static ChatColor WARN = ChatColor.GOLD;
+ public final static ChatColor ERR = ChatColor.RED;
+ public final static ChatColor SUCCESS = ChatColor.GREEN;
+}
diff --git a/src/plugin.yml b/src/plugin.yml
new file mode 100644
index 0000000..86e02b7
--- /dev/null
+++ b/src/plugin.yml
@@ -0,0 +1,51 @@
+main: me.ryanhamshire.automaticinventory.AutomaticInventory
+name: AutomaticInventory
+version: 2.7.2 Fork
+commands:
+ debugai:
+ description: The debug command for AutomaticInventory
+ usage: /debugai
+ permission: automaticinventory.debug
+ autosort:
+ description: Toggles auto-sorting options.
+ usage: /autosort
+ depositall:
+ description: Deposits your non-hotbar inventory into any nearby chests containing matching items.
+ usage: /depositall
+ aliases: [da, dumpitems, dumploot, depositloot]
+ permission: automaticinventory.depositall
+permissions:
+ automaticinventory.admin.*:
+ description: Grants all administrative privileges.
+ children:
+ automaticinventory.debugai: true
+ automaticinventory.user.*:
+ description: Grants all user privileges.
+ children:
+ automaticinventory.sortinventory: true
+ automaticinventory.sortchests: true
+ automaticinventory.refillstacks: true
+ automaticinventory.quickdeposit: true
+ automaticinventory.depositall: true
+ automaticinventory.debugai:
+ description: Grants permission to use /DebugAI.
+ default: op
+ automaticinventory.sortinventory:
+ description: Grants permission to auto-sort personal inventory.
+ default: true
+ automaticinventory.sortchests:
+ description: Grants permission to auto-sort chest content.
+ default: true
+ automaticinventory.refillstacks:
+ description: Grants permission to auto-refill depleted hotbar stacks.
+ default: true
+ automaticinventory.quickdeposit:
+ description: Grants permission to auto-deposit matching items into a chest with shift-right-click.
+ default: true
+ automaticinventory.depositall:
+ description: Grants permission to use /DepositAll.
+ default: true
+load: STARTUP
+authors: [ryanhamshire,crazyhoorse961]
+website: https://github.com/crazyhorse961/AutomaticInventory
+database: false