Spectastic! [API 5.0.0]

Spectastic!

Downloads Issues Powered by Kittens

Lets users with the permission toggle between spectator mode and their previous gamemode. Great for if you want to allow spectating but not creative.

Links

Downloads
Issues

Usage

Use the command /spec to toggle spectate status.

Permissions

spectastic.spec - Lets you use the above command

5 Likes

I have encountered a small problem… it tends to be a bit lethal when changing back from spectator to survival mode, unless you hover over water. Going for a short fly in spectator mode, followed by attempting to land on a rooftop, ended with a resounding SPLAT. Is there something you can do to make for a less lethal landing?
<Also, add more FLARD>

There absolutely is! Possibilities:

  • Find a safe place and teleport the user there.
  • Give a few ticks of invulnerability.
  • FLARD

The safe place search is a tricky idea to pull off, because there’s several situations where things wouldn’t play well:

  • If the user ends up in a completely filled chunk, the search would take some time. Bring them to the top, regardless of height?
  • If the user is hanging out near lava, either a lot of careful searching would have to happen or they might end up burning.

Maybe make an attempt within 20 blocks of the user’s current location and then do something else? (Spawn, bed location, nearest player?)

I can’t see many use-cases for reappearing inside a column of stone, so one would hope the user chooses a reasonable place to attempt to reappear. I’m not sure how you’d want to handle players who appear to want to become embedded in a bridge support, swim in a sea of lava, or plummet from the sky. Mayhap some options for admins to choose from.

I think the thing that killed me was that it regarded my flight as a sudden drop when I changed gamemode, so a block or so became a hundred or more. I’ve had the same issue with creative → survival before, and I’m not sure if a plugin is the root of the problem.

How does Minecraft handle this when changing from spectator to creative mode?
EDIT: Badly, it would seem :confused:

Ohhhhhhhh I know. It does something like record the highest height you’ve been to since you last touched ground, and then calculates the difference between that and the height at which you landed to determine fall damage. So if you were flying up high… dead.

I do like the idea of providing options now that you’ve mentioned it. Either way I’ll look into preventing fall damage.

1 Like

https://github.com/KittehOrg/Spectastic/issues/1

One suggestion to switching modes.
When you switch to spectator remember cords when that happened, and when switching back tp player there.
You can make that configurable as one of the options what happens when switching modes.

This works perfectly, even on Spongeforge 1136, so it has no incompatibilities with API 3.0.0 as of yet!

I like this idea, so then it could be an “Out of body” kind of experience, and prevent users from using this system as a way to find things underground that they shouldn’t and immediately being able to access them.

Well the API doesn’t break completely between builds, so if a plugin uses API parts which didn’t break, then you can use said plugin on an older API version :wink:

However that’s not guaranteed and that’s why the API got a new major version.

Oh, okay. I understand, I say this only because I’ve tried a couple new 4.0+ plugins on my older API build, and as of yet nothing has worked. Just wanted other API 3.0 users to know that this will be compatible with their servers if they deem it useful :slight_smile:

2 Likes

Actually, it uses the distance you’ve travelled downwards. You can see it in action with a leash “yo-yo” (leash an animal to a floating fence post, wait a few minutes, and unleash them).

I like this idea the most, it seems logical and easy to implement. This should be the default way of handleing things with more (optionally) be added later.

Indeed, it’s my plan to play with a bunch of feature additions starting soon, into the weekend.

Not really your issue, as it’s caused by a conflict between two plugins, but one of my staff was in /spectate mode and had also execute /fly. This caused them to fall immediately through the world into the void. I’m not asking that you fix this, just that it made me laugh when I found out and I thought I would share :joy:

That is pretty fantastic. So they were spectating, and started flying, and just… fell? That’s… interesting.

To clarify, this /fly command sets them immediately as flying, or just able to double-space to fly?

It’s the one from essentialCmds, so it’s a double-space mode, but they were spectating, and as soon as they typed /fly they started falling. I’m assuming since spectator mode has flying locked on, this forced the flying to immediately be locked off.

I tried it myself and I nearly was to tears laughing about it.

you should probably file a bug report to EssCmds, as it should check wether a player is in spectator mode or not when en- or disabling fly :wink:

Could we get an update to API 5 or 6 for this? Sorry to necro the crap out of this, but it no longer allows my server to start when I have it installed when using the latest API :c

I suppose I could do that!