Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # LuxPerms by Farwl
- # # #
- Options:
- ver: 0.1.0
- np: &cYou're not allowed to use this command!
- # CONFIG
- # CONFIG
- # CODE #
- # Functions
- function openGUI(id: string, p: player):
- {_id} = "users":
- create a gui with virtual chest with 6 rows named "&8Overview > Users":
- make gui slot 46 with compass named "&b&lManage Specific User" with lore "&7Click to view user":
- set {manageUser::%{_p}%} to true
- click({_p})
- close {_p}'s inventory
- send title "&b&lManage User" with subtitle "&7Type username in chat" to {_p} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_p}
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_p})
- make {_p} execute command "luxperms"
- loop all players:
- {_n} = 44:
- exit loop
- else:
- add 1 to {_n}
- set {_p1} to ("%loop-value%" parsed as offline player)
- {_p1} is op:
- {_p1}'s prefix = "":
- make next gui slot with skull of ({_p1}) named "&6&l%{_p1}%" with lore "&7Click to view", "&cUser is an operator", "", "&7Group: &e%{_p1}'s group%", and "&7Prefix: &cNone":
- click({_p})
- manageUser({_p}, {_p1})
- else:
- make next gui slot with skull of ({_p1}) named "&6&l%{_p1}%" with lore "&7Click to view", "&cUser is an operator", "", "&7Group: &e%{_p1}'s group%", and "&7Custom Prefix: %{_p1}'s prefix%":
- click({_p})
- manageUser({_p}, {_p1})
- else:
- {_p1}'s prefix = "":
- make next gui slot with skull of ({_p1}) named "&6&l%{_p1}%" with lore "&7Click to view", "", "", "&7Group: &e%{_p1}'s group%", and "&7Prefix: &cNone":
- click({_p})
- manageUser({_p}, {_p1})
- else:
- make next gui slot with skull of ({_p1}) named "&6&l%{_p1}%" with lore "&7Click to view", "", "", "&7Group: &e%{_p1}'s group%", and "&7Custom Prefix: %{_p1}'s prefix%":
- click({_p})
- manageUser({_p}, {_p1})
- open last gui to {_p}
- else if {_id} = "groups":
- create a gui with virtual chest with 6 rows named "&8Overview > Groups":
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_p})
- make {_p} execute command "luxperms"
- make gui slot 46 with compass named "&b&lSpecific Group" with lore "&7Click to view and edit specific group":
- click({_p})
- close {_p}'s inventory
- set {managingGroup::%{_p}%} to true
- send title "&b&lManage Group" with subtitle "&7Type group in chat" to {_p} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_p}
- make gui slot 52 with anvil named "&b&lAdd Group" with lore "&7Click to add group":
- click({_p})
- close {_p}'s inventory
- set {addingGroup::%player%} to true
- send title "&b&lAdd Group" with subtitle "&7Type name in chat" to {_p} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_p}
- set {_g::*} to all groups
- loop {_g::*}:
- set {_g} to loop-value
- {_n} = 44:
- make gui slot 48 with tnt named "&c&lError" with lore "&7Too many groups to list in gui"
- exit loop
- else:
- add 1 to {_n}
- clear {_gp::*}
- set {_gp::*} to all permissions of group "%{_g}%"
- set {_gps} to size of {_gp::*}
- group "%{_g}%"'s perm prefix = " " or "":
- set {_gp} to "&cNone"
- group "%{_g}%"'s perm prefix is not set:
- set {_gp} to "&cNone"
- make next gui slot with yellow glass pane named "&6&l%{_g}%" with lore "&7Click to view and edit group", "", "&7Rank: &e%loop-index%", "&7Prefix: %{_gp}%", "", and "&e%{_gps}% &7Permission Nodes":
- click({_p})
- manageGroup("%{_g}%", player)
- open last gui to {_p}
- else if {_id} = "expand":
- create a gui with virtual chest with 6 rows named "&8LuxPerms {@ver}":
- make gui slot 11 with skull of ("%{_p}%" parsed as offline player) named "&6&lUsers" with lore "&7Click to view all &aUsers":
- click({_p})
- openGUI("users", {_p})
- make gui slot 15 with bookshelf named "&6&lGroups" with lore "&7Click to view all &aGroups":
- click({_p})
- openGUI("groups", {_p})
- make gui slot 28 with redstone torch named "&c&lReload" with lore "&7Click to reload LuxPerms":
- click({_p})
- execute console command "/sk reload %script%"
- close {_p}'s inventory
- send title "&b&lReloaded" with subtitle "&7LuxPerms {@ver} reloaded" to {_p} for 2 seconds
- make gui slot 34 with red glass pane named "&b&lVersion" with lore "&7You're using &bLuxPerms {@ver}"
- make gui slot 49 with tripwire hook named "&b&lReduce" with lore "&7Click to show less", "", and "&7This will hide advanced options":
- click({_p})
- make {_p} execute command "luxperms"
- open last gui to {_p}
- function manageUser(u: player, p: offline player):
- set {_playerPrefix} to {_p}'s prefix
- {_playerPrefix} = "":
- set {_playerPrefix} to "&cNone"
- set {_playerSuffix} to {_p}'s suffix
- {_playerSuffix} = "":
- set {_playerSuffix} to "&cNone"
- set {_perms::*} to all permissions of {_p}
- set {_sp} to size of {_perms::*}
- set {_g} to {_p}'s group
- set {_groupPerms::*} to all permissions of group {_g}
- set {_sg} to size of {_groupPerms::*}
- create a gui with virtual chest with 6 rows named "&8Users > %{_p}%":
- {_p} is op:
- make gui slot 14 with red glass pane named "&b&lDe-OP User" with lore "&7Click to remove &coperator", "", and "&7User is currently an &coperator":
- deop {_p}
- click({_u})
- manageUser({_u}, {_p})
- else:
- make gui slot 14 with lime glass pane named "&b&lOP User" with lore "&7Click to make user an &coperator", "", and "&7User is currently &cnot &7a &coperator":
- op {_p}
- click({_u})
- manageUser({_u}, {_p})
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_u})
- openGUI("users", {_u})
- make gui slot 12 with book and quill named "&b&lPermissions" with lore "&7Click to view permissions":
- click({_u})
- editPerms({_p}, {_u})
- make gui slot 28 with book named "&b&lGroup" with lore "&7Click to change Group", "", and "&7Group: &e%{_p}'s group%":
- changeGroup({_p}, {_u})
- click({_u})
- make gui slot 31 with skull of ({_p}) named "&b&l%{_p}%" with lore "&7Group: &e%{_p}'s group%", "", "&7Current Prefix: %{_playerPrefix}%", "&7Current Suffix: %{_playerSuffix}%", "", "&7Player Permissions: &e%{_sp}%", and "&7Group Permissions: &e%{_sg}%"
- make gui slot 34 with name tag named "&b&lPrefix and Suffix" with lore "&7Click to edit prefix/suffix", "", "&7Prefix: %{_playerPrefix}%", and "&7Suffix: %{_playerSuffix}%":
- click({_u})
- close {_u}'s inventory
- set {prefixORsuffix::%{_u}%} to true
- send title "&b&lPrefix or Suffix" with subtitle "&7Type 'prefix' or 'suffix' in chat" to {_u} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_u}
- set {effectingUser::%{_u}%} to {_p}
- open last gui to {_u}
- function manageGroup(g: string, u: player):
- create a gui with virtual chest with 6 rows named "&8Groups > %{_g}%":
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_u})
- openGUI("groups", {_u})
- make gui slot 13 with book and quill named "&b&lView Permissions" with lore "&bClick &7to open &ePermissions Editor":
- click({_u})
- editGroupPerms("%{_g}%", {_u})
- make gui slot 34 with nametag named "&b&lChange Prefix/Suffix" with lore "&7Click to change prefix/suffix":
- click({_u})
- close {_u}'s inventory
- set {group_prefixORsuffix::%{_u}%} to true
- set {effectingGroup::%{_u}%} to {_g}
- send title "&b&lPrefix or Suffix" with subtitle "&7Type 'prefix' or 'suffix' in chat" to {_u} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel" to {_u}
- loop all players:
- set {_pg} to loop-player's group
- {_pg} = {_g}:
- add 1 to {_gm}
- set {_gp} to group {_g}'s perm prefix
- set {_gs} to group {_g}'s perm suffix
- {_gp} = "" or " ":
- set {_gp} to "&cNone"
- {_gp} is not set:
- set {_gp} to "&cNone"
- {_gs} = "" or " ":
- set {_gs} to "&cNone"
- {_gs} is not set:
- set {_gs} to "&cNone"
- {_gm} is not set:
- set {_gm} to 0
- set {_gp::*} to all permissions of group {_g}
- set {_gps} to size of {_gp::*}
- make gui slot 31 with book named "&b&l%{_g}%" with lore "&7Click to rename group", "", "&7Members: &a%{_gm}%", "", "&7Prefix: %{_gp}%", "&7Suffix: %{_gs}%", "", and "&7Permissions: &a%{_gps}%":
- click({_u})
- close {_u}'s inventory
- set {effectingGroup::%{_u}%} to {_g}
- set {renamingGroup::%{_u}%} to true
- send title "&b&lRename Group" with subtitle "&7Type new name in chat" to {_u} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_u}
- make gui slot 28 with redstone ore named "&c&lDelete Group" with lore "&7Click to delete group", "", and "&cThis cannot be undone!":
- {_g} = "default":
- click({_u})
- close {_u}'s inventory
- send title "&c&lError" with subtitle "&7Can't delete default group"
- else:
- click({_u})
- close {_u}'s inventory
- delete group {_g}
- send title "&c&lGroup Deleted" with subtitle "&7Group &b%{_g}% &7deleted" to {_u} for 2 seconds
- open last gui to {_u}
- function editGroupPerms(g: string, u: player):
- set {_perms::*} to all permissions of group {_g}
- create a gui with virtual chest with 6 rows named "&8%{_g}% > Perms":
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_u})
- manageGroup({_g}, {_u})
- make gui slot 52 with anvil named "&b&lAdd Perm" with lore "&7Click to add permission":
- click({_u})
- close {_u}'s inventory
- set {group.addGroupPerm::%{_u}%} to {_g}
- set {addGroupPerm::%{_u}%} to true
- send title "&b&lAdd Permission" with subtitle "&7Type permission node in chat" for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_u}
- size of {_perms::*} > 0:
- loop {_perms::*}:
- {_n} = 44:
- make gui slot 48 with tnt named "&c&lError" with lore "&7Too many perms to list in gui."
- exit loop
- else:
- add 1 to {_n}
- set {_perm} to loop-value
- make next gui slot with lime glass pane named "&a&l%{_perm}%" with lore "&7Click to &cremove":
- click({_u})
- remove "%{_perm}%" from all permissions of group {_g}
- editGroupPerms("%{_g}%", {_u})
- else:
- make gui slot 13 with redstone block named "&c&lNo Permissions" with lore "&7This group has no permissions"
- open last gui to {_u}
- function changeGroup(p: offlineplayer, u: player):
- create a gui with virtual chest with 6 rows named "&8%{_p}% > Set Group":
- make gui slot 46 with compass named "&b&lSpecific Group" with lore "&7Click to set group":
- click({_u})
- close {_u}'s inventory
- set {settingGroup::%{_u}%} to true
- send title "&b&lSet group" with subtitle "&7Type group in chat" to {_u} for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_u}
- set {user.settingGroup::%{_u}%} to {_p}
- set {_g} to {_p}'s group
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_u})
- manageUser({_u}, {_p})
- set {_groups::*} to all groups
- loop {_groups::*}:
- set {_gl} to loop-value
- set {_glp} to group {_gl}'s perm prefix
- {_glp} = " " or "":
- set {_glp} to "&cNone"
- {_glp} is not set:
- set {_glp} to "&cNone"
- {_n} = 44:
- make gui slot 52 with tnt named "&c&lError" with lore "&7Couldn't list all groups in gui"
- exit loop
- else:
- add 1 to {_n}
- {_gl} = {_g}:
- make next gui slot with yellow glass pane named "&e&l%{_gl}%" with lore "&cPlayer's current group"
- else:
- set {_groupPerms::*} to all permissions of group {_gl}
- set {_gps} to size of {_groupPerms::*}
- make next gui slot with yellow glass pane named "&e&l%{_gl}%" with lore "&7Click to set group", "", "&7Prefix: %{_glp}%", "", and "&7Permission Nodes: &e%{_gps}%":
- click({_u})
- close {_u}'s inventory
- set {_p}'s group to {_gl}
- send title "&b&lGroup Changed" with subtitle "&7Set &b%{_p}%&7's group to &b%{_gl}%" to {_u} for 2 seconds
- open last gui to {_u}
- function editPerms(p: offlineplayer, u: player):
- set {_perms::*} to all permissions of {_p}
- create a gui with virtual chest with 6 rows named "&8%{_p}% > Perms":
- make gui slot 49 with oak sign named "&b&lBack" with lore "&7Click to go back":
- click({_u})
- manageUser({_u}, {_p})
- make gui slot 52 with anvil named "&b&lAdd Perm" with lore "&7Click to add permission":
- click({_u})
- close {_u}'s inventory
- set {user.addPerm::%{_u}%} to {_p}
- set {addPerm::%{_u}%} to true
- send title "&b&lAdd Permission" with subtitle "&7Type permission node in chat" for 5 seconds
- send action bar "&7Type &ccancel &7to cancel chat prompt" to {_u}
- size of {_perms::*} > 0:
- loop {_perms::*}:
- {_n} = 44:
- make gui slot 48 with tnt named "&c&lError" with lore "&7Too many perms to list in gui."
- exit loop
- else:
- add 1 to {_n}
- set {_perm} to loop-value
- make next gui slot with lime glass pane named "&a&l%{_perm}%" with lore "&7Click to &cremove":
- click({_u})
- remove "%{_perm}%" from permissions of {_p}
- editPerms({_p}, {_u})
- else:
- make gui slot 13 with redstone block named "&c&lNo Permissions" with lore "&7This user has no permissions"
- open last gui to {_u}
- function click(p: player):
- play sound "ui.button.click" with volume 2 with pitch 2 at {_p} for {_p}
- # Events
- chat:
- {addPerm::%player%} = true:
- cancel event
- uncolored message = "cancel":
- clear {addPerm::%player%}
- clear {user.addPerm::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else:
- replace all " " in message with "."
- set {_p} to ("%{user.addPerm::%player%}%" parsed as offline player)
- set {_perm} to uncolored message
- add {_perm} to permissions of {_p}
- clear {addPerm::%player%}
- clear {user.addPerm::%player%}
- send title "&b&lAdded Permission" with subtitle "&7Added perm &b%uncolored message% &7to &b%{_p}%" to player for 2 seconds
- else if {addGroupPerm::%player%} = true:
- cancel event
- uncolored message = "cancel":
- clear {addGroupPerm::%player%}
- clear {group.addGroupPerm::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else:
- replace all " " in message with "."
- set {_g} to {group.addGroupPerm::%player%}
- set {_perm} to uncolored message
- add {_perm} to all permissions of group {_g}
- clear {addGroupPerm::%player%}
- clear {group.addGroupPerm::%player%}
- send title "&b&lAdded Permission" with subtitle "&7Added perm &b%uncolored message% &7to group &b%{_g}%" to player for 2 seconds
- editGroupPerms("%{_g}%", player)
- else if {manageUser::%player%} = true:
- cancel event
- uncolored message = "cancel":
- clear {manageUser::%player%}
- clear {addPerm::%player%}
- clear {user.addPerm::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else:
- set {_u} to (uncolored message parsed as offline player)
- {_u} is online:
- manageUser(player, {_u})
- clear {manageUser::%player%}
- else:
- clear {manageUser::%player%}
- send title "&c&lError" with subtitle "&7User is offline"
- else if {prefixORsuffix::%player%} = true:
- cancel event
- set {_r} to uncolored message
- {_r} = "cancel":
- clear {prefixORsuffix::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else if {_r} = "prefix":
- clear {prefixORsuffix::%player%}
- set {settingPrefix::%player%} to true
- send title "&b&lSet Prefix" with subtitle "&7Type prefix in chat" to player for 5 seconds
- send action bar "&7Type &ccancel &7to cancel or &creset &7to reset prefix" to player
- else if {_r} = "suffix":
- clear {prefixORsuffix::%player%}
- set {settingSuffix::%player%} to true
- send title "&b&lSet Suffix" with subtitle "&7Type suffix in chat" to player for 5 seconds
- send action bar "&7Type &ccancel &7to cancel or &creset &7to reset suffix" to player
- else if {settingPrefix::%player%} = true:
- cancel event
- uncolored message = "cancel":
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- clear {settingPrefix::%player%}
- clear {user.settingPrefix::%player%}
- else if uncolored message = "reset" or "clear":
- set {_u} to {effectingUser::%player%}
- set {_u}'s prefix to ""
- send title "&b&lReset Prefix" with subtitle "&7Reset &b%{_u}%&7's prefix" to player for 2 seconds
- clear {settingPrefix::%player%}
- clear {user.settingPrefix::%player%}
- else:
- set {_u} to {effectingUser::%player%}
- set {_r} to message
- set {_u}'s prefix to {_r}
- send title "&b&lPrefix Set" with subtitle "&7Set &b%{_u}%&7's prefix to ""%{_r}%&7""" to player for 2 seconds
- clear {settingPrefix::%player%}
- clear {user.settingPrefix::%player%}
- else if {settingSuffix::%player%} = true:
- cancel event
- uncolored message = "cancel":
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- clear {settingSuffix::%player%}
- clear {user.settingSuffix::%player%}
- else if uncolored message = "reset" or "clear":
- set {_u} to {effectingUser::%player%}
- set {_u}'s suffix to ""
- send title "&b&lReset Suffix" with subtitle "&7Reset &b%{_u}%&7's suffix" to player for 2 seconds
- clear {settingSuffix::%player%}
- clear {user.settingSuffix::%player%}
- else:
- set {_u} to {effectingUser::%player%}
- set {_r} to message
- set {_u}'s suffix to {_r}
- send title "&b&lSuffix Set" with subtitle "&7Set &b%{_u}%&7's suffix to ""%{_r}%&7""" to player for 2 seconds
- clear {settingSuffix::%player%}
- clear {user.settingSuffix::%player%}
- else if {settingGroup::%player%} = true:
- cancel event
- set {_r} to uncolored message
- {_r} = "cancel":
- clear {settingGroup::%player%}
- clear {user.settingGroup::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else:
- set {_g::*} to all groups
- {_g::*} contains {_r}:
- set {_u} to {user.settingGroup::%player%}
- set {_u}'s group to {_r}
- send title "&b&lGroup set" with subtitle "&7Set &b%{_u}%&7's group to &b%{_r}%" to player for 2 seconds
- clear {settingGroup::%player%}
- clear {user.settingGroup::%player%}
- else:
- clear {settingGroup::%player%}
- clear {user.settingGroup::%player%}
- send title "&c&lInvalid Group" with subtitle "&7That group doesn't exist!" to player for 2 seconds
- else if {managingGroup::%player%} = true:
- cancel event
- set {_r} to uncolored message
- {_r} = "cancel":
- clear {managingGroup::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else:
- set {_g::*} to all groups
- {_g::*} contains {_r}:
- send title "" with subtitle "" to player
- send action bar "" to player
- manageGroup("%{_r}%", player)
- clear {managingGroup::%player%}
- else:
- clear {managingGroup::%player%}
- send title "&c&lError" with subtitle "&7Group doesn't exist" to player
- else if {addingGroup::%player%} = true:
- cancel event
- set {_g} to message
- {_g} = "cancel":
- clear {addingGroup::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled"
- else:
- size of groups 1 of "%{_g}%" matched against "([^A-Za-z0-9_,'\-\+/]{1,})" > 0:
- clear {addingGroup::%player%}
- send title "&c&lError" with subtitle "&7Group names must be alphanumeric" to player for 2 seconds
- else:
- set {_g::*} to all groups
- {_g::*} contains {_g}:
- clear {addingGroup::%player%}
- send title "&c&lError" with subtitle "&7Group already exists" to player for 2 seconds
- else:
- clear {addingGroup::%player%}
- create group "%{_g}%"
- manageGroup({_g}, player)
- else if {group_prefixORsuffix::%player%} = true:
- cancel event
- set {_r} to uncolored message
- {_r} = "cancel":
- clear {group_prefixORsuffix::%player%}
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- else if {_r} = "prefix":
- clear {group_prefixORsuffix::%player%}
- set {group_settingPrefix::%player%} to true
- send title "&b&lSet Prefix" with subtitle "&7Type prefix in chat" to player for 5 seconds
- send action bar "&7Type &ccancel &7to cancel or &creset &7to reset prefix" to player
- else if {_r} = "suffix":
- clear {group_prefixORsuffix::%player%}
- set {group_settingSuffix::%player%} to true
- send title "&b&lSet Suffix" with subtitle "&7Type suffix in chat" to player for 5 seconds
- send action bar "&7Type &ccancel &7to cancel or &creset &7to reset suffix" to player
- else if {group_settingPrefix::%player%} = true:
- cancel event
- uncolored message = "cancel":
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- clear {group_settingPrefix::%player%}
- clear {group.settingPrefix::%player%}
- else if uncolored message = "reset" or "clear":
- set {_g} to {effectingGroup::%player%}
- set group {_g}'s perm prefix to ""
- send title "&b&lReset Prefix" with subtitle "&7Reset &b%{_g}%&7's prefix" to player for 2 seconds
- clear {group_settingPrefix::%player%}
- clear {group.settingPrefix::%player%}
- else:
- set {_g} to {effectingGroup::%player%}
- set {_g} to message
- set group {_g}'s perm prefix to {_r}
- send title "&b&lPrefix Set" with subtitle "&7Set &b%{_g}%&7's prefix to ""%{_r}%&7""" to player for 2 seconds
- clear {group_settingPrefix::%player%}
- clear {group.settingPrefix::%player%}
- else if {group_settingSuffix::%player%} = true:
- cancel event
- uncolored message = "cancel":
- send title "" with subtitle "&7Chat prompt &ccancelled" to player for 2 seconds
- clear {group_settingSuffix::%player%}
- clear {group.settingSuffix::%player%}
- else if uncolored message = "reset" or "clear":
- set {_g} to {effectingUser::%player%}
- set group {_g}'s perm suffix to ""
- send title "&b&lReset Suffix" with subtitle "&7Reset &b%{_g}%&7's suffix" to player for 2 seconds
- clear {group_settingSuffix::%player%}
- clear {group.settingSuffix::%player%}
- else:
- set {_g} to {effectingGroup::%player%}
- set {_r} to message
- set group {_g}'s perm suffix to {_r}
- send title "&b&lSuffix Set" with subtitle "&7Set &b%{_g}%&7's suffix to ""%{_r}%&7""" to player for 2 seconds
- clear {group_settingSuffix::%player%}
- clear {group.settingSuffix::%player%}
- else if {renamingGroup::%player%} = true:
- cancel event
- set {_r} to uncolored message
- size of groups 1 of "%{_r}%" matched against "([^A-Za-z0-9_,'\-\+/]{1,})" > 0:
- clear {renamingGroup::%player%}
- clear {effectingGroup::%player%}
- send title "&c&lError" with subtitle "&7Group names must be alphanumeric" to player for 2 seconds
- else:
- loop all groups:
- loop-value = {_r}:
- set {_err} to true
- {_err} = true:
- clear {renamingGroup::%player%}
- clear {effectingGroup::%player%}
- send title "&c&lError" with subtitle "&7Group already exists" to player for 2 seconds
- else:
- set {_g} to {effectingGroup::%player%}
- set group "%{_g}%"'s name to "%{_r}%"
- send title "&b&lGroup renamed" with subtitle "&b%{_g}% &7renamed to &b%{_r}%" to player for 2 seconds
- clear {renamingGroup::%player%}
- clear {effectingGroup::%player%}
- skript load:
- send "%nl%[LuxPerms] Loaded version {@ver}" to console
- # Commands
- command /luxperms:
- aliases: /luxperms:luxperms, /lp, /luxperms:lp
- permission: luxperms.admin
- permission message: {@np}
- trigger:
- create a gui with virtual chest with 6 rows named "&8LuxPerms {@ver}":
- make gui slot 20 with skull of ("%player%" parsed as offline player) named "&6&lUsers" with lore "&7Click to view all &aUsers":
- click(player)
- openGUI("users", player)
- make gui slot 24 with bookshelf named "&6&lGroups" with lore "&7Click to view all &aGroups":
- click(player)
- openGUI("groups", player)
- make gui slot 40 with tripwire hook named "&b&lExpand" with lore "&7Click to show more", "", and "&7This will show you more advanced options":
- click(player)
- openGUI("expand", player)
- open last gui to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement