Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 07:40:08 +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:
|
commands:
|
||||||
viaversion:
|
viaversion:
|
||||||
description: Shows ViaVersion Version and more.
|
description: Shows ViaVersion Version and more.
|
||||||
aliases: [viaver]
|
aliases: [viaver, vvbukkit]
|
@ -7,7 +7,7 @@ public class BungeeCommand extends Command {
|
|||||||
private final BungeeCommandHandler handler;
|
private final BungeeCommandHandler handler;
|
||||||
|
|
||||||
public BungeeCommand(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;
|
this.handler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,14 +36,13 @@ public class BungeeViaInjector implements ViaInjector {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uninject() {
|
public void uninject() {
|
||||||
// TODO: Uninject from players currently online
|
|
||||||
Via.getPlatform().getLogger().severe("ViaVersion cannot remove itself from Bungee without a reboot!");
|
Via.getPlatform().getLogger().severe("ViaVersion cannot remove itself from Bungee without a reboot!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getServerProtocolVersion() throws Exception {
|
public int getServerProtocolVersion() throws Exception {
|
||||||
return 47;
|
return 47; // TODO Config Option
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -9,7 +9,6 @@ public class BungeeViaLoader implements ViaPlatformLoader {
|
|||||||
@Override
|
@Override
|
||||||
public void load() {
|
public void load() {
|
||||||
// TODO: Config
|
// TODO: Config
|
||||||
// TODO: Platform specific commands
|
|
||||||
Via.getManager().getProviders().use(MovementTransmitterProvider.class, new BungeeMovementTransmitter());
|
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());
|
URL url = new URL(URL + PLUGIN + LATEST_VERSION + "?" + System.currentTimeMillis());
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
connection.setUseCaches(true);
|
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);
|
connection.setDoOutput(true);
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||||
String input;
|
String input;
|
||||||
|
@ -68,7 +68,7 @@ public class SpongePlugin implements ViaPlatform {
|
|||||||
syncExecutor = game.getScheduler().createSyncExecutor(this);
|
syncExecutor = game.getScheduler().createSyncExecutor(this);
|
||||||
asyncExecutor = game.getScheduler().createAsyncExecutor(this);
|
asyncExecutor = game.getScheduler().createAsyncExecutor(this);
|
||||||
SpongeCommandHandler commandHandler = new SpongeCommandHandler();
|
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!");
|
getLogger().info("ViaVersion " + getPluginVersion() + " is now loaded, injecting!");
|
||||||
// Init platform
|
// Init platform
|
||||||
Via.init(ViaManager.builder()
|
Via.init(ViaManager.builder()
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren