Skip to content

Repository files navigation

🥋 CapesLocker


A configurable PocketMine-MP plugin allows you to add capes to your server !


A capes locker menu !

With this menu, see all capes you can have and chose one of them !

Cape options menu !

This is the menu when you select a cape you have unlocked.
You can equip it or go back to capes menu

Cape options menu !

This is the menu when you select a locked of your locker.
You can't equip it (because you don't unlocked it) but you can go back to capes menu

Manage cape locker of other players !

With this menu, see all capes locker of a player
Some default capes :D

Managing cape options of other players !

This is the menu when you select a cape of a player.
You can lock or unlock it for the player selected or go back to the player capes locker menu

📜 Features

  • Add your own cape
  • An intuitive UI
  • Permissions for capes
  • Add capes to locker without permission
  • An API for more possibilities (like capes shop)

For any problems, you can reach me at "Reach ME" tab !

💻 Commands

CommandAliasesPermissionDefaultDescription
/capescapeslocker.command.capestrueOpen your capes locker menu !
/mcapes <player> [cape id] [lock|unlock]mcapescapeslocker.command.managecapesopManage capes of a player
/playerscapescleanercapeslockers.command.playerscapescleaneropWARNING ! This command remove all undefined capes in 'capes.json' from capes lockers of players.

🤔 How to add your cape ?

Firstly, cape must be a PNG file of 64x32 pixels. Capes file is the property of a vanilla minecraft bedrock cape.

Put the file in the plugin folder located in plugins_data

After that, go to the file capes.json and save the desired cape.

"cape_identifier" : {
"name": "My awesome cape",
"description": "This cape is part of a tutorial for the CapesLocker plugin!",
"cape": "file_name",
"default": true
}

name => Cape name show in menu
description => Cape description show in menu
cape => Name of the cape file (without extension .png)
default => Define if this cape is owned by all players



Colors Meaning

This is a template, you do not have to use it.

Red Front
Yellow Back
Cyan Left side
Green Right side
Blue Top side
Pink Bottom side

🧐 How unlock capes ?

Capes can be locked and unlocked by 3 ways :

Permissions : Using permissions, you can lock or unlock capes. Permissions are like this : capeslocker.cape.cape_identifier "cape_identifier" is define in "capes.json"

In-game Menu : Players who have capeslocker.command.managecape permission or OP players, can lock or unlock cape of other players.

Plugins : CapesLocker has an API for developers. You can see it in detail in the "For developers" tab !

💾 Config

---
## __ __ ___ ____ _ _____ _ _# \ \ / / |__ \ / __ \ (_)/ ____| | (_)# \ \ / /__ _ __ _ __ ___ ) | | | |_ _ _| (___ | | ___# \ \/ / _ \ '__| '__/ _ \ / /| | | | | | | |\___ \| |/ / |# \ / __/ | | | | __// /_| |__| | |_| | |____) | <| |# \/ \___|_| |_| \___|____|\____/ \__,_|_|_____/|_|\_\_|## Do you have a problem ?## Discord (en) : https://discord.gg/P8R4WhARrY# Discord (fr) : https://discord.gg/DnmRbAxMbN# Time in secondscape_cooldown: 10# {cooldown} Amout of time you must wait before set a new capecooldown_message: "§cYou must wait {cooldown} seconds between every cape changed"# {cape} The cape namecape_equiped_message: "You equiped {cape}"# {cape} The cape namelocked_cape_message: "You must unlock {cape} before use it"menu_title: "Capes list"menu_body: "There is some capes you can unlock and use !"
...

💻 For developers

This plugin allow you to interact with locker. Here is some function you can use in your code.

You can get the plugin with CapesLocker::getInstance()

If you want more detail, you can check the main file of this plugin

❓ You have some question or issues, you can come on my for help !

Get capes

/** * Return all capes * @return array */

getCapes()

Get default capes

/** * Return all default capes * @return array */

getDefaultCapes()

Get cape

/** * Return cape info * @param string $cape_id * @return NULL|array */

getCapeById(string $cape_id)

Get player capes

/** * Return unlocked player's capes (default capes isn't include) * @param Player $player Player to get his capes * @return array */

getPlayerCapes($player)

Get wearing player cape

/** * Return cape player wearing * @param Player $player * @return null|string */

getWearingCapeId($player)

Get wearing cape config

/** * Return all wearing capes * @return Config */

getWearingCapes()

Get player permitted capes

/** * Return permitted player's capes (default capes isn't include) * @param Player $player Player to get his capes * @return array */

getPlayerPermittedCapes($player)

Get all players capes

/** * Get alls players capes (default capes and permitted capes isn't include) * @return array */

getPlayersCapes()

Unlock a player cape

/** * Unlock a cape for a specific player * @param Player $player Player to unlock a cape * @param string $cape_id The ID of the cape to unlock * @return void */

unlockCape( $player, $cape_id )

Lock a player cape

/** * lock a cape for a specific player * @param Player $player Player to lock a cape * @param string $cape_id The ID of the cape to lock * @return void */

lockCape( $player, $cape_id)

Set player cape by ID

/** * Unlock a cape for a specific player * @param Player $player Player to equip the cape with * @param string $cape_id The ID of the cape to be equipped * @return void */

setPlayerCape( $player, $cape_id = null )

Test if player have a cape

/** * Check if a player have a specific cape * @param Player $player Player to check their capes * @param string $cape_id The ID of the cape to check * @return bool */

hasCape( $player, $cape_id )

📫 Reach me

About

Add your own capes to the server !

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages