Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-04 23:30:24 +01:00
Update commands to add new platform specific command also add platform to updater.
Dieser Commit ist enthalten in:
Ursprung
eb72db9a5f
Commit
23f1589c28
@ -9,4 +9,4 @@ softdepend: [ProtocolSupport, PacketListenerApi]
|
||||
commands:
|
||||
viaversion:
|
||||
description: Shows ViaVersion Version and more.
|
||||
aliases: [viaver]
|
||||
aliases: [viaver, vvbukkit]
|
@ -7,7 +7,7 @@ public class BungeeCommand extends Command {
|
||||
private final BungeeCommandHandler handler;
|
||||
|
||||
public BungeeCommand(BungeeCommandHandler handler) {
|
||||
super("viaversion", "", "viaver"); // The CommandHandler will handle the permission
|
||||
super("viaversion", "", "viaver", "vvbungee"); // The CommandHandler will handle the permission
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
|
@ -36,14 +36,13 @@ public class BungeeViaInjector implements ViaInjector {
|
||||
|
||||
@Override
|
||||
public void uninject() {
|
||||
// TODO: Uninject from players currently online
|
||||
Via.getPlatform().getLogger().severe("ViaVersion cannot remove itself from Bungee without a reboot!");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getServerProtocolVersion() throws Exception {
|
||||
return 47;
|
||||
return 47; // TODO Config Option
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -9,7 +9,6 @@ public class BungeeViaLoader implements ViaPlatformLoader {
|
||||
@Override
|
||||
public void load() {
|
||||
// TODO: Config
|
||||
// TODO: Platform specific commands
|
||||
Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class UpdateUtil {
|
||||
URL url = new URL(URL + PLUGIN + LATEST_VERSION + "?" + System.currentTimeMillis());
|
||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||
connection.setUseCaches(true);
|
||||
connection.addRequestProperty("User-Agent", "ViaVersion " + Via.getPlatform().getPluginVersion());
|
||||
connection.addRequestProperty("User-Agent", "ViaVersion " + Via.getPlatform().getPluginVersion() + " " + Via.getPlatform().getPlatformName());
|
||||
connection.setDoOutput(true);
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
String input;
|
||||
|
@ -68,7 +68,7 @@ public class SpongePlugin implements ViaPlatform {
|
||||
syncExecutor = game.getScheduler().createSyncExecutor(this);
|
||||
asyncExecutor = game.getScheduler().createAsyncExecutor(this);
|
||||
SpongeCommandHandler commandHandler = new SpongeCommandHandler();
|
||||
game.getCommandManager().register(this, commandHandler, Arrays.asList("viaversion", "viaver"));
|
||||
game.getCommandManager().register(this, commandHandler, Arrays.asList("viaversion", "viaver", "vvsponge"));
|
||||
getLogger().info("ViaVersion " + getPluginVersion() + " is now loaded, injecting!");
|
||||
// Init platform
|
||||
Via.init(ViaManager.builder()
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren