StarMCLib icon

StarMCLib -----

A library that contains utilities for Minecraft made by StarDevLLC.



This is a plugin meant solely for preventing to have to depend on StarCore and the heavier things that it provides.
Do not use this plugin with StarCore. They are mutually exclusive and StarCore already provides StarMCLib

Requirements

Java 21

Features
Actors: This is a feature that allows for more of a generic way of referencing things like players, console and plugins. They can be expanded upon if desired. The Actors class is the entry-point to using this
CmdFlags: This allows for an easy way to parse flags that are denoted with a "-" character. This supports both presence flags, where they are effectively booleans. Or a more complex type that can have a valid proved after it. See below the Features Section for more information
Mojang Profiles: This provides a way to get player profile information from the Mojang API including skin information
Enum Names: These are classes that format names of enums like EntityType, Material and PotionEffectType to be more human friendly. Child classes can be created to add custom names for consistency. The default instance does not allow changing these
Plugin: This provides several things. An ExtendedJavaPlugin that interfaces with more of the utilities from StarLib and a PluginEventBus type that does similar things.
Cuboid: A simple class that defines a cuboid shape.
Position: A position that is not linked to a world. Provides methods to convert to and from Locations
StarColorsV2: This is a class that uses the Adventure Text API
StarThread: This is a thread class that extends from BukkitRunnable and provides timing and performance tracking and metrics

CmdFlags
These are best used in conjunction with commands. You define each flag by creating new instances of the Flag Types (ComplexFlag or PresenceFlag) or you can create your own class that either implements the Flag interface, or extends the AbstractFlag class. Then you instantiate the CmdFlags class providing the flags that you defined. Then when a command is run, you call the CmdFlags#parse(String[]) method passing in the arguments from the command. This returns a FlagResult which consists of the modified args that remove the flags and a Map of FlagValues to their Flag. It is recommended that you reassign the args variable. The FlagResult allows you to chain results together using the addFrom(FlagResult) method and has two helper methods to deal with the flags directly. An isPresent method to return if the flag is present. And a getValue method that returns the value of the flag

Command
The base command is /starmclib with the base permission node:
starmclib.command

/starmclib actors <args>
Permission: starmclib.command.actors​
/starmclib actors list [page]
Permission: starmclib.command.actors.list
Description: Lists all actors that have been created. This is only applies when any of the static creation methods in Actors is called for one. so not all online players or plugins will have an instance of an Actor​
/starmclib actors sendmessage <message>
Permission: starmclib.command.actors.sendmessage
Aliases: sendmsg and sm
Description: Allows you to send a message to an actor of your choosing. This does support colors.
Warning: Only give those that you trust this permission. This is a powerful command as you can pretty much fake any message if you know the formatting. This is mainly used as a debug command to test message formatting. You could probably use it as a troll feature, but be careful with it
/starmclib profiles <args>
Permission: starmclib.command.profiles​
/starmclib profiles list [page]
Permission: starmclib.command.profiles.list
Description: Lists all profiles that have been fetched from the MojangAPI since the server started.​

Provided Libraries
StarLib v0.20.0
SMCVersion v0.1.0
SMaterial v0.1.0
config v0.2.1
Gson v2.13.1 (Relocated to com.stardevllc.gson)
Kyori Adventure API v4.25.0 (Relocated to com.stardevllc.kyori.adventure
Kyori MiniMessage v4.25.0 (Relocated to com.stardevllc.kyori.adventure.text.minimessage)

This plugin is provided free of charge and under the MIT Open Source License. I will never sell this library anywhere. If you see it being sold, it is not by me and please report any of these cases to me directly.
Resource Information
Author:
----------
Total Downloads: 7
First Release: Oct 14, 2025
Last Update: Today at 7:07 AM
Category: ---------------
All-Time Rating:
0 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings