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

Set a metadata value for vanished players #4646

Merged
merged 2 commits into from
Nov 24, 2021
Merged

Set a metadata value for vanished players #4646

merged 2 commits into from
Nov 24, 2021

Conversation

nik2143
Copy link
Contributor

@nik2143 nik2143 commented Nov 24, 2021

Information

This PR closes #3121.

Details

Proposed feature:

This PR add to the player a vanished metadata that is used from other plugins to check if the player is vanished

Environments tested:

OS: Windows 11

Java version: 16.0.1

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8

Demonstration:

        for (MetadataValue meta : player.getMetadata("vanished")) {
            if (meta.asBoolean()) return true;
        }

@JRoy JRoy changed the title Add vanished metadata Set a metadata value for vanished players Nov 24, 2021
@JRoy JRoy merged commit 51c49b0 into EssentialsX:2.x Nov 24, 2021
@JRoy
Copy link
Member

JRoy commented Nov 24, 2021

Thanks for for your contribution!

@JRoy JRoy added this to the 2.19.1 milestone Nov 24, 2021
@JRoy JRoy added module: main Issues or PRs for the main Essentials module type: enhancement Features and feature requests. labels Nov 24, 2021
@nik2143 nik2143 deleted the vanishedmetadata branch November 24, 2021 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: main Issues or PRs for the main Essentials module type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add vanished metadata value
2 participants