• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Contributors
Moderocky
Misk - A Miscellaneous Addon

For Skript 1.14.1+

The purpose of this addon is to add a few bits and pieces of syntax that aren't present in vanilla Skript or in other add-ons.
Over time, I will also update syntax from abandoned add-ons, such as SkStuff.

Requirements (Things you must have!)



    • Spigot 1.14.1
Soft Dependencies (Recommended!)



    • ProtocolLib (latest dev build)
    • PaperSpigot
WARNING: This is a new release. There may be bugs. Please read the instructions at the bottom of this post, if you find one. :emoji_frowning:


Current features (Currently in the plugin, available for use)



    • Villager syntax
    • Merchant syntax
    • Guardian Lasers
    • Entity syntax
    • Custom trades
    • Custom merchant objects
    • Wandering Trader syntax
    • Shoot Items
    • Open new 1.14 container GUIs
    • Basic entity pathfinding/navigation syntax
    • Horse Jump event
    • Vehicle steer event (ProtocolLib required)
    • Advancements menu toggle (ProtocolLib required)
Pipeline features (Partially finished)



    • Client-side equipment
    • Pathfinders (updated from SkStuff)
    • Loot-table utilities
Planned features (Not started)



    • Basic file utilities
    • Have a request? Contact me on discord!
Images and Examples (from my server)
misk_trader.png

A Wandering Trader with custom recipes. Wait! That's illegal.

misk_custom.png

A Custom Merchant Object using 1.14's new model data. Check out my custom item registry resource for more info.

https://cdn.moderocky.com/mov/misk_ravager.mp4
An example of controllable Ravagers, using the on vehicle steer: event with ProtocolLib.


Official Documentation and Syntax?
Click Here

Custom Merchant:
Code:
command /blob:
  trigger:
    set {_m} to a new merchant named "Trader"
    add (a new trade of (2 of gold ingot) and (stone) for (iron ingot named "bob")) to {_r::*}
    add (a new trade of (1 of gold ingot) and (air) for (gold ingot named "fred")) to {_r::*}
    add trades {_r::*} to merchant {_m}
    open merchant {_m} to player

Locking a chest:
Code:
on rightclick on chest:
    player's tool is stick
    cancel event
    lock clicked block with key "key name"
    broadcast "a chest was locked!"
# you can now open this chest ONLY if your tool is named "key name"! :D

Villager Trade Editing:
Code:
set {_e} to target entity
set {_r} to a new trade of stone and stick for slimeball
add trade {_r} to villager {_e}

Vehicles:
Code:
(ProtocolLib)
on vehicle steer:
  event-string is "SPACEBAR"
  push player's vehicle up at speed 10
# maybe don't try this, else you'll end up in space...
# this can be used to make controllable vehicles
# if you need help/examples, you can ask me :)

The plugin contains a MerchantUtils class.
You can use this to easily mess with CMOs and villagers, as well as using syntax that isn't publically available yet!

These are designed to simplify Bukkit methods. They will not change between versions (as Bukkit methods sometimes do).

Add this to the top of your skript:
Code:
import:
    com.moderocky.misk.utils.LootTableUtils
    com.moderocky.misk.utils.SkriptUtils
    com.moderocky.misk.utils.MerchantUtils

You can then use the following methods in your code:
Code:
set {variable} to LootTableUtils.newSeed()
# returns a Java Random

Code:
set {variable} to SkriptUtils.getItemStack({item-here})
# returns a real Bukkit itemstack

Code:
set {list} to MerchantUtils.tradeList()
set {list} to MerchantUtils.tradeList({recipes})
# returns a mutable Java List for MerchantRecipes
# the second allows you to add a pre-existing collection

Code:
set {recipe} to MerchantUtils.disableRecipe({recipe})
set {recipe} to MerchantUtils.enableRecipe({recipe})
MerchantUtils.disableRecipe(merchant, integer)
MerchantUtils.enableRecipe(merchant, integer)
# allows you to disable individual recipes from a merchant or from a villager/wandering trader

Code:
set {recipe} to MerchantUtils.getRecipe(merchant, integer)
# returns a recipe at an index. Indices go from 0+, like inventory slots

Code:
MerchantUtils.merchant()
MerchantUtils.merchant(name)
MerchantUtils.merchant(tradelist)
MerchantUtils.merchant(name, tradelist)
MerchantUtils.merchant(recipes[ ])
MerchantUtils.merchant(name, recipes[ ])
# Simple CMO creators for every situation
# The last two accept a collection. It's just to cover every possibility

MerchantUtils.openMerchant(player, merchant)
# Simple CMO creators for every situation

And our two favourites...
Code:
MerchantUtils.setResult(merchant, integer, itemstack)
MerchantUtils.recipeWithResult(merchantrecipe, itemstack)
# Bukkit doesn't allow this by default, it took me a while to work around!
# Remember that these take ITEMSTACKS. Use the getItemStack() method.

Code:
MerchantUtils.tradeCreator(itemstack, itemstack, itemstack)
# A LOT simpler than Bukkit's constructor. Also handles all the hard work for you.
# Bukkit doesn't allow this by default, it took me a while to work around!
# Remember that these take ITEMSTACKS. Use the getItemStack() method.

Found a Bug?!?



    • Are you on a supported 1.14.1 Spigot (or PaperSpigot)?
    • Are you on a supported 2.4.x Skript?
    • Do you have the soft-dependencies required for this syntax?
    • Are you sure it isn't a Spigot bug?
    • Are you sure it isn't a Skript bug?
    • Are you sure it's a MiSK bug?
If the answer to these is yes, then you should contact me!
Discord: Moderocky#0001

If you find a bug, contact me here or on discord: Moderocky#0001 and you can get support.

Got a suggestion/feature request?
Contact me on Discord!

Need Skript help?
SkUnity Discord: https://discord.gg/RBhvPG8
  • Like
Reactions: Diclo
Author
Moderocky
Downloads
8,920
Views
8,920
First release
Last update
Rating
5.00 star(s) 4 ratings

More resources from Moderocky

  • Guardian
    Addon Guardian
    A lightweight and accessible zones/regions plugin and Skript addon.
  • Mask
    API Mask
    A plugin framework primarily aimed at Skript addons to simplify boilerplate tasks.
  • TranSKator
    Addon TranSKator
    Support for translated messages via Minecraft's built-in language system.

Latest updates

  1. Big Re-work, better handling, fixed several bugs. New Villager syntax!

    Although not a huge amount was added, this is probably the first release that I'm pretty...
  2. Big Update! Guardian Lasers + Entity Syntax :D

    In this update, I introduce the first test of Guardian Lasers into Skript! These are notoriously...
  3. Quick Fix // For Paper -42 Users

    Had to fix something to make this compatible with the latest Paper -42 build. No idea why, but...

Latest reviews

Worked great for all my 1.16 - 1.18 time. But Skript 2.6.2 broke it now :( Can you please give it an update to make it work again?
So exactly what i need, i was search this feature after 1.14 release
and i found this feature when Skript 1.14 release, this is so Perfect!
Moderocky
Moderocky
Thanks for your review! :)
Are there any other features/suggestions you'd like me to add in the next update?
This is an awesome addon for Skript. Can't wait for goals! Keep up the good work!
Moderocky
Moderocky
Thanks for your review! :)
Updating Goals is my current project. If you have any other suggestions/requests, please let me know!
best skript addon for 1.14+!
try it an convince yourself!
Moderocky
Moderocky
Thanks for your review! If you have any suggestions or syntax requests, let me know.