geforkt von Mirrors/Velocity
Fix compile errors
Dieser Commit ist enthalten in:
Ursprung
cffc6d0a81
Commit
6e00dbe2b7
@ -31,7 +31,7 @@ dependencies {
|
|||||||
api "net.kyori:adventure-text-serializer-gson:${adventureVersion}"
|
api "net.kyori:adventure-text-serializer-gson:${adventureVersion}"
|
||||||
api "net.kyori:adventure-text-serializer-legacy:${adventureVersion}"
|
api "net.kyori:adventure-text-serializer-legacy:${adventureVersion}"
|
||||||
api "net.kyori:adventure-text-serializer-plain:${adventureVersion}"
|
api "net.kyori:adventure-text-serializer-plain:${adventureVersion}"
|
||||||
api "net.kyori:adventure-text-serializer-legacy-text3:${adventureVersion}"
|
api "net.kyori:adventure-text-serializer-legacy-text3:${adventurePlatformVersion}"
|
||||||
|
|
||||||
api "org.slf4j:slf4j-api:${slf4jVersion}"
|
api "org.slf4j:slf4j-api:${slf4jVersion}"
|
||||||
api 'com.google.inject:guice:4.2.3'
|
api 'com.google.inject:guice:4.2.3'
|
||||||
|
@ -21,7 +21,8 @@ allprojects {
|
|||||||
ext {
|
ext {
|
||||||
// dependency versions
|
// dependency versions
|
||||||
textVersion = '3.0.4'
|
textVersion = '3.0.4'
|
||||||
adventureVersion = '4.0.0-SNAPSHOT'
|
adventureVersion = '4.0.0'
|
||||||
|
adventurePlatformVersion = '4.0.0-SNAPSHOT'
|
||||||
junitVersion = '5.7.0'
|
junitVersion = '5.7.0'
|
||||||
slf4jVersion = '1.7.30'
|
slf4jVersion = '1.7.30'
|
||||||
log4jVersion = '2.13.3'
|
log4jVersion = '2.13.3'
|
||||||
|
@ -104,7 +104,7 @@ public class GlistCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextComponent.Builder builder = Component.text()
|
TextComponent.Builder builder = Component.text()
|
||||||
.append(TextComponent.of("[" + server.getServerInfo().getName() + "] ",
|
.append(Component.text("[" + server.getServerInfo().getName() + "] ",
|
||||||
NamedTextColor.DARK_AQUA))
|
NamedTextColor.DARK_AQUA))
|
||||||
.append(Component.text("(" + onServer.size() + ")", NamedTextColor.GRAY))
|
.append(Component.text("(" + onServer.size() + ")", NamedTextColor.GRAY))
|
||||||
.append(Component.text(": "))
|
.append(Component.text(": "))
|
||||||
@ -112,7 +112,7 @@ public class GlistCommand {
|
|||||||
|
|
||||||
for (int i = 0; i < onServer.size(); i++) {
|
for (int i = 0; i < onServer.size(); i++) {
|
||||||
Player player = onServer.get(i);
|
Player player = onServer.get(i);
|
||||||
builder.append(player.getUsername());
|
builder.append(Component.text(player.getUsername()));
|
||||||
|
|
||||||
if (i + 1 < onServer.size()) {
|
if (i + 1 < onServer.size()) {
|
||||||
builder.append(Component.text(", "));
|
builder.append(Component.text(", "));
|
||||||
|
@ -187,8 +187,8 @@ public class VelocityCommand implements SimpleCommand {
|
|||||||
.color(NamedTextColor.DARK_AQUA)
|
.color(NamedTextColor.DARK_AQUA)
|
||||||
.append(Component.text(version.getVersion()).decoration(TextDecoration.BOLD, false))
|
.append(Component.text(version.getVersion()).decoration(TextDecoration.BOLD, false))
|
||||||
.build();
|
.build();
|
||||||
TextComponent copyright = TextComponent
|
TextComponent copyright = Component
|
||||||
.of("Copyright 2018-2020 " + version.getVendor() + ". " + version.getName()
|
.text("Copyright 2018-2020 " + version.getVendor() + ". " + version.getName()
|
||||||
+ " is freely licensed under the terms of the MIT License.");
|
+ " is freely licensed under the terms of the MIT License.");
|
||||||
source.sendMessage(Identity.nil(), velocity);
|
source.sendMessage(Identity.nil(), velocity);
|
||||||
source.sendMessage(Identity.nil(), copyright);
|
source.sendMessage(Identity.nil(), copyright);
|
||||||
|
@ -630,7 +630,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
getProtocolVersion()), ((Impl) status).isSafe());
|
getProtocolVersion()), ((Impl) status).isSafe());
|
||||||
break;
|
break;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
sendMessage(server.getConfiguration().getMessages()
|
sendMessage(Identity.nil(), server.getConfiguration().getMessages()
|
||||||
.getMovedToNewServerPrefix().append(friendlyReason));
|
.getMovedToNewServerPrefix().append(friendlyReason));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -641,7 +641,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
} else if (event.getResult() instanceof Notify) {
|
} else if (event.getResult() instanceof Notify) {
|
||||||
Notify res = (Notify) event.getResult();
|
Notify res = (Notify) event.getResult();
|
||||||
if (event.kickedDuringServerConnect() && previouslyConnected) {
|
if (event.kickedDuringServerConnect() && previouslyConnected) {
|
||||||
sendMessage(res.getMessageComponent());
|
sendMessage(Identity.nil(), res.getMessageComponent());
|
||||||
} else {
|
} else {
|
||||||
disconnect(res.getMessageComponent());
|
disconnect(res.getMessageComponent());
|
||||||
}
|
}
|
||||||
@ -981,10 +981,10 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
|
|
||||||
switch (status.getStatus()) {
|
switch (status.getStatus()) {
|
||||||
case ALREADY_CONNECTED:
|
case ALREADY_CONNECTED:
|
||||||
sendMessage(ConnectionMessages.ALREADY_CONNECTED);
|
sendMessage(Identity.nil(), ConnectionMessages.ALREADY_CONNECTED);
|
||||||
break;
|
break;
|
||||||
case CONNECTION_IN_PROGRESS:
|
case CONNECTION_IN_PROGRESS:
|
||||||
sendMessage(ConnectionMessages.IN_PROGRESS);
|
sendMessage(Identity.nil(), ConnectionMessages.IN_PROGRESS);
|
||||||
break;
|
break;
|
||||||
case CONNECTION_CANCELLED:
|
case CONNECTION_CANCELLED:
|
||||||
// Ignored; the plugin probably already handled this.
|
// Ignored; the plugin probably already handled this.
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren