HomeJavaModsMask
Mask
This API is aimed primarily at beginner plugin-makers.

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

I use this in production, which is pretty much a guarantee that I will keep it updated and maintained.
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.


Looking for the JavaDocs?
Looking for the Repository?
Looking for the Support Discord?
Looking for the Mask Wiki?



Included Features

Upcoming Features



Spoiler: Repository/Including
Maven
Repository/dependency:
Code (Text):

<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 (Text):

<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.

Spoiler: Config Handlers
This seems to be the most popular feature, so I've tried to provide a simple example.

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

An example config can be seen here .


To use, implement the 'Config' interface.

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 (Text):
@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

Remember : many more feature examples can be found in the repository.

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.
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.

Mask is a free Minecraft Java mod. Compatible with Minecraft 1.13, 1.14, 1.15, 1.16. Downloaded 364 times (via Spigot). Download it and open it directly in the game.

Explore more