OWHInternals

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

WARNING: this plugin is very powerful. Be cautious as to who you give permissions to use it. OWHInternals is a plugin for java scripting at runtime, inside chat/commands. Internals makes use of the apache commons Jexl library, and as such uses Jexl syntax for scripting. For more info on Jexl, visit the Jexl homepage.

Installation

Place OWHInternals.jar inside your plugins folder. Download Jexl 2.1.1 and Logging 1.1.3 and place the jars in your server's lib folder. if you don't have a lib folder, create one yourself in the root directory of your server. Internals currently uses Vault for permissions. If Vault is not present on your server, Internals will fall back to checking if the player is an op. Download Jexl 2.1.1
Download Logging 1.1.3

How to Use

To define a script in chat / command, you must use the opening bracket "{>" and the closing bracket "<}" (e.g. {>Code Here<}). Everything between these brackets can contain valid Jexl code and will be parsed. Chat/Commands can include as many scripts as they want. The script inside your message / command will be replaced by the value returned from the Jexl script. Thread unsafe code MUST be sent as a command. Failure to do so will result in your server breaking. If you are uncertain whether something is thread-safe, do the smart thing and assume it's not. Internals has references to the following objects in java:
Fully qualified class name Jexl reference Description
java.lang.System.class System A reference to the System class.
java.lang.String.class String A reference to the String class.
info.omgwtfhax.internals.BukkitPlugin this A reference to the plugin instance.
info.omgwtfhax.internals.Vault vault A reference to the OWHInternals' vault hook.
java.util.logging.Logger logger A reference to Bukkit.getLogger() for convenience.
org.apache.commons.lang.StringUtils.class StringUtils A reference to the StringUtils class.
org.bukkit.Bukkit.class Bukkit A reference to the Bukkit class.
org.bukkit.ChatColor.class ChatColor A reference to the ChatColor enum.
org.bukkit.Effect.class Effect A reference to the Effect enum.
org.bukkit.Enchantment.class Enchantment A reference to the Enchantment enum.
org.bukkit.Sound.class Sound A reference to the Sound enum.
org.bukkit.Instrument.class Instrument A reference to the Instrument enum.
org.bukkit.Material.class Material A reference to the Material enum.
org.bukkit.entity.Egg.class Egg A reference to the Egg class. [v1.1.0+]
org.bukkit.entity.Snowball.class Snowball A reference to the Snowball class. [v1.1.0+]

in addition, a reference to every user's Player object is created with the variable name $<playername>. References to classes can only call static methods and use static variables. Internals' vault hook contains vault.permissions vault.economy, and vault.chat variables for access to their respective Vault classes.

Permissions

Internals only uses one permission: owhinternals.administrator

Development

Internals is open source. You can find the source here. The source includes some documentation.

Todo

  • Add script saving
  • Executing scripts on events
  • More versatility in the way returned values are handled (e.g. sending it back to the user instead of putting it into their chat message)
  • Customizable open/close brackets

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files