sendStartQRCode()
sendStartQRCode
Method in MelodyManager
Class
sendStartQRCode
Method in MelodyManager
ClassMethod Signature
Parameters
Parameter
Type
Description
player
Player
The player to whom the QR code will be sent.
slot
int
The inventory slot where the QR code will be placed.
offhand
boolean
If true
, the QR code will be placed in the player's offhand. If false
, it will be placed in the specified inventory slot.
Example Usage
Here is an example of how to use the sendStartQRCode
method in another plugin:
In this example, the sendQRCodeToPlayer
method in the ExamplePlugin
class retrieves a player by their name, sends a QR code to the first slot of their inventory using the sendStartQRCode
method, and logs a message to the console. If the player is not found, a warning is logged to the console.
Last updated