Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-08 17:20:24 +01:00
Merge branch 'master' of https://github.com/MylesIsCool/ViaVersion
Dieser Commit ist enthalten in:
Commit
d8bbb51721
@ -13,6 +13,13 @@ public interface BossBar {
|
||||
*/
|
||||
void setTitle(String title);
|
||||
|
||||
/**
|
||||
* Get the current title
|
||||
*
|
||||
* @return the title
|
||||
*/
|
||||
String getTitle();
|
||||
|
||||
/**
|
||||
* Change the health
|
||||
*
|
||||
@ -21,11 +28,11 @@ public interface BossBar {
|
||||
void setHealth(float health);
|
||||
|
||||
/**
|
||||
* Get the bossbar color
|
||||
* Get the health
|
||||
*
|
||||
* @return
|
||||
* @return float between 0F - 1F
|
||||
*/
|
||||
BossColor getColor();
|
||||
float getHealth();
|
||||
|
||||
/**
|
||||
* Yay colors!
|
||||
@ -34,6 +41,13 @@ public interface BossBar {
|
||||
*/
|
||||
void setColor(BossColor color);
|
||||
|
||||
/**
|
||||
* Get the bossbar color
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
BossColor getColor();
|
||||
|
||||
/**
|
||||
* Change the bosbar style
|
||||
*
|
||||
@ -41,6 +55,13 @@ public interface BossBar {
|
||||
*/
|
||||
void setStyle(BossStyle style);
|
||||
|
||||
/**
|
||||
* Get the bosbar style
|
||||
*
|
||||
* @return BossStyle
|
||||
*/
|
||||
BossStyle getStyle();
|
||||
|
||||
/**
|
||||
* Show the bossbar to a player.
|
||||
*
|
||||
|
@ -20,16 +20,11 @@ public class ViaVersionCommand implements CommandExecutor {
|
||||
|
||||
private final ViaVersionPlugin plugin;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if (sender.hasPermission("viaversion.admin")) {
|
||||
if (args.length == 0) {
|
||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
||||
sender.sendMessage(color("&6Commands:"));
|
||||
sender.sendMessage(color("&2/viaversion list &7- &6Shows lists of all 1.9 clients and 1.8 clients."));
|
||||
sender.sendMessage(color("&2/viaversion autoteam &7- &6Toggle automatically teaming to prevent colliding."));
|
||||
sender.sendMessage(color("&2/viaversion dontbugme &7- &6Toggle checking for updates."));
|
||||
sendHelp(sender);
|
||||
} else if (args.length == 1) {
|
||||
if (args[0].equalsIgnoreCase("list")) {
|
||||
List<String> portedPlayers = new ArrayList<>();
|
||||
@ -59,11 +54,7 @@ public class ViaVersionCommand implements CommandExecutor {
|
||||
sender.sendMessage(color("&6We will " + (newValue ? "&aautomatically team players" : "&cno longer auto team players")));
|
||||
sender.sendMessage(color("&6All players will need to re-login for the change to take place."));
|
||||
} else {
|
||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
||||
sender.sendMessage(color("&6Commands:"));
|
||||
sender.sendMessage(color("&2/viaversion list &7- &6Shows lists of all 1.9 clients and 1.8 clients."));
|
||||
sender.sendMessage(color("&2/viaversion autoteam &7- &6Toggle automatically teaming to prevent colliding."));
|
||||
sender.sendMessage(color("&2/viaversion dontbugme &7- &6Toggle checking for updates."));
|
||||
sendHelp(sender);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,6 +62,15 @@ public class ViaVersionCommand implements CommandExecutor {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void sendHelp(CommandSender sender){
|
||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
||||
sender.sendMessage(color("&6Commands:"));
|
||||
sender.sendMessage(color("&2/viaversion list &7- &6Shows lists of all 1.9 clients and 1.8 clients."));
|
||||
sender.sendMessage(color("&2/viaversion debug &7- &6Toggle debug mode"));
|
||||
sender.sendMessage(color("&2/viaversion autoteam &7- &6Toggle automatically teaming to prevent colliding."));
|
||||
sender.sendMessage(color("&2/viaversion dontbugme &7- &6Toggle checking for updates."));
|
||||
}
|
||||
|
||||
public String color(String string) {
|
||||
return string.replace("&", "§");
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren