fix: Fixed minor compatibility issue
This commit is contained in:
parent
e9ab895aec
commit
c2c40d86a4
@ -12,7 +12,6 @@ repositories {
|
||||
dependencies {
|
||||
compileOnly(libs.configurate.hocon)
|
||||
compileOnly(libs.libby.core)
|
||||
compileOnly(libs.adventure)
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@ -1,11 +1,5 @@
|
||||
package me.adrianed.authmevelocity.common;
|
||||
|
||||
import net.kyori.adventure.util.Index;
|
||||
|
||||
public enum MessageType {
|
||||
LOGIN, REGISTER, LOGOUT, FORCE_UNREGISTER, UNREGISTER;
|
||||
|
||||
// Enum#values is a heavy operation, so... cached MessageType members
|
||||
public static final Index<String, MessageType> INDEX
|
||||
= Index.create(MessageType::toString, MessageType.values());
|
||||
LOGIN, REGISTER, LOGOUT, FORCE_UNREGISTER, UNREGISTER
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
group = me.adrianed.authmevelocity
|
||||
version = 3.0.4
|
||||
version = 3.0.5-SNAPSHOT
|
||||
description = AuthMeReloaded Support for Velocity
|
||||
url = https://modrinth.com/plugin/authmevelocity
|
||||
id = authmevelocity
|
||||
|
@ -22,7 +22,7 @@ bukkit {
|
||||
name = "AuthMeVelocity"
|
||||
main = "me.adrianed.authmevelocity.paper.AuthMeVelocityPlugin"
|
||||
apiVersion = "1.13"
|
||||
website = "https://github.com/4drian3d/AuthMeVelocity"
|
||||
website = project.property("url") as String
|
||||
description = project.description as String
|
||||
authors = listOf("xQuickGlare", "4drian3d")
|
||||
softDepend = listOf("MiniPlaceholders")
|
||||
|
@ -53,7 +53,7 @@ public class PluginMessageListener {
|
||||
|
||||
final ByteArrayDataInput input = event.dataAsDataStream();
|
||||
final String message = input.readUTF();
|
||||
final MessageType type = MessageType.INDEX.valueOrThrow(
|
||||
final MessageType type = MessageType.valueOf(
|
||||
message.toUpperCase(Locale.ROOT));
|
||||
final String name = input.readUTF();
|
||||
final @Nullable Player player = proxy.getPlayer(name).orElse(null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user