-
Notifications
You must be signed in to change notification settings - Fork 0
/
slash_fly_command.sk
24 lines (21 loc) · 1.22 KB
/
slash_fly_command.sk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
options:
# COMMAND
# whether or not players are allowed to fly (Can be disabled in a event of a glitch/bug)
allowed-flying: true
# The message that the player receives when activating flight mode
flying-activation-message: &aFlight mode enabled.
# The message that the player receives when deactivating flight mode
flying-deactivation-message: &cFlight mode disabled.
command /fly:
aliases: creative-fly, flight # Different commands players can run to activate this command
description: Toggles flight mode for the player. # Sets description of the flight command
executable by: players # Only players are allowed to run this command
permission: server_name.fly
trigger:
if "{@allowed-flying}" is true: # Check if flying is allowed globally
if player is flying: # Check if player is already flying
set fly mode of player to false # Cancel player flight
send "{@flying-deactivation-message}"to player # Send message to player
else:
set fly mode of player to true # Give player flight
send "{@flying-activation-message}" to player # Send message to player