- check_circle Functions
- 14,502 views, 2 today
- 1,319 downloads, 0 today
3
Limited Spectator Mode
is a datapack for Minecraft 1.14+ that enables all players to enter Spectator Mode whenever they want, with a few restrictions.
1) The player can not travel more than 64 blocks away from where they enabled the spectator mode. If they try to fly further, they will be teleported back to their point of origin.
2) Upon leaving spectator mode, they will be teleported to the point they started, to prevent using the mode as a means of transportation.
- Upon joining the server, every player is given a unique ID, stored in the scoreboard value sp_id.
- When they use the command "/trigger sp_on" they will go in to spectator mode, and an armorstand will be summoned at their location, with the same ID as the player.
(The location is shown by a floating golden helmet for players that are not in spectator mode)
- The armorstand will constantly check if the player is within a 64 block radius, and teleport them back if they go to far.
- To leave spectator mode, they player will have to use "/trigger sp_off" this will teleport the player back to the armorstand, and disable spectator mode.
Known "bugs":
1) Unloaded Chunks. (FIXED in latest version)
- If a player teleports away from their armorstand while in spectator mode, and the chunks they were in gets unloaded before the player gets properly teleported, they can move freely in spectator mode. This is only until the chunk with their armorstand gets loaded again. This is unfixable until mojang implements a stable way of keeping a chunk loaded. (the /forceload command can not be used by a datapack, sadly...)
I have implemented a function so that they can not use /trigger sp_off until the chunk with their armorstand is loaded, to prevent using the spectator mode as a mode of teleportation.
Status: Unfixable.
2) Bad admin...
- If an administrator uses /kill @e to kill the armorstand, spectators are stuck in spectator limbo, until an administrator saves them. This is done by using the following commands:
- /scoreboard players <playername> set sp_status 0
- /gamemode <playername> survival.
This should allow them to use the command again freely.
Status: User error...
How to install:
1) Add the spectate.zip file to your datapacks folder.
2) Restart the world/server or use the command /reload.
How to uninstall:
1) Delete the datapack from your datapack folder.
2) Restart the world/server or use the command /reload.
3) Run the following commands to clear the scoreboard values:
is a datapack for Minecraft 1.14+ that enables all players to enter Spectator Mode whenever they want, with a few restrictions.
Restrictions:
1) The player can not travel more than 64 blocks away from where they enabled the spectator mode. If they try to fly further, they will be teleported back to their point of origin.
2) Upon leaving spectator mode, they will be teleported to the point they started, to prevent using the mode as a means of transportation.
How it works:
- Upon joining the server, every player is given a unique ID, stored in the scoreboard value sp_id.
- When they use the command "/trigger sp_on" they will go in to spectator mode, and an armorstand will be summoned at their location, with the same ID as the player.
(The location is shown by a floating golden helmet for players that are not in spectator mode)
- The armorstand will constantly check if the player is within a 64 block radius, and teleport them back if they go to far.
- To leave spectator mode, they player will have to use "/trigger sp_off" this will teleport the player back to the armorstand, and disable spectator mode.
Known "bugs":
1) Unloaded Chunks. (FIXED in latest version)
- If a player teleports away from their armorstand while in spectator mode, and the chunks they were in gets unloaded before the player gets properly teleported, they can move freely in spectator mode. This is only until the chunk with their armorstand gets loaded again. This is unfixable until mojang implements a stable way of keeping a chunk loaded. (the /forceload command can not be used by a datapack, sadly...)
I have implemented a function so that they can not use /trigger sp_off until the chunk with their armorstand is loaded, to prevent using the spectator mode as a mode of teleportation.
Status: Unfixable.
2) Bad admin...
- If an administrator uses /kill @e to kill the armorstand, spectators are stuck in spectator limbo, until an administrator saves them. This is done by using the following commands:
- /scoreboard players <playername> set sp_status 0
- /gamemode <playername> survival.
This should allow them to use the command again freely.
Status: User error...
How to install:
1) Add the spectate.zip file to your datapacks folder.
2) Restart the world/server or use the command /reload.
How to uninstall:
1) Delete the datapack from your datapack folder.
2) Restart the world/server or use the command /reload.
3) Run the following commands to clear the scoreboard values:
/scoreboard objectives remove sp_id
/scoreboard objectives remove sp_off
/scoreboard objectives remove sp_on
/scoreboard objectives remove sp_selector
/scoreboard objectives remove sp_status
Compatibility | Minecraft 1.15 |
Tags |
2 Update Logs
Update #2 : by Tirco 02/19/2020 6:00:02 amFeb 19th, 2020
Updated to 1.15.2. All I had to do was change the pack format. Let me know if there are issues :)
LOAD MORE LOGS
tools/tracking
4336932
119
limited-spectator-mode
Create an account or sign in to comment.
This is what I was looking for my server, allowing players to be able to switch to spectator.
Getting a weird issue since installing.
Respawn bed is lost.
Getting "Your home bed was missing or obstructed" when going through the portal at the end.
I've tried uninstalling but the problem persists...
...
So the respawn point on beds is broken now.
My base the bed is surrounded with halfslabs, making it look like it is level with the floor and preventing mob spawning.
This behavior has now change. Now I have to remove the half slabs around the beds...
You could download a mod that allows you to create Macros, and bind the command to that macro.