forked from SteamWar/SteamWar
Format code
This commit is contained in:
+213
-81
@@ -26,7 +26,9 @@ inventory = {}
|
||||
---@param title string
|
||||
---@param size number
|
||||
---@return Inventory
|
||||
function inventory.create(title, size) return nil end
|
||||
function inventory.create(title, size)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@alias InventoryClick 'LEFT' | 'SHIFT_LEFT' | 'RIGHT' | 'SHIFT_RIGHT' | 'MIDDLE' | 'NUMBER_KEY'
|
||||
|
||||
@@ -44,66 +46,88 @@ local Inventory = {}
|
||||
---@param enchanted boolean
|
||||
---@param amount number
|
||||
---@return void
|
||||
function Inventory.item(slot, material, name, handler, lore, enchanted, amount) end
|
||||
function Inventory.item(slot, material, name, handler, lore, enchanted, amount)
|
||||
end
|
||||
|
||||
---@param handler fun(): void
|
||||
---@return void
|
||||
function Inventory.setCloseHandler(handler) end
|
||||
function Inventory.setCloseHandler(handler)
|
||||
end
|
||||
|
||||
---@return void
|
||||
function Inventory.open() end
|
||||
function Inventory.open()
|
||||
end
|
||||
|
||||
player = {}
|
||||
|
||||
---@return string
|
||||
---Get the name of the player.
|
||||
function player.name() return "" end
|
||||
function player.name()
|
||||
return ""
|
||||
end
|
||||
|
||||
---@return void
|
||||
function player.chat(...) end
|
||||
function player.chat(...)
|
||||
end
|
||||
|
||||
---@return void
|
||||
---Send a message to the actionbar of the player.
|
||||
function player.actionbar(...) end
|
||||
function player.actionbar(...)
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@param newX number
|
||||
function player.x(newX) end
|
||||
function player.x(newX)
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@param newY number
|
||||
function player.y(newY) end
|
||||
function player.y(newY)
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@param newZ number
|
||||
function player.z(newZ) end
|
||||
function player.z(newZ)
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@param newYaw number
|
||||
function player.yaw(newYaw) end
|
||||
function player.yaw(newYaw)
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@param newPitch number
|
||||
function player.pitch(newPitch) end
|
||||
function player.pitch(newPitch)
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function player.sneaking() return nil end
|
||||
function player.sneaking()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function player.sprinting() return nil end
|
||||
function player.sprinting()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@param newSlot number
|
||||
function player.slot(newSlot) end
|
||||
function player.slot(newSlot)
|
||||
end
|
||||
|
||||
---@return string
|
||||
function player.item() return nil end
|
||||
function player.item()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return string
|
||||
function player.offHandItem() return nil end
|
||||
function player.offHandItem()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return void
|
||||
function player.closeInventory() end
|
||||
function player.closeInventory()
|
||||
end
|
||||
|
||||
---@field nextBool fun(): boolean
|
||||
random = {}
|
||||
@@ -113,17 +137,23 @@ random = {}
|
||||
---@param origin number
|
||||
---@param bound number
|
||||
---@return number
|
||||
function random.nextInt(origin, bound) return nil end
|
||||
function random.nextInt(origin, bound)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@overload fun(): number
|
||||
---@overload fun(bound: number): number
|
||||
---@param origin number
|
||||
---@param bound number
|
||||
---@return number
|
||||
function random.nextDouble(origin, bound) return nil end
|
||||
function random.nextDouble(origin, bound)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function random.nextBool() return nil end
|
||||
function random.nextBool()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@alias RegionType 'wg' | 'mwg' | 'as' | 'ws' | 'ws_inner' | 'ws_rumpf' | 'ws_rahmen' | 'spawn'
|
||||
|
||||
@@ -136,52 +166,84 @@ local iregion = {}
|
||||
region = {}
|
||||
|
||||
---@return string
|
||||
function iregion.name() return nil end
|
||||
function iregion.name()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return RegionType
|
||||
function iregion.type() return nil end
|
||||
function iregion.type()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function iregion.fire() return nil end
|
||||
function iregion.fire()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function iregion.freeze() return nil end
|
||||
function iregion.freeze()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function iregion.protect() return nil end
|
||||
function iregion.protect()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return string
|
||||
function iregion.loader() return nil end
|
||||
function iregion.loader()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.copyPoint() return nil end
|
||||
function iregion.copyPoint()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.minPointBuild() return nil end
|
||||
function iregion.minPointBuild()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.maxPointBuild() return nil end
|
||||
function iregion.maxPointBuild()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.minPointBuildExtension() return nil end
|
||||
function iregion.minPointBuildExtension()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.maxPointBuildExtension() return nil end
|
||||
function iregion.maxPointBuildExtension()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.testblockPoint() return nil end
|
||||
function iregion.testblockPoint()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.minPointTestblock() return nil end
|
||||
function iregion.minPointTestblock()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.maxPointTestblock() return nil end
|
||||
function iregion.maxPointTestblock()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.minPointTestblockExtension() return nil end
|
||||
function iregion.minPointTestblockExtension()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return Position
|
||||
function iregion.maxPointTestblockExtension() return nil end
|
||||
function iregion.maxPointTestblockExtension()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@alias TNTMode 'ALLOW' | 'DENY' | 'ONLY_TB'
|
||||
|
||||
@@ -189,23 +251,35 @@ function iregion.maxPointTestblockExtension() return nil end
|
||||
local tnt = {}
|
||||
|
||||
---@return TNTMode
|
||||
function tnt.mode() return nil end
|
||||
function tnt.mode()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function tnt.enabled() return nil end
|
||||
function tnt.enabled()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function tnt.onlyTb() return nil end
|
||||
function tnt.onlyTb()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function tnt.onlyBuild() return nil end
|
||||
function tnt.onlyBuild()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param name string
|
||||
---@return iregion
|
||||
function region.get(name) return nil end
|
||||
function region.get(name)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return iregion[]
|
||||
function region.list() return nil end
|
||||
function region.list()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@class tracerLib
|
||||
tracer = {}
|
||||
@@ -224,7 +298,9 @@ tracer = {}
|
||||
---@field getId fun(): string
|
||||
---@field getRecords fun(): {[number]: {[number]: TraceRecord}}
|
||||
|
||||
function tracer.getTraces() return nil end
|
||||
function tracer.getTraces()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@class Position
|
||||
---@field x number
|
||||
@@ -236,43 +312,65 @@ function tracer.getTraces() return nil end
|
||||
server = {}
|
||||
|
||||
---@return string
|
||||
function server.time() return nil end
|
||||
function server.time()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function server.ticks() return nil end
|
||||
function server.ticks()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param position Position
|
||||
---@return string
|
||||
function getBlockAt(position) return nil end
|
||||
function getBlockAt(position)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param position Position
|
||||
---@param material string
|
||||
---@return void
|
||||
function setBlockAt(position, material) return nil end
|
||||
function setBlockAt(position, material)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@class tps
|
||||
local tps = {}
|
||||
|
||||
---@return number
|
||||
function tps.oneSecond() return nil end
|
||||
function tps.oneSecond()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function tps.tenSecond() return nil end
|
||||
function tps.tenSecond()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function tps.oneMinute() return nil end
|
||||
function tps.oneMinute()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function tps.fiveMinute() return nil end
|
||||
function tps.fiveMinute()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function tps.tenMinute() return nil end
|
||||
function tps.tenMinute()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function tps.current() return nil end
|
||||
function tps.current()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return number
|
||||
function tps.limit() return nil end
|
||||
function tps.limit()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@class storage
|
||||
---@field global storageLib
|
||||
@@ -286,24 +384,32 @@ local storageLib = {}
|
||||
|
||||
---@param key string
|
||||
---@return any
|
||||
function storageLib.get(key) return nil end
|
||||
function storageLib.get(key)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param key string
|
||||
---@param value any
|
||||
---@return void
|
||||
function storageLib.set(key, value) end
|
||||
function storageLib.set(key, value)
|
||||
end
|
||||
|
||||
---@param key string
|
||||
---@return boolean
|
||||
function storageLib.has(key) return nil end
|
||||
function storageLib.has(key)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param key string
|
||||
---@return void
|
||||
function storageLib.remove(key) end
|
||||
function storageLib.remove(key)
|
||||
end
|
||||
|
||||
---@param key string
|
||||
---@return Accessor
|
||||
function storageLib.accessor(key) return nil end
|
||||
function storageLib.accessor(key)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@class Accessor
|
||||
---@overload fun(): any
|
||||
@@ -318,35 +424,46 @@ _worldedit = {}
|
||||
|
||||
---@overload fun(pos: Position[]): void
|
||||
---@return Selection
|
||||
function _worldedit.selection() return nil end
|
||||
function _worldedit.selection()
|
||||
return nil
|
||||
end
|
||||
|
||||
---@param msg string
|
||||
---@param callback fun(value: string): void
|
||||
---@return void
|
||||
function input(msg, callback) end
|
||||
function input(msg, callback)
|
||||
end
|
||||
|
||||
---@param ticks number
|
||||
---@param callback fun(): void
|
||||
---@return void
|
||||
function delayed(ticks, callback) end
|
||||
function delayed(ticks, callback)
|
||||
end
|
||||
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param z number
|
||||
---@return Position
|
||||
function pos(x, y, z) return nil end
|
||||
function pos(x, y, z)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return void
|
||||
function exec(...) end
|
||||
function exec(...)
|
||||
end
|
||||
|
||||
---@param obj any
|
||||
---@return number
|
||||
function length(obj) return 0 end
|
||||
function length(obj)
|
||||
return 0
|
||||
end
|
||||
|
||||
---@param separator string
|
||||
---@param table any[]
|
||||
---@return string
|
||||
function join(separator, table) return "" end
|
||||
function join(separator, table)
|
||||
return ""
|
||||
end
|
||||
|
||||
---@class EventType
|
||||
---@class events
|
||||
@@ -364,21 +481,23 @@ function join(separator, table) return "" end
|
||||
---@field EntityDeath EventType
|
||||
events = {}
|
||||
|
||||
|
||||
---@param id EventType
|
||||
---@param handler fun(params: any): void
|
||||
---@return void
|
||||
function event(id, handler) end
|
||||
function event(id, handler)
|
||||
end
|
||||
|
||||
---@param command string
|
||||
---@param handler fun(params: string[]): void
|
||||
---@return void
|
||||
function command(command, handler) end
|
||||
function command(command, handler)
|
||||
end
|
||||
|
||||
---@param trigger string
|
||||
---@param handler fun(pressed: boolean): void
|
||||
---@return void
|
||||
function hotkey(trigger, handler) end
|
||||
function hotkey(trigger, handler)
|
||||
end
|
||||
|
||||
---@class bossbar
|
||||
bossbar = {}
|
||||
@@ -394,39 +513,52 @@ local BossBar = {}
|
||||
---@param color BossBarColor
|
||||
---@param style BossBarStyle
|
||||
---@return BossBar
|
||||
function bossbar.create(title, color, style) return nil end
|
||||
function bossbar.create(title, color, style)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return string
|
||||
---@overload fun(title: string): void
|
||||
function BossBar.title() end
|
||||
function BossBar.title()
|
||||
end
|
||||
|
||||
---@return BossBarColor
|
||||
---@overload fun(color: BossBarColor): void
|
||||
function BossBar.color() end
|
||||
function BossBar.color()
|
||||
end
|
||||
|
||||
---@return BossBarStyle
|
||||
---@overload fun(style: BossBarStyle): void
|
||||
function BossBar.style() end
|
||||
function BossBar.style()
|
||||
end
|
||||
|
||||
---@return number
|
||||
---@overload fun(progress: number): void
|
||||
function BossBar.progress() end
|
||||
function BossBar.progress()
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
---@overload fun(visible: boolean): void
|
||||
function BossBar.visible() end
|
||||
function BossBar.visible()
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
---@param flag BossBarFlag
|
||||
function BossBar.hasFlag(flag) return nil end
|
||||
function BossBar.hasFlag(flag)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return void
|
||||
---@param flag BossBarFlag
|
||||
function BossBar.addFlag(flag) end
|
||||
function BossBar.addFlag(flag)
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
---@param flag BossBarFlag
|
||||
function BossBar.removeFlag(flag) return nil end
|
||||
function BossBar.removeFlag(flag)
|
||||
return nil
|
||||
end
|
||||
|
||||
---@return void
|
||||
function BossBar.destroy() end
|
||||
function BossBar.destroy()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user