INFO: ToolPack won't get any further updates!
- Tested Minecraft Versions:
- 1.8
Because its old and should be deprecated!
ToolPack with many tools for different usage.
For developers.
Just put it into build path and later as plugin for the server.
Your plugin need a "depend: [BukkitToolPack]" in its plugin.yml to prevent bugs.
If you have created a plugin with this package, tell me or send me a link, I would like to see it and I can show you options, you might not know
--------------------------------------------------------------------------------------------
PAY ATTENTION: older versions (before 1.3) may not work with the actual version!
--------------------------------------------------------------------------------------------
old and deprecated:
- MiniPlayerTools (static access) // replaced with PlayerTools
- FileManager (static access) (pre alpha) // replaced with (new) FileManager
- ConvertObjects (static access) (pre alpha) // replaced with ObjectConverter
normal access Tools:
static access Tools:
- ConfigEditor (beta)
- PreJoinListener (add as Listener for simple usage playerPreJoin-actions)
- ChatRecognizer (add as Listener for simple keyword recognizing)
- ChatModifier (add as Listener for simple modifiing chat)
instance access Tools:
- StaticConfigEditor (alpha)
- ResourceLoader (alpha)
APIs:
- FileManager (manage textfiles)
- PlayerTools (advanced player functions)
- ObjectConverter (easy converting object to another type)
- DataSafe (pre alpha)
- EssentialsTools (pre alpha)
soon:
- JConomy (static access API) (alpha)
- ClickInventoryAPI (static access API) (pre alpha)
- DBEditor
information about instance access:
Tools with instance access doesn't have a visible constructor, so you can't go this:
Every instance access tool has a static method called "instance()" or "getInstance()" instead of a usable constructor.Code (Text):ToolClass tool = new ToolClass();
Using tools with instance access:
Code (Text)://for example: ObjectConverter
ObjectConverter convert = ObjectConvert.instance();
// then your code with convert.
// for example:
String[] array = new String[] { "Item1", "Item2", "Item3 };
String randomItem = (String) convert.randomItem(array);
functions and usage of the tools:
v1.0.0.0 (alpha)
instance access:
- void chatAsPlayer(Player p, String message)
- boolean executeCommandAsPlayer(Player p, String command)
- void openPlayersInventoryToOtherPlayer(Player player, Player otherPlayer)
- void sendMessageWithHint(Player p, String message, String hint)
- void sendMessageWithHint(Player p, String premessage, String message, String hint)
- void sendMessageWithHintAndCommand(Player p, String message, String hint, String command)
- void sendMessageWithHintAndCommand(Player p, String preMessage, String message, String hint, String command)
v0.1.0.0 (alpha)
instance access:
- List<String> getLinesOfTextFile(String path)
- List<String> getLinesOfTextFile(InputStream is)
- boolean writeLinesToTextFile(List<String> lines, String path)
v1.0.0 (alpha)
instance access:
- Player[] playerCollectionToArray(Collection<? extends Player> col)
- Object[] collectionToArray(Collection<?> col)
- String[] string_listToArray(List<String> list)
- List<String> string_arrayToList(String[] array)
- Object[] addObjectToArray(Object o, Object[] array)
- Object[] shuffleArray(Object[] array)
- Object randomItem(Vector<Object> array)
- Object randomItem(Object[] array)
- Object[] exchange(Object[] array, int p1, int p2)
- Comparable<Object>[] sortArray(Comparable<Object>[] array)
- Object[] removeIndexFromArray(Object[] array, int index)
- boolean containsArrayObject(Object[] array, Object o)
- Object[] removeObjectFromArray(Object[] array, Object o)
- int indexOfObject(Object[] array, Object o)
v1.5.3.2
constructors:
functions:
- ConfigEditor(String path, boolean createIfNotExisting)
- ConfigEditor(String path)
usage:
- void resetPath(String neuerPfad)
- int load()
- void createNewConfig()
- int save()
- boolean usable()
- void set(String path, Object value)
- void set(String path, Location loc, boolean saveWorld, boolean saveView)
- ValueType getType(String path)
- boolean contains(String path)
- Object get(String path)
- String getString(String path)
- int getInt(String path)
- double getDouble(String path)
- float getFloat(String path)
- long getLong(String path)
- boolean getBoolean(String path)
- UUID getUUID(String path)
- List<String> getStringList(String path)
- ItemStack getItemStack(String path)
- OfflinePlayer getOfflinePlayer(String path)
- Location getLocation(String path)
- YamlConfiguration getRawConfigData() //deprecated
loading:
saving:
- ConfigEditor config = new ConfigEditor(path, true);
- config.load();
- now its your turn
- config.save();
- thats all
v0.1.0.6 (pre alpha)
constructors:
(sensitivityLevel: min: 1; max: 4; higher --> more precise)
- ChatRecognizer(EventMethod eventMethod, String[] keyWords, int sensitivityLevel)
- ChatRecognizer(EventMethod eventMethod, String[] keyWords)
- ChatRecognizer(String[] keyWords)
functions:
(using the Event is still not recommended)
- void setUseEvent(boolean useEvent)
- boolean usingEvent()
- boolean canWork()
v0.1.0.5 (pre alpha)
constructors:
ChatFormat:
- ChatModifier(ChatFormat format)
- ChatModifier(ChatFormat format, String playerPermission)
functions:
usage:
- void setUp(String format, boolean replaceColors)
- void setColorCodeCharacter(char cc)
- void setGroupName(String name)
- void setPrefix(String pre)
- void setLookUpForEssentials(boolean b)
- String message(String message, Player p) (format a message by settings)
if you want to use it with essentials:
- new ChatFormat object
- setColorCodeCharacter(char char_for_color_codes) //standard: '&'
- setUp(format, if_you_want_to_use_color_codes) //the replacements for the specific values are constants in ChatFormat, see "constants"
- optional: setGroupName(name) & setPrefix(prefix)
- new ChatModifier(chatFormatObject)
- getServer().getPluginManager().registerEvents(chatModifierObject, plugin)
Important: remove EssentialsChat from your plugin folder
- new ChatFormat object
- setColorCodeCharacter(char char_for_color_codes) //standard: '&'
- setUp(format, if_you_want_to_use_color_codes) //the replacements for the specific values are constants in ChatFormat, see "constants"
- setLookUpForEssentials(true)
- use "essentialsNameReplacement" instead of "playerDisplayNameReplacement" or "playerNameReplacement"
v0.1.1.2
// since 1.3: moved to another path
constructor:
- PreJoinListener(EventMethod eventMethod)
functions:
usage:
- void setMessageforKicking(String message)
- void setGeneralResult(Result result)
- void setSuccessResult(Result result)
- void enableWhiteList(String[] playerNameList)
- void disableWhiteList()
- boolean canWork()
whitelist handling:
- new EventMethod
- new PreJoinListener(eventMethodObject)
- setMessageForKicking(message) //mustn't be null!
- setGeneralResult(result) //eventMethod returns false
- setSuccessResult(result) //eventMethod returns true
- optional: enableWhitelist(playerNames_in_array)
- getServer().getPluginManager().registerEvents(preJoinListenerObject, plugin)
if (the player is not listed) ---> generalResult
if (the player is listed) ---> eventMethod ---> resultv0.1.0.0 (pre alpha)
static functions:
- YamlConfiguration getConfig(String path)
- YamlConfiguration getConfig(InputStream is)
- boolean createConfigIfNotExisting(String path)
- boolean setValue(String file, String path, Object value)
- Object getValue(String file, String path)
- boolean contains(String file, String path)
- ValueType getType(String file, String path)
- List<?> getList(String file, String path)
- Location getLocation(File file, String path)
- int getInt(File file, String path)
- String getString(File file, String path)
- double getDouble(File file, String path)
- float getFloat(File file, String path)
- long getLong(File file, String path)
- Color getColor(File file, String path)
- ItemStack getItemStack(File file, String path)
- OfflinePlayer getOfflinePlayer(File file, String path)
- boolean getBoolean(File file, String path)
- List<String> getStringList(File file, String path)
- List<Byte> getByteList(File file, String path)
- List<Character> getCharacterList(File file, String path)
- List<Integer> getIntegerList(File file, String path)
- List<Float> getFloatList(File file, String path)
- List<Double> getDoubleList(File file, String path)
- List<Boolean> getBooleanList(File file, String path)
v1.0.0.0 (alpha)
functions:
additional classes:
- boolean setUp()
- boolean hasPlayerWallet(OfflinePlayer player)
- void addPlayerWallet(OfflinePlayer player)
- void addPlayerBank(OfflinePlayer player)
- boolean hasPlayerBank(OfflinePlayer player)
- int depositToPlayer(OfflinePlayer player, double amount, boolean bank)
- double balanceOfPlayer(OfflinePlayer player, boolean bank)
- int getFromPlayer(OfflinePlayer player, double amount, boolean bank)
- String getMoneyName()
- void setMoneyName(String name)
- String format(double d)
- double getBankZins() // means bank interest
events:
- JConomyListener (for automatic bank and wallet account generating)
- JConomySheduler (for bank interest, add as Runnable in a Sheduler)
- MoneyKind (soon as support for more than one currency)
usage:
- if you use the methods "depositToPlayer" or "getFromPlayer", JConomy will call an BalanceChangedEvent
- if your using the JConomySheduler, it will call an BankInterestEvent, when it had given money to online players as interest.
- setUp() //to check for errors and repair them
- optional: add JConomyListener:
Code (Text):getServer().getPluginManager().registerEvents(new JConomyListener(), this);- optional: add JConomySheduler:
Code (Text):int scheduler = getServer().getScheduler().scheduleSyncRepeatingTask(this, new JConomySheduler(), 0, 1200);- then: you can do your stuff...
version: 0.1.0.0 (pre alpha)
// since 1.3: moved to another path
soon...version: 0.1.0.0 (pre alpha)
functions:
usage:
- static DataSafe instance() // important
- boolean hasValue(String name)
- boolean addValue(Value<?> var)
- Value<?> getValue(String name)
- boolean removeValue(Plugin p, String name)
available value formats:
- adding value:
Code (Java):DataSafe safe = DataSafe.instance();
StringValue s = new StringValue(plugin, "valueName", "The value!"); //the "plugin" is your plugin, could be "this in main class
boolean done = safe.addValue(s);- checking for value:
Code (Java):DataSafe safe = DataSafe.instance();
boolean exists = safe.hasValue("nameOfTheValue");- resetting value:
Code (Java):DataSafe safe = DataSafe.instance();
StringValue s = (StringValue) safe.getValue("nameOfTheValue");
s.setValue(plugin, "newValue");- removing value:
Code (Java):DataSafe safe = DataSafe.instance();
boolean done = safe.removeValue(plugin, "nameOfTheValue");
value functions:
- StringValue
- IntegerValue
- DoubleValue
- FloatValue
- LocationValue
- Type getType()
- String getName()
- Plugin getCreator()
- Plugin getLastEditor()
- T getValue() // T is a replacement for the type you have chosen
- void setValue(Plugin p, T value) // T is a replacement for the type you have chosen
soon...
Many classes have a "version" constant with their actual version.
ChatFormat
StaticConfigEditor (default values for return)
- .groupReplacement
- .playerNameReplacement
- .playerDisplayNameReplacement
- .messageReplacement
- .prefixReplacement
- .essentialsNameReplacement
- def_int
- def_float
- def_double
- def_long
If there are any problems, report them to me.
If you have any ideas for my tool-pack or for a new plugin/plugin-api/tool-pack, tell me. (in english or in german)
Please rate, if you enjoy.
Some functions (MiniPlayerTools) are only compatible with spigot version 1.8.3 but most are compatible with all versions of spigot and bukkit.
Vote:
Which one would you like to get first?
1. ArenaSystemApi (simplifying arena-based minigame creation)
2. ClickInventoryApi (simplifying click-inventory creation)
please tell me your choice by writing a comment or sending an E-Mail.
Coming soon:
- ArenaSystemApi
- ClickInventoryApi
- Scoreboarder (later)
if you have any idea, please tell me.

ToolPack - 1.8 1.4.1.1
ToolPack with different functions
Recent Updates
- Update Checker added Dec 29, 2015
- More functions and fixes Nov 14, 2015
- NEW SYSTEM! Oct 13, 2015