From ee94836afd33a61e20948d89e9afc6e4c0ec9fee Mon Sep 17 00:00:00 2001 From: cuqmbr Date: Sat, 26 Jul 2025 17:49:56 +0300 Subject: [PATCH] add and configure Spawn plugin to teleport player to spawn on join --- src/plugins/Spawn-2.4.1.jar | 3 ++ src/plugins/Spawn/config.yml | 98 ++++++++++++++++++++++++++++++++++ src/plugins/Spawn/location.yml | 7 +++ src/plugins/Spawn/messages.yml | 43 +++++++++++++++ 4 files changed, 151 insertions(+) create mode 100644 src/plugins/Spawn-2.4.1.jar create mode 100644 src/plugins/Spawn/config.yml create mode 100644 src/plugins/Spawn/location.yml create mode 100644 src/plugins/Spawn/messages.yml diff --git a/src/plugins/Spawn-2.4.1.jar b/src/plugins/Spawn-2.4.1.jar new file mode 100644 index 0000000..c16a07c --- /dev/null +++ b/src/plugins/Spawn-2.4.1.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b9c4d150d0d0f741a392520e39b770246e58fbb1f51bcf1c8e90f113161e9be +size 74610 diff --git a/src/plugins/Spawn/config.yml b/src/plugins/Spawn/config.yml new file mode 100644 index 0000000..9bd74bc --- /dev/null +++ b/src/plugins/Spawn/config.yml @@ -0,0 +1,98 @@ +# ____ _ _ _ _ +# / ___| _ __ __ ___ ___ __ | |__ _ _ _ __ ___ ___| | ____ _ _ _(_) ___| |_ +# \___ \| '_ \ / _` \ \ /\ / / '_ \ | '_ \| | | | | '__/ _ \ / __| |/ / _` | | | | |/ _ \ __| +# ___) | |_) | (_| |\ V V /| | | | | |_) | |_| | | | | (_) | (__| < (_| | |_| | | __/ |_ +# |____/| .__/ \__,_| \_/\_/ |_| |_| |_.__/ \__, | |_| \___/ \___|_|\_\__, |\__,_|_|\___|\__| +# |_| |___/ |_| +# Wiki - https://github.com/rockquiet/Spawn/wiki + +plugin: + # if the plugin should search for updates on server start + # this will only send a message to the console, not to an admin joining the server + update-checks: true + # a list of worlds where the plugin should or should not work + # DISABLED: world-list is not used + # BLACKLIST: the plugin will not work in worlds listed below + # WHITELIST: the plugin will only work in worlds listed below + list-type: disabled + world-list: [] + # restrict the usage to specific game modes (only for players teleporting themselves) + gamemode-restricted: false + # possible values: SURVIVAL, ADVENTURE, CREATIVE, SPECTATOR + gamemode-list: [] + +# use the player's current head rotation instead of the defined one on teleport +use-player-head-rotation: + enabled: false + +# toggle if the player takes fall damage on teleport +fall-damage: + enabled: false + +# teleport the player to spawn on join +teleport-on-join: + enabled: true + # teleport the player ONLY on first join + only-first-join: false + +# cooldown for /spawn command +teleport-cooldown: + enabled: false + # how long in SECONDS the player has to wait before teleporting to spawn again + seconds: 10 + +# delay until teleport for /spawn command +teleport-delay: + enabled: false + # the delay in SECONDS until the player gets teleported to spawn + seconds: 3 + # toggle if the teleport should be canceled if the player moves + cancel-on-move: true + # toggle if the player should get the blindness effect during delay + # the effect will not work properly if a short delay time is used + blindness: false + +# toggle if the player should be teleported to spawn if they fall into the void +teleport-out-of-void: + enabled: false + # the height at which the player gets teleported out of the void to spawn + # Minecraft playable Altitude: -64 -> 320 [integer] + check-height: -64 + +# toggle if the player should be teleported to spawn if they die +teleport-on-respawn: + enabled: true + # toggle if the bed spawn-point should be ignored + ignore-bed-spawn: true + # toggle if the respawn anchor spawn-point should be ignored + ignore-anchor-spawn: true + +# toggle if the player should be teleported to spawn if they enter a world other than the spawn world +teleport-on-world-change: + enabled: false + # toggle if the world should also be checked on join + # this can interfere with teleport on join + check-on-join: false + +# spawns particles on teleport +particles: + enabled: false + # all particles: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html + # use these for 1.8: https://hub.spigotmc.org/nexus/service/local/repositories/snapshots/archive/org/spigotmc/spigot-api/1.8.8-R0.1-SNAPSHOT/spigot-api-1.8.8-R0.1-20160221.082514-43-javadoc.jar/!/org/bukkit/Effect.html + particle: PORTAL + # the number of particles which get used + amount: 40 + +# play a sound on teleport +sounds: + enabled: false + # all sounds: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html + # sounds for Minecraft 1.8 - 1.20: https://docs.andre601.ch/Spigot-Sounds/sounds/ + sound: ENTITY_ENDERMAN_TELEPORT + # the volume of the sound + volume: 1.0 + # the pitch of the sound + pitch: 1.0 + +# used for auto updating this file, do not change +file-version: 5 diff --git a/src/plugins/Spawn/location.yml b/src/plugins/Spawn/location.yml new file mode 100644 index 0000000..5e9191b --- /dev/null +++ b/src/plugins/Spawn/location.yml @@ -0,0 +1,7 @@ +spawn: + world: world + x: 255.5 + y: 1.0 + z: 258.5 + yaw: 0.0 + pitch: 0.0 diff --git a/src/plugins/Spawn/messages.yml b/src/plugins/Spawn/messages.yml new file mode 100644 index 0000000..53f203c --- /dev/null +++ b/src/plugins/Spawn/messages.yml @@ -0,0 +1,43 @@ +# Spawn by rockquiet +# MiniMessage formatting is supported on 1.18.2+ Paper based servers -> https://docs.advntr.dev/minimessage/format.html +# Legacy formatting is supported -> https://minecraft.wiki/w/Formatting_codes +# to disable a message set it to: '' + +# remove %prefix% from a message if it should not use it +prefix: '&7[&2Spawn&7]&r' + +# successful teleport to spawn +#teleport: '%prefix% &aTeleported to Spawn.' +teleport: '' +# successfully teleported another player to spawn - /spawn %player% +teleport-other: '%prefix% &aSuccessfully teleported &2%player% &ato Spawn.' +# if the player to be teleported is offline - /spawn %player% +player-not-found: '%prefix% &cPlayer &4%player% &cnot found!' + +# when the player wants to teleport but has an active teleport cooldown +cooldown-left: '%prefix% &cPlease wait &4%cooldown% &csecond(s) before teleporting again.' + +# time left until the player gets teleported to spawn +delay-left: '%prefix% &6You will be teleported in &e%delay% &6second(s).' +# delayed teleport failed because the player moved +teleport-canceled: '%prefix% &cTeleport canceled because you moved!' + +# spawn set at current position +spawn-set: '%prefix% &aSpawn set successfully.' + +# all files reloaded +reload: '%prefix% &aAll files reloaded successfully.' + +# no spawn set in config - set one with /spawn set +no-spawn: '%prefix% &cNo Spawn is set!' +# plugin is disabled in current world +world-disabled: '%prefix% &cYou are not allowed to use this here!' +# player is not in allowed game mode +gamemode-restricted: '%prefix% &cYou are not allowed to use this while in &4%gamemode%&c!' +# player does not have permission to execute the command +no-permission: '%prefix% &cNo permissions!' +# command cannot be used in console +no-player: '%prefix% &cCommand can only be used by players!' + +# used for auto updating this file, do not change +file-version: 3