Skip to content

Expose method to make a player spectate an entity. #1395

@ryantheleach

Description

@ryantheleach

Kane_Hart on IRC was requesting a plugin to allow admins to be able to spectate and scroll through players.

For best results a plugin should probably use the vanilla spectator mechanic as opposed to vanishing people and constantly updating their position.

/**
Attempts to make player spectate entity.
returns whether the method was successful.
this method will fail if the player is not in the correct Gamemode.
*/
bool player.setSpectating(@Nullable Entity entity);

Optional<Entity> player.getSpectating();

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions