Code (YAML):
# This plugin MUST use mysql as it requires cross-server database
mysql:
connector
:
"jdbc:mysql://127.0.0.1:3306/profilesplugin?user=testuser&password=testpass&autoReconnect=true"
options
:
# the max profile slot limit applies to all groups, including admins/op. There is a hard limit of 15. You can configure different limits for different roles
defaultProfileSlots
: 5
# You can use any permission here. it doesn't have to be anything specific to ProfilesPlugin.
# For each user, we need to know how many profiles slots the user has. We will check all of these permissions, and limit
# that user to the number of slots. If a user has multiple of these permissions, we will use the greatest number of
# slots out of the permissions that match
profileSlotsByPermission
:
# go into your permissions plugin, and run a command like. `/lp group vip permission set role.vip true`
role.vip
: 7
role.vipplus
: 8
role.mvp
: 9
role.mvpplus
: 10
# hooks are commands that are executed as console when a certain event occurs. These commands support placeholder API,
# and ProfilesPaperGui defines some custom expansion tags:
# - %playerprofiles_genuineuuid% - this is the user's mojang uuid. This profile is "special" and cannot be deleted. This
# is sometimes called the "genuine" profile or "mojang" profile
# - %playerprofiles_profileuuid% - this is a newly created uuid that serves as the profile. If the user is on their genuine
# profile, then this will evaluate to the same thing as the genuineuuid expansion -- their
# mojang uuid.
# - %playerprofiles_deleteduuid% - this only works during the onDeletedProfile hook
hooks
:
# onCreateProfile runs after a user creates a new profile, and they've reconnected to the server with that profile
# active. Use this hook for first-time profile setup
onCreateProfile
:
-
"say User %player_name% has created a new profile: %playerprofiles_profileuuid%"
-
"lp user %playerprofiles_genuineuuid% clone %playerprofiles_profileuuid%"
# on switch profile runs after a user switches to a profile (runs after the onCreateProfile hook for new profiles).
# the primary use of this hook is to copy permissions/groups from the main profile to the new one. Do not copy permissions
# in the create hook because if you change the permissions on the genuine profile, those changes won't be replicated to
# pre-existing profiles (unless your permissions plugin supports players inheriting from other players. Luckperms does not)
# onSwitchProfile does *NOT* run when the user switches to the genuine/mojang profile.
onSwitchProfile
:
-
"say User %player_name% has switched to profile %playerprofiles_profileuuid%. Their real UUID: %playerprofiles_genuineuuid%"
-
"lp user %playerprofiles_genuineuuid% clone %playerprofiles_profileuuid%"
# onDeleteProfile runs when the user deletes a profile. The user cannot delete a profile when they have that profile
# selected, so the deleteduuid and profileuuid are guaranteed to be different.
onDeleteProfile
:
-
"say User %player_name% deleted their profile with the uuid %playerprofiles_deleteduuid%"
-
"lp user %playerprofiles_deleteduuid% clear"
# these strings are configurable and all of them support placeholder api
# Materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
gui:
profileSelectorMain:
slots
:
-
"0,0,0,0,0,0,0,X,0"
-
"0,1,1,1,1,1,0,X,S"
-
"0,1,1,1,1,1,0,X,0"
-
"0,1,1,1,1,1,0,X,D"
-
"0,0,0,0,0,0,0,X,0"
legend:
0
: NOTHING
X
: DIVIDER
1
: CHAR_SLOT
S
: SELECT_PROFILE
D
: DELETE_PROFILE
text:
windowTitle
:
"Profile Manager"
slotEmpty:
title
:
"&cEmpty Profile Slot"
body
:
"&7Click to create"
material
: OAK_BUTTON
slotActive:
title
:
"&6%mmocore_class% &7| &7Level: &e%mmocore_level%"
body
: |-
&fHealth
:
&7%mmocore_max_health%
&fMana
:
&7%mmocore_mana%
&fUUID
:
&7%player_uuid%
&8Current character
material
: GRASS_BLOCK
slotCreated:
title
:
"&6%mmocore_class% &7| &7Level: &e%mmocore_level%"
body
: |-
&fHealth
:
&7%mmocore_max_health%
&fMana
:
&7%mmocore_mana%
&fUUID
:
&7%player_uuid%
material
: ARMOR_STAND
slotBlocked:
title
:
"&fUpgrade to unlock this slot"
body
:
"&7Buy a rank from our website for more character slots! &3WebsiteURL"
material
: BARRIER
slotBlockedFromDeletion:
title
:
"&4This profile cannot be deleted"
body
:
"&cThis profile uses your genuine mojang uuid and cannot be deleted for technical reasons."
material
: BARRIER
selectButton:
title
:
"Select mode"
body
:
"When you click on a profile slot in select mode, it will change you to that profile"
activeMaterial
: EMERALD_BLOCK
inactiveMaterial
: OAK_BUTTON
deleteButton:
title
:
"&cDelete mode"
body
:
"&7When you click on a profile slot in delete mode, it will open a confirmation screen to delete that profile"
activeMaterial
: EMERALD_BLOCK
inactiveMaterial
: OAK_BUTTON
profileSelectorDeleteConfirm:
slots
:
-
"0,0,0,0,0,0,0,0,0"
-
"0,0,D,0,0,0,B,0,0"
-
"0,0,0,0,B,0,0,0,0"
legend:
0
: NOTHING
X
: DIVIDER
D
: CONFIRM_DELETE
B
: BACK
text:
windowTitle
:
"&cConfirm Deletion"
confirmDeleteButton:
title
:
"&cDelete this profile"
body
:
"&7Are you sure you wish to delete the profile with uuid: %player_uuid%? This operation CANNOT be reversed. Click to confirm"
material
: EMERALD_BLOCK
backButton:
title
:
"&aBack"
body
:
"&7Do not delete this profile"
material
: BARRIER