Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PlayerTag.view_distance tag & mech #2694

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

davight
Copy link
Contributor

@davight davight commented Jan 13, 2025

Additions

  • tag player.view_distance - returns player's view distance
  • mechanism player.view_distance - adjust player's view distance

Requested on discord https://discord.com/channels/315163488085475337/1320439849425305811

Note

Player#setViewDistance also supports -1 as an input (this resets player's viewdistance to match world's view distance) should I add this option as well?

@tal5
Copy link
Member

tal5 commented Jan 13, 2025

Player#setViewDistance also supports -1 as an input (this resets player's viewdistance to match world's view distance) should I add this option as well?

Can add that as providing no input to the mechanism (although make sure that's actually the case? the JD doesn't seem to mention that at a glance).
Also check what the tag returns if the player has no distance set, the world's distance? -1?

@davight
Copy link
Contributor Author

davight commented Jan 13, 2025

fixed

// @group paper
// @description
// Sets this player's view distance. Input must be a number between 2 and 32.
// This will be reset when a player rejoins. Provide empty input to unset.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When allowing no input, it's usually no input at all (I.e. use the register method without a required param, and Provide no input in the meta).

@davight
Copy link
Contributor Author

davight commented Jan 17, 2025

should be good now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants