PropScriptManager

public final class PropScriptManager

Manages the lifecycle of Lua scripts bound to props in FreeMinecraftModels.

On prop spawn, checks for a sibling YML config next to the model file. If absent, creates a default config asynchronously (no scripts this load). If present, reads the config and binds the listed scripts from the scripts/ folder.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
public static void initialize()
Called during plugin enable.
Link copied to clipboard
public static boolean onPropLeftClick(PropEntity prop, Player player)
Called by PropEntity's left-click callback.
Link copied to clipboard
public static void onPropRemove(PropEntity prop)
Shuts down the script instance associated with a prop when it is removed.
Link copied to clipboard
public static boolean onPropRightClick(PropEntity prop, Player player)
Called by PropEntity's right-click callback.
Link copied to clipboard
public static void onPropSpawn(PropEntity prop)
Called when a PropEntity is created.
Link copied to clipboard
public static File resolveSiblingYml(FileModelConverter converter)
Resolves the sibling YML config file for a model: same directory, same base name (model extension stripped, bow/crossbow draw-state suffix stripped), .yml extension.
Link copied to clipboard
public static void shutdown()
Called during plugin disable.