Play sound when random teleport is executed.
Added a new configuration section 'effects'. I have future updates in mind to add additional effects. This update will have a sound play for the player when they are teleported, if enabled. This sound is completely configurable.
Here is the latest config.yml
Code (YAML):
# RandomTeleport - Configuration
config
:
# If enabled, gives player RandomTeleport item on joining the server for the first time
shouldGiveTeleportItemOnFirstJoin
: true
# If enabled, message the player that they have been teleported to world<x, y, z>
shouldMessagePlayerOnRandomTeleport
: true
teleportDelay
:
# If enabled, the teleport will execute after the delay.
# Note: Moving will cause the teleport to be cancelled.
# Note: Having the "randomteleport.bypassdelay" permission will bypass this delay
shouldDelayBeforeTeleporting
: true
# The delay (in seconds) before the teleport is executed.
delayInSeconds
: 5
# The message sent to the player once the delayed teleport begins.
delayMessage
:
"%prefix% &7You will be teleported in &b%delay% seconds&7. Do not move!"
# The message sent to the player if they move before the teleport occurs.
playerMovedMessage
:
"%prefix% &cYour random teleport request has been cancelled!"
# RandomTeleport - Messages
messages:
prefix
:
"&8[&bRandomTeleport&8]"
noPermission
:
"%prefix% &cYou do not have permission to use that command!"
reloadConfig
:
"%prefix% &aYou have successfully reloaded the plugin config!"
consoleCannotUse
:
"%prefix% &cConsole cannot use that command!"
playerOfflineOrDoesNotExist
:
"%prefix% &cPlayer could not be found!"
randomTeleportItemGiven
:
"%prefix% &aYou have given a RandomTeleport item!"
randomTeleportItemReceived
:
"%prefix% &aYou have received a RandomTeleport item!"
randomTeleportPerformed
:
"%prefix% &aYou have been teleported to %world%<%x%, %y%, %z%>"
# RandomTeleport - Item
item
:
# Defines what the item will be, default is COMPASS
material
:
"COMPASS"
# Defines what the display name will be, color codes are supported
displayName
:
"&8[&bRandomTeleport&8]"
# Defines what the item lore will be, color codes are supported
lore
:
-
"&cRight-click to use this item."
# RandomTeleport - World
world
:
# Defines which world the teleport will take place in
name
:
"world"
# Defines the maximum of the teleport range (Y will be determined automatically)
size:
X
: 5000
Z
: 5000
# RandomTeleport - Effects
effects:
sound
:
# If enabled, the sound defined below will play when the player is teleported
shouldPlaySoundOnTeleport
: true
# Here are the supported sounds: https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html
soundEffect
:
"BLOCK_GLASS_BREAK"
soundVolume
: 1.0
soundPitch
: 1.0