Lytra Accessory is a Pocketmine MP Plugin that will add an accessory features like an RPG game to your server
LytraAccessory is a Pocketmine MP Plugin that will add an accessory features on your server
To register your accessory, you need to make a new yaml file on the plugin_data folder For example the file name is "coolaccessory.yml" Then inside the file, you need to insert a few things:
id: "coolaccessory"
item-id: "stick"
custom-name: "Cool Accessory"
lore: ["Cool Accessory", "Very Cool"]
damage-multiplier: 100%
damage-multiplier: 1
hp-multiplier: 100%
hp-multiplier: 1
After that, you need to go to config.yml
file, then add your file name to the loaded-accessory
loaded-accessory: ["coolaccessory.yml"]
Command | Description | Usage |
---|---|---|
/la | View your accessory inventory | /la |
/la get | Get an accessory | /la get [string:id] [int:amount] |
/la give | Give an accessory to another player | /la give [string:player] [string:id] [int:amount] |
/la info | Get an information about a spesific accessory | /la info [string:id] |
/la remove | Remove an equipped accessory from player | /la remove [string:player] [string:id] |
/la view | View an accessory inventory of another player | /la view [string:player] |
/la slots view | Display information about total slots and empty slots of player | /la slots view [string:player] |
/la slots add | Add a spesific amount of slots on accessory inventory | /la slots add [string:player] [int:amount] |
/la slots remove | Remove a spesific amount of slots on accessory inventory | /la slots remove [string:player] [int:amount] |
/la slots set | Set a spesific amount of slots on accessory inventory | /la slots set [string:player] [int:amount] |
You can use lytraaccessory.command.admin
permission to give players all the lytra accessory commands permissions
Command | Permissions | Default |
---|---|---|
/la | lytraaccessory.command.use | True |
/la get | lytraaccessory.command.admin.get | OP |
/la give | lytraaccessory.command.admin.give | OP |
/la info | lytraaccessory.command.admin.info | OP |
/la remove | lytraaccessory.command.admin.remove | OP |
/la view | lytraaccessory.command.admin.view | OP |
/la slots view | lytraaccessory.command.admin.slots.view | OP |
/la slots add | lytraaccessory.command.admin.slots.add | OP |
/la slots remove | lytraaccessory.command.admin.slots.remove | OP |
/la slots set | lytraaccessory.command.admin.slots.set | OP |
Importing the LytraAccessory main file
use FresherGAMING\LytraAccessory\LytraAccessory;
If you want to get the registered accessory
$id = //your accessory id
$amount = //the amount of the accessory do you want to get
LytraAccessory::getInstance()->getAccessory($id, $amount);
If you want to give an accessory to a player
$player = //needs to be a player type not a string
$id = //your accessory id
$amount = //the amount of the accessory do you want to give to the player
LytraAccessory::getInstance()->giveAccessory($player, $id, $amount);
If you want to add an accessory to a player (simply make the player used an accessory)
$player = //needs to be a player type not a string
$id = //your accessory id
LytraAccessory::getInstance()->addAccessory($player, $id);
If you want to remove an accessory from a player (simply make the player take of an accessory)
$player = //needs to be a player type not a string
$id = //your accessory id
LytraAccessory::getInstance()->removeAccessory($player, $id);
If you want to get the number of players accessory slots
$player = //needs to be a player type not a string
LytraAccessory::getInstance()->getSlots($player);
If you want to get the number of players empty accessory slots
$player = //needs to be a player type not a string
LytraAccessory::getInstance()->getAvailableSlots($player);
If you want to set the number of players accessory slots
$player = //needs to be a player type not a string
LytraAccessory::getInstance()->setSlots($player);
Version: 1.0.0
Downloads: 236
Updated: 11/22/2023
Supported API versions: 5.0.0 to 5.27.1
Categories: Mechanics
License: GPL-3.0