Jinx

Jinx

138 Downloads

This plugin consists of fully reflection, no worrying about updating this plugin to the next version! The only reason to update this plugin is for more cool effects!!!!!

Let's get to the nitty gritty:

Server Owners:

Put this plugin into your plugins folder and there you go, I recommend server owners update this often because this one needs to be at the current/higher version then plugins that use it.

Developers:

Add this plugin to your build path and you can use the class Jinx! This class has a number of functions which will be listed below.

Class Jinx Methods:

  • getParticle(String) Gets a particle from a name to send to a player
  • particleNames() Returns an ArrayList<String> of all the particle names
  • sendParticle(Player, Location, particle) = Sends a particle to the player, to get a particle use getParticle(String)
  • sendHotBarMessage(Player, String) Sends a hot bar message to a player
  • sendFullTitle(Player, String, String, int, int, int) = Sends a full title to the player, the first string is big, the second string is small and the int's are:
    • Fade In Effect: How much ticks it will take for the message to fade in (20ticks in a second)
    • Stay Effect: How long it will stay in full color
    • Fade Out Effect: How much ticks it will take for the message to fade out
  • sendTitle(Player, String, int, int, int) = This is just the large text (Same int's as before)
  • sendSubTitle(Player, String, int, int, int) = This is just the small text (Same int's as before)
  • changeName(Player, String) This changes the name of the player (The server and plugins will think they had a name change)
  • sendTabBar(Player, String, String) = This sends the top and bottom of the box that appears when you hit Tab ingame
  • setNBT(ItemStack, NBTComp...) = This edits the NBT values of the item, changing its damage/attack speed ect...
  • createNBTComp(String, String, double) = This is used for the method above the first string is the slot and the second is the type:
    • Slots: [head, chest, legs, feet, mainhand, offhand]
    • Types: [generic.attackSpeed, generic.attackDamage, generic.luck, generic.maxHealth, generic.movementSpeed, generic.armor, generic.armorToughness]

JSON Messaging:

Possibly the biggest thing in this whole plugin, JSON Messaging. It's quite hard to explain like I've done above so I'm just going to show an example with all features with comments:

// These lines are just creating an item, not the Jinx API

ItemStack jsonItem = new ItemStack(Material.DIAMOND_CHESTPLATE);
ItemMeta itemMeta = jsonItem.getItemMeta();
itemMeta.setDisplayName("This is the name!");
itemMeta.setLore(Arrays.asList("Lore number 1", "I'm number two!!"));
itemMeta.addEnchant(Enchantment.DURABILITY, 2, true);
jsonItem.setItemMeta(itemMeta);

// Here is the Jinx API part
JSONMessage msg = Jinx.createJSONMessage("Would you like to: ", "yellow", "bold");
// Creating a default message


msg.append("HoverText", "green", Jinx.createHoverEvent("Put some text here though", "blue"), "italic");
// This is hoverText

msg.append(" or ", "white");
// More regular text

msg.append("ClickText", "green", Jinx.createClickEvent("/say hi", "suggest_command"), "italic");
// This is clickable text

msg.append(" or ", "white");
// More regular text

msg.append("Item", "green", Jinx.createHoverEvent(jsonItem), "italic");
// This is like hoverText but it will show the item we created above!

Jinx.sendJSONMessage(player, msg);
// This finishes it off my sending the player the message