• 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
Mackenzie (Moderocky), blce
Supported Minecraft Versions
  1. 1.12
  2. 1.13
  3. 1.14
  4. 1.15
  5. 1.16
This API is aimed primarily at plugin-makers or beginner addon developers.

The primary goal is to try and simplify most of the dull or complex tasks that are required in addon/plugin creation.

I use it in production, which is pretty much a guarantee that I will keep it updated.
Almost no features rely on Minecraft version-specific methods so it ought to work on almost any version.

Note: You probably want to get this via the repository, the jar itself won't be much help. :emoji_slight_smile:

Mask Wiki?

Included Features
  • Automatic Skript addon registration (optional)
  • Automatic config-handling annotations
  • Built-in class debugging tools
  • Simplification of certain tasks (meta and keys)
  • Templates for common things
  • Caches and special maps for dealing with positional objects
  • N-Dimensional maps (for dealing with objects by property)
  • Special callback system for advanced tasks (async in progress)
  • Simplified reflection methods (good for tricky NMS work)
  • Automatic object property expression generation (BETA)
  • Exposition of some useful features from Skript
Upcoming Features
  • Full Skript syntax API (handlers and automatic registration)
  • Syntax configuration system (easily enable/disable/change syntax on the fly)
  • Annotations for automatic Skript effect generation (for exposing your plugin for Skript)
  • Improved debugging system
  • Additional storage API (for avoiding variables)
  • Converters to and from irritating Skript types
Maven
Repository/dependency:
Code:
<repository>
    <id>mask-repo</id>
    <url>https://gitlab.com/api/v4/projects/18568066/packages/maven</url>
</repository>


<dependency>
   <groupId>com.moderocky</groupId>
   <artifactId>Mask</artifactId>
   <version>2.1.2</version>
</dependency>

Package re-mapping (prevents conflicts if there are two plugins using this dependency).
Code:
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.1.1</version>
    <executions>
       <execution>
          <phase>package</phase>
          <goals>
             <goal>shade</goal>
          </goals>
          <configuration>
             <artifactSet>
                <includes>
                   <include>com.moderocky:Mask</include>
                </includes>
             </artifactSet>
             <relocations>
                <relocation>
                   <pattern>com.moderocky.mask</pattern>
                   <shadedPattern>your.package.here.mask</shadedPattern>
                </relocation>
             </relocations>

             <createDependencyReducedPom>false</createDependencyReducedPom>
          </configuration>
       </execution>
    </executions>
 </plugin>

Gradle
I don't know how Gradle handles package mapping.
I'm sure you can work this out for yourselves.

This seems to be the most popular feature, so I've tried to provide some documentation.

Mask contains a simplified config handler that makes use of annotations.
This can be used to easily serialise/de-serialise your config.

To use, implement the 'Config' interface.

An example config can be seen here:
https://gitlab.com/Pandaemonium/Mask/-/blob/master/src/examples/java/com/moderocky/example/config/ExampleConfig.java

Remember: by default, your field-names are converted from camelCase to snake_case to provide the yaml key.
If you want to change this, you can use the @Keyed annotation to specify something else.

Available annotations:
Code:
@Configurable // marks this field to be mapped
@Bounded // sets bounds for a number field
@Keyed // allows a custom yaml key to be used
@Regex // passes string input through a matcher
@Comment // allows a comment to be left
@Serialise // currently does nothing, will soon allow a custom (de)serialising method to be used
@Header // attaches to the class, specify yaml header comments

Other basic examples can be found here: https://gitlab.com/Pandaemonium/Mask/-/tree/master/src/examples
I will try to remember to add more as I add more features.
Author
Moderocky
Downloads
363
Views
445
First release
Last update
Rating
5.00 star(s) 2 ratings

More resources from Moderocky

Latest updates

  1. Commander v2 and 1.16.1 Support

    In this version Mask has been modularised. This may contain some breaking changes. The `Mask`...
  2. 1.16.1 Fixes

    Fixed both of the command systems to work on 1.16.1. These are now done entirely via reflection...
  3. Mask v2! Smoke and Mirror

    This is the official Mask v2 release. It may contain breaking changes for your plugins, though...

Latest reviews

I love it! I especially like the configuration annotations, it makes config files so much simpler and neater to make and use! I'd honestly recommend Mask for anyone who's making a plugin in the first place, Skript addon or otherwise :D
Woaw, Perfect timing, The time that i was making an addon you made this now i'm using this