Skip to content

Commit c3939e8

Browse files
Update Lua definitions
1 parent 16a3db9 commit c3939e8

File tree

4 files changed

+22
-5
lines changed

4 files changed

+22
-5
lines changed

library/paper/org.bukkit.inventory.CartographyInventory.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ local CartographyInventory = {}
66

77
---@public
88
---@return org.bukkit.inventory.ItemStack the result item
9-
--- Check what item is in the result slot of this smithing table.
9+
--- Check what item is in the result slot of this cartography table.
1010
function CartographyInventory:getResult() end
1111

1212
---@param newResult org.bukkit.inventory.ItemStack the new result item
1313
---@public
1414
---@return nil
15-
--- Set the item in the result slot of the smithing table
15+
--- Set the item in the result slot of the cartography table
1616
function CartographyInventory:setResult(newResult) end
1717

library/paper/org.bukkit.plugin.messaging.Messenger.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ function Messenger:isIncomingChannelRegistered(plugin, channel) end
122122
--- Checks if the specified plugin has registered to send outgoing messages through the requested channel.
123123
function Messenger:isOutgoingChannelRegistered(plugin, channel) end
124124

125+
---@deprecated
125126
---@param source org.bukkit.entity.Player Source of the message.
126127
---@param channel string Channel that the message was sent by.
127128
---@param message table<number> Raw payload of the message.
@@ -130,3 +131,11 @@ function Messenger:isOutgoingChannelRegistered(plugin, channel) end
130131
--- Dispatches the specified incoming message to any registered listeners.
131132
function Messenger:dispatchIncomingMessage(source, channel, message) end
132133

134+
---@param source io.papermc.paper.connection.PlayerConnection Source of the message.
135+
---@param channel string Channel that the message was sent by.
136+
---@param message table<number> Raw payload of the message.
137+
---@public
138+
---@return nil
139+
--- Dispatches the specified incoming message to any registered listeners. By default, also calls {@link PluginMessageListener#onPluginMessageReceived(String, Player, byte[])}.
140+
function Messenger:dispatchIncomingMessage(source, channel, message) end
141+

library/paper/org.bukkit.plugin.messaging.PluginMessageListener.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ local PluginMessageListener = {}
99
---@param message table<number> The raw message that was sent.
1010
---@public
1111
---@return nil
12-
--- A method that will be thrown when a PluginMessageSource sends a plugin message on a registered channel.
12+
--- A method that will be thrown when a PluginMessageSource sends a plugin message on a registered channel. <p> Only called for joined players.
1313
function PluginMessageListener:onPluginMessageReceived(channel, player, message) end
1414

1515
---@param channel string Channel that the message was sent through.
16-
---@param connection io.papermc.paper.connection.PlayerCommonConnection Source of the message.
16+
---@param connection io.papermc.paper.connection.PlayerConnection Source of the message.
1717
---@param message table<number> The raw message that was sent.
1818
---@public
1919
---@return nil
20-
--- A method that will be invoked when a PluginMessageSource sends a plugin message on a registered channel.
20+
--- A method that will be invoked when a PluginMessageSource sends a plugin message on a registered channel. <p> Called for both joined players and players in the configuration stage.
2121
function PluginMessageListener:onPluginMessageReceived(channel, connection, message) end
2222

library/paper/org.bukkit.plugin.messaging.StandardMessenger.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,21 @@ function StandardMessenger:isIncomingChannelRegistered(plugin, channel) end
140140
---@return boolean
141141
function StandardMessenger:isOutgoingChannelRegistered(plugin, channel) end
142142

143+
---@deprecated
143144
---@param source org.bukkit.entity.Player
144145
---@param channel string
145146
---@param message table<number>
146147
---@public
147148
---@return nil
148149
function StandardMessenger:dispatchIncomingMessage(source, channel, message) end
149150

151+
---@param source io.papermc.paper.connection.PlayerConnection
152+
---@param channel string
153+
---@param message table<number>
154+
---@public
155+
---@return nil
156+
function StandardMessenger:dispatchIncomingMessage(source, channel, message) end
157+
150158
---@deprecated
151159
---@param channel string Channel name to validate.
152160
---@public

0 commit comments

Comments
 (0)