A Kotlin-based tool to generate Lua stub files with LuaLS annotations (Teal type defintions planned) from Java source or compiled JARs. Designed for use with LuaLink.
- Parses both source and compiled JARs
- Supports LuaLS Teal-style annotations
- Extracts method signatures, field types, and class documentation
- Processes Javadoc comments
- Outputs structured Lua files for use with IDEs and Lua tooling
java -jar lua-stubgen.jar path/to/jar/paper.jar path/to/jar/adventure.jar...--- Represents a player, connected or not-- org.bukkit.entity.Player---@classPlayerlocalPlayer= {}
---@returnIdentity --- Paper startfunctionPlayer:identity() end---@returnBossBar> --- Gets an unmodifiable view of all known currently active bossbars. This currently only returns bossbars shown to the player via #showBossBar(net.kyori.adventure.bossbar.BossBar) and does not contain bukkit org.bukkit.boss.BossBar instances shown to the player.functionPlayer:activeBossBars() end---@returnComponent --- Gets the "friendly" name to display of this player.functionPlayer:displayName() end---@paramdisplayName?Component ---@returnnil --- Sets the "friendly" name to display of this player.functionPlayer:displayName(displayName) end---@returnstring functionPlayer:getName() end---@deprecated---@returnstring --- Gets the "friendly" name to display of this player. This may include color. Note that this name will not be displayed in game, only in chat and places defined by plugins.functionPlayer:getDisplayName() end---@deprecated---@paramnamestring ---@returnnil --- Sets the "friendly" name to display of this player. This may include color. Note that this name will not be displayed in game, only in chat and places defined by plugins.functionPlayer:setDisplayName(name) end---@paramname?Component ---@returnnil --- Sets the name that is shown on the in-game player list. If the value is null, the name will be identical to #getName().functionPlayer:playerListName(name) end