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

Version specific motds #7

Closed
kaxlabs opened this issue Nov 11, 2020 · 6 comments
Closed

Version specific motds #7

kaxlabs opened this issue Nov 11, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@kaxlabs
Copy link

kaxlabs commented Nov 11, 2020

Since 1.16 color formatting codes don't work on lower versions, it would be good to have different version profiles (e.g. 1.16+, 1.15-) so that servers with ViaVersion/ViaBackwards are able to look good for all users.

@linsaftw
Copy link
Member

Hi, how do you get the protocol version of a player with ViaVersion api? It seems you need the Player object which you can't get on ping event.

@linsaftw linsaftw added the help wanted Extra attention is needed label Nov 24, 2020
@kaxlabs
Copy link
Author

kaxlabs commented Nov 25, 2020

For spigot, you can add it to your maven like so:

<repository>
    <id>viaversion-repo</id>
    <url>https://repo.viaversion.com</url>
</repository>

<dependency>
    <groupId>us.myles</groupId>
    <artifactId>viaversion</artifactId>
    <version>2.2.2</version>
    <scope>provided</scope>
</dependency>

and then use it in your code like this:

Player player = // some reference of the player
int protocolVersion = Via.getAPI().getPlayerVersion(player.getUniqueId());

For bungeecord this is not needed, you can just use event.getConnection().getVersion(); from the ProxyPingEvent.

@linsaftw
Copy link
Member

I will try to implement this for BungeeCord. It will not be possible to do in Bukkit as you can't get the "Player" on ServerListPing.

@linsaftw linsaftw reopened this Nov 25, 2020
@linsaftw linsaftw added enhancement New feature or request and removed help wanted Extra attention is needed labels Nov 25, 2020
@linsaftw
Copy link
Member

linsaftw commented May 7, 2021

I will try to implement this for BungeeCord. It will not be possible to do in Bukkit as you can't get the "Player" on ServerListPing.

You can do it with ProtocolLib tho... We will probably have an implementation soon :)

@linsaftw
Copy link
Member

linsaftw commented May 7, 2021

Closed with 4f13ced

@linsaftw linsaftw closed this as completed May 7, 2021
@linsaftw
Copy link
Member

linsaftw commented May 8, 2021

I had to revert the changes because they broke some stuff and only work on BungeeCord if ViaVersion is installed.

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

No branches or pull requests

2 participants