Open Technofied opened 4 days ago
Number two might cause an issue if a player belongs to more then one group that has fly permissions. For example, I'm a ranger and staff, so when I do /fly
, which of these two broadcast messages would show up? Or do you mean like /fly <ranger/staff/reveille-fly/etc> <reason>
Number two might cause an issue if a player belongs to more then one group that has fly permissions. For example, I'm a ranger and staff, so when I do
/fly
, which of these two broadcast messages would show up? Or do you mean like/fly <ranger/staff/reveille-fly/etc> <reason>
We can get around that issue by using scripts, so we can have multiple overlays that use MyCommand's Scripting. i.e.
- "$Script$%if%%player_haspermission<permission%"
- \
In 'home/plugin/MyCommand/commands/server_staff.yml' to replace /staff-fly command
staff-fly:
command: /fly
type:
- RUN_COMMAND
- BROADCAST_TEXT
runcmd:
- "$RUN_CONSOLE$/essentials:fly $player"
text:
- "$hex%#E100FF%&lS$hex%#D800FF%&lT$hex%#CF00FF%&lA$hex%#C500FF%&lF$hex%#BC00FF%&lF $hex%#bdc3c7%» &a$player$hex%#E100FF% has toggled fly for: &a$multiargs."
- "$hex%#E100FF%&lW$hex%#DB00FF%&lA$hex%#D500FF%&lR$hex%#CF00FF%&lN$hex%#C800FF%&lI$hex%#C200FF%&lN$hex%#BC00FF%&lG $hex%#bdc3c7%» $hex%#E100FF%Flying is for staff duties only! :)"
error-message:
- "$hex%#E100FF%&lS$hex%#D800FF%&lT$hex%#CF00FF%&lA$hex%#C500FF%&lF$hex%#BC00FF%&lF $hex%#bdc3c7%» &cPlease insert your reason!"
overlay: true
permission-required: true
broadcast_message_permission_node: democracy.staff
permission-node: democracy.staff
permission-error: "&cYou do not have permission to use this command!"
required_args: 1
register: true
In 'home/plugin/MyCommand/commands/department_of_the_interior.yml' to replace /doi-fly command
doi-fly:
command: /fly
type:
- RUN_COMMAND
- BROADCAST_TEXT
runcmd:
- "$RUN_CONSOLE$/effect give $player minecraft:resistance 120 5 true"
- "$RUN_CONSOLE$/essentials:fly $player"
- "$RUN_CONSOLE$/discordsrv:discord broadcast ##ranger-attend > :sparkles: **$player has toggled fly for: $multiargs**"
- "$RUN_CONSOLE$/discordsrv:discord broadcast ##doi > :sparkles: **$player has toggled fly for: $multiargs**"
text:
- "$hex%#00AAFF%&lD$hex%#009CFF%&lO$hex%#008EFF%&lI &l$hex%#bdc3c7%» $player has toggled fly for: $multiargs."
- "&4&l[WARNING]&r &cAbusing this permission will result in immediate termination and further disciplinary action!"
error-message:
- "$hex%#00AAFF%&lD$hex%#009CFF%&lO$hex%#008EFF%&lI &l$hex%#bdc3c7%» &4Please imput your reason!"
overlay: true
permission-required: true
broadcast_message_permission_node: democracy.ranger
permission-node: democracy.ranger
permission-error: "&cYou do not have permission to use this command!"
required_args: 1
register: true
In 'home/plugin/MyCommand/commands/department_of_public_affairs.yml' to replace /dpa-fly command
dpa-fly:
command: /fly
type:
- RUN_COMMAND
- BROADCAST_TEXT
runcmd:
- "$RUN_CONSOLE$/essentials:fly $player"
- "$RUN_CONSOLE$/discordsrv:discord broadcast ##fly-tp-logs > :sparkles: **$player has toggled fly for: $multiargs**"
text:
- "$hex%#00AAFF%&lD$hex%#009CFF%&lP$hex%#008EFF%&lA &l$hex%#bdc3c7%» $player has toggled fly for: $multiargs."
- "&4&l[WARNING]&r &cAbusing this permission will result in immediate termination and further disciplinary action!"
error-message:
- "&4$hex%#00AAFF%&lD$hex%#009CFF%&lP$hex%#008EFF%&lA &l$hex%#bdc3c7%» &4Please imput your reason!"
overlay: true
permission-required: true
broadcast_message_permission_node: dpa.fly
permission-node: dpa.fly
permission-error: "&cYou do not have permission to use this command!"
required_args: 1
register: true
In 'home/plugin/MyCommand/commands/other.yml', added didn't replace any current command
perms-reveille-fly:
command: /fly
type:
- RUN_COMMAND
- BROADCAST_TEXT
runcmd:
- "$RUN_CONSOLE$/essentials:fly $player"
- "$RUN_CONSOLE$/discordsrv:discordsrv broadcast ##744549980978544722 :sparkles: **$player has toggled fly for: $multiargs**"
text:
- "$hex%#00AAFF%&lF$hex%#009CFF%&lL$hex%#008EFF%&lY &l$hex%#bdc3c7%» $player has toggled fly for: $multiargs."
- "&4&l[WARNING]&r &cAbusing this permission will result in its removal and further disciplinary action!"
error-message:
- "$hex%#00AAFF%&lF$hex%#009CFF%&lL$hex%#008EFF%&lY &l$hex%#bdc3c7%» &4Please imput your reason!"
overlay: true
permission-required: true
permission-node:
permission-error: "&cYou do not have permission to use this command!"
required_args: 1
register: true
/fly
command sends a logging message to #automod on the main discord. I just thought it might be nice to have since its not monitored by any department or anything, but up to you guys if you want to keep it like that.So, the server was restarted without reviewing the changes and it doesn't work 💀 back to the drawing boards... interesting, unintended side effect was that everyone was able to see the "player is flying for reason" message which was one of the issues this bug was opened in the first place. Reverted for now pending restart and I'll try again tomorrow.
Number two might cause an issue if a player belongs to more then one group that has fly permissions. For example, I'm a ranger and staff, so when I do
/fly
, which of these two broadcast messages would show up? Or do you mean like/fly <ranger/staff/reveille-fly/etc> <reason>
We can get around that issue by using scripts, so we can have multiple overlays that use MyCommand's Scripting. i.e.
- "$Script$%if%%player_haspermission<permission%" -
What if we're part of multiple? Like with me, it ran it for staff, DOI and DPA (idk why DPA) and it enabled, disabled, enabled, and showed global.
See title.
There are a few ways we can give fly without ranger permissions.
We can: