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