Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-26 00:00:28 +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);
|
void setTitle(String title);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the current title
|
||||||
|
*
|
||||||
|
* @return the title
|
||||||
|
*/
|
||||||
|
String getTitle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the health
|
* Change the health
|
||||||
*
|
*
|
||||||
@ -21,11 +28,11 @@ public interface BossBar {
|
|||||||
void setHealth(float health);
|
void setHealth(float health);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the bossbar color
|
* Get the health
|
||||||
*
|
*
|
||||||
* @return
|
* @return float between 0F - 1F
|
||||||
*/
|
*/
|
||||||
BossColor getColor();
|
float getHealth();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Yay colors!
|
* Yay colors!
|
||||||
@ -34,6 +41,13 @@ public interface BossBar {
|
|||||||
*/
|
*/
|
||||||
void setColor(BossColor color);
|
void setColor(BossColor color);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the bossbar color
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BossColor getColor();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change the bosbar style
|
* Change the bosbar style
|
||||||
*
|
*
|
||||||
@ -41,6 +55,13 @@ public interface BossBar {
|
|||||||
*/
|
*/
|
||||||
void setStyle(BossStyle style);
|
void setStyle(BossStyle style);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the bosbar style
|
||||||
|
*
|
||||||
|
* @return BossStyle
|
||||||
|
*/
|
||||||
|
BossStyle getStyle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the bossbar to a player.
|
* Show the bossbar to a player.
|
||||||
*
|
*
|
||||||
|
@ -20,16 +20,11 @@ public class ViaVersionCommand implements CommandExecutor {
|
|||||||
|
|
||||||
private final ViaVersionPlugin plugin;
|
private final ViaVersionPlugin plugin;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
if (sender.hasPermission("viaversion.admin")) {
|
if (sender.hasPermission("viaversion.admin")) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
sendHelp(sender);
|
||||||
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."));
|
|
||||||
} else if (args.length == 1) {
|
} else if (args.length == 1) {
|
||||||
if (args[0].equalsIgnoreCase("list")) {
|
if (args[0].equalsIgnoreCase("list")) {
|
||||||
List<String> portedPlayers = new ArrayList<>();
|
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("&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."));
|
sender.sendMessage(color("&6All players will need to re-login for the change to take place."));
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(color("&aViaVersion &c" + ViaVersion.getInstance().getVersion()));
|
sendHelp(sender);
|
||||||
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."));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,6 +62,15 @@ public class ViaVersionCommand implements CommandExecutor {
|
|||||||
return false;
|
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) {
|
public String color(String string) {
|
||||||
return string.replace("&", "§");
|
return string.replace("&", "§");
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren