HomeJavaModsToolPack - 1.8
ToolPack - 1.8
INFO: ToolPack won't get any further updates!
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 :D

--------------------------------------------------------------------------------------------
PAY ATTENTION: older versions (before 1.3) may not work with the actual version!
--------------------------------------------------------------------------------------------

old and deprecated:
Spoiler: 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:
instance access Tools:
APIs:
soon:

information about instance access:
Spoiler: instance access
Tools with instance access doesn't have a visible constructor, so you can't go this:
Code (Text):
ToolClass tool = new ToolClass();
Every instance access tool has a static method called " instance()" or " getInstance()" instead of a usable constructor.

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:
Spoiler: PlayerTools
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)
Spoiler: FileManager
v0.1.0.0 (alpha)

instance access:
  • List<String> getLinesOfTextFile(String path)
  • List<String> getLinesOfTextFile(InputStream is)
  • boolean writeLinesToTextFile(List<String> lines, String path)
Spoiler: ObjectConverter
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)
Spoiler: ConfigEditor
v1.5.3.2

constructors:
  • ConfigEditor(String path, boolean createIfNotExisting)
  • ConfigEditor(String path)
functions:
  • 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
usage:

loading:

  1. ConfigEditor config = new ConfigEditor(path, true);
  2. config.load();
  3. now its your turn
saving:
  1. config.save();
  2. thats all :D
Spoiler: ChatRecognizer
v0.1.0.6 (pre alpha)

constructors:
  • ChatRecognizer(EventMethod eventMethod, String[] keyWords, int sensitivityLevel)
  • ChatRecognizer(EventMethod eventMethod, String[] keyWords)
  • ChatRecognizer(String[] keyWords)
(sensitivityLevel: min: 1; max: 4; higher --> more precise)

functions:

  • void setUseEvent(boolean useEvent)
  • boolean usingEvent()
  • boolean canWork()
(using the Event is still not recommended)
Spoiler: ChatModifier
v0.1.0.5 (pre alpha)

constructors:
  • ChatModifier(ChatFormat format)
  • ChatModifier(ChatFormat format, String playerPermission)
ChatFormat:

functions:
  • 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)
usage:
  1. new ChatFormat object
  2. setColorCodeCharacter(char char_for_color_codes) //standard: '&'
  3. setUp(format, if_you_want_to_use_color_codes) //the replacements for the specific values are constants in ChatFormat, see "constants"
  4. optional: setGroupName(name) & setPrefix(prefix)
  5. new ChatModifier(chatFormatObject)
  6. getServer().getPluginManager().registerEvents(chatModifierObject, plugin)
if you want to use it with essentials:

Important: remove EssentialsChat from your plugin folder
  1. new ChatFormat object
  2. setColorCodeCharacter(char char_for_color_codes) //standard: '&'
  3. setUp(format, if_you_want_to_use_color_codes) //the replacements for the specific values are constants in ChatFormat, see "constants"
  4. setLookUpForEssentials(true)
  5. use "essentialsNameReplacement" instead of "playerDisplayNameReplacement" or "playerNameReplacement"
Spoiler: PreJoinListener
v0.1.1.2

// since 1.3: moved to another path

constructor:
  • PreJoinListener(EventMethod eventMethod)

functions:
  • void setMessageforKicking(String message)
  • void setGeneralResult(Result result)
  • void setSuccessResult(Result result)
  • void enableWhiteList(String[] playerNameList)
  • void disableWhiteList()
  • boolean canWork()
usage:
  1. new EventMethod
  2. new PreJoinListener(eventMethodObject)
  3. setMessageForKicking(message) //mustn't be null!
  4. setGeneralResult(result) //eventMethod returns false
  5. setSuccessResult(result) //eventMethod returns true
  6. optional: enableWhitelist(playerNames_in_array)
  7. getServer().getPluginManager().registerEvents(preJoinListenerObject, plugin)
whitelist handling:
if (the player is not listed) ---> generalResult
if (the player is listed) ---> eventMethod ---> result
Spoiler: StaticConfigEditor
v0.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)
Spoiler: JConomy
v1.0.0.0 (alpha)

functions:
  • 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
additional classes:
  • 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)
events:
  • 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.
usage:
  1. setUp() //to check for errors and repair them
  2. optional: add JConomyListener:
    Code (Text):
    getServer().getPluginManager().registerEvents(new JConomyListener(), this);
  3. optional: add JConomySheduler:
    Code (Text):
    int scheduler = getServer().getScheduler().scheduleSyncRepeatingTask(this, new JConomySheduler(), 0, 1200);
  4. then: you can do your stuff...
Spoiler: EssentialsTools
version: 0.1.0.0 (pre alpha)

// since 1.3: moved to another path

soon...
Spoiler: DataSafe
version: 0.1.0.0 (pre alpha)

functions:
  • static DataSafe instance() // important
  • boolean hasValue(String name)
  • boolean addValue(Value<?> var)
  • Value<?> getValue(String name)
  • boolean removeValue(Plugin p, String name)
usage:
  1. 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 ) ;
  2. checking for value:
    Code (Java):
    DataSafe safe = DataSafe. instance ( ) ;
    boolean exists = safe. hasValue ( "nameOfTheValue" ) ;
  3. resetting value:
    Code (Java):
    DataSafe safe = DataSafe. instance ( ) ;
    StringValue s = (StringValue ) safe. getValue ( "nameOfTheValue" ) ;
    s. setValue (plugin, "newValue" ) ;
  4. removing value:
    Code (Java):
    DataSafe safe = DataSafe. instance ( ) ;
    boolean done = safe. removeValue (plugin, "nameOfTheValue" ) ;
available value formats:
  • StringValue
  • IntegerValue
  • DoubleValue
  • FloatValue
  • LocationValue
value functions:
  • 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
Spoiler: DBEditor

soon...


Spoiler: constants
Many classes have a "version" constant with their actual version.

ChatFormat
  • .groupReplacement
  • .playerNameReplacement
  • .playerDisplayNameReplacement
  • .messageReplacement
  • .prefixReplacement
  • .essentialsNameReplacement
StaticConfigEditor (default values for return)
  • 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:
Spoiler: Coming soon
- ArenaSystemApi
- ClickInventoryApi

- Scoreboarder (later)

if you have any idea, please tell me.

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

ToolPack - 1.8 is a free Minecraft Java mod. Compatible with Minecraft 1.8. Downloaded 1,442 times (via Spigot). Download it and open it directly in the game.

Explore more