3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-24 23:30:15 +01:00

Update commands to add new platform specific command also add platform to updater.

Dieser Commit ist enthalten in:
Myles 2016-09-29 22:35:51 +01:00
Ursprung eb72db9a5f
Commit 23f1589c28
6 geänderte Dateien mit 5 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -9,4 +9,4 @@ softdepend: [ProtocolSupport, PacketListenerApi]
commands:
viaversion:
description: Shows ViaVersion Version and more.
aliases: [viaver]
aliases: [viaver, vvbukkit]

Datei anzeigen

@ -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;
}

Datei anzeigen

@ -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

Datei anzeigen

@ -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());
}
}

Datei anzeigen

@ -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;

Datei anzeigen

@ -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()