mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-19 23:47:43 +01:00
Forward-port changes from 0e0a1449
This commit is contained in:
@@ -279,10 +279,6 @@ public class VelocityCommand implements SimpleCommand {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TranslatableComponent.Builder output = Component.translatable()
|
|
||||||
.key("velocity.command.plugins-list")
|
|
||||||
.color(NamedTextColor.YELLOW);
|
|
||||||
|
|
||||||
TextComponent.Builder listBuilder = Component.text();
|
TextComponent.Builder listBuilder = Component.text();
|
||||||
for (int i = 0; i < pluginCount; i++) {
|
for (int i = 0; i < pluginCount; i++) {
|
||||||
PluginContainer plugin = plugins.get(i);
|
PluginContainer plugin = plugins.get(i);
|
||||||
@@ -292,7 +288,11 @@ public class VelocityCommand implements SimpleCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
source.sendMessage(Identity.nil(), output.args(listBuilder.build()).build());
|
TranslatableComponent.Builder output = Component.translatable()
|
||||||
|
.key("velocity.command.plugins-list")
|
||||||
|
.color(NamedTextColor.YELLOW)
|
||||||
|
.args(listBuilder.build());
|
||||||
|
source.sendMessage(Identity.nil(), output);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TextComponent componentForPlugin(PluginDescription description) {
|
private TextComponent componentForPlugin(PluginDescription description) {
|
||||||
|
|||||||
@@ -580,10 +580,14 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
|||||||
protocolVersion()), ((Impl) status).isSafe());
|
protocolVersion()), ((Impl) status).isSafe());
|
||||||
break;
|
break;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
sendMessage(Component.translatable("velocity.error.moved-to-new-server",
|
Component requestedMessage = res.message();
|
||||||
NamedTextColor.RED,
|
if (requestedMessage == null) {
|
||||||
Component.text(originalEvent.server().serverInfo().name()),
|
requestedMessage = Component.translatable("velocity.error.moved-to-new-server",
|
||||||
friendlyReason));
|
NamedTextColor.RED,
|
||||||
|
Component.text(originalEvent.server().serverInfo().name()),
|
||||||
|
friendlyReason);
|
||||||
|
}
|
||||||
|
sendMessage(requestedMessage);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// The only remaining value is successful (no need to do anything!)
|
// The only remaining value is successful (no need to do anything!)
|
||||||
|
|||||||
Reference in New Issue
Block a user