|
|
@ -55,6 +55,9 @@ public class Commands implements TabExecutor { |
|
|
|
putTotemCommand.apply("getfraction").apply((sender, arg) -> commandGetTotemFraction(sender)).accept( |
|
|
|
putTotemCommand.apply("getfraction").apply((sender, arg) -> commandGetTotemFraction(sender)).accept( |
|
|
|
"Totem of Undying: Get amount for mode: fraction." |
|
|
|
"Totem of Undying: Get amount for mode: fraction." |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
putTotemCommand.apply("get").apply((sender, arg) -> commandGetTotemMode(sender)).accept( |
|
|
|
|
|
|
|
"Totem of Undying: Get current mode." |
|
|
|
|
|
|
|
); |
|
|
|
commands.put( |
|
|
|
commands.put( |
|
|
|
Arrays.asList("log", "on"), |
|
|
|
Arrays.asList("log", "on"), |
|
|
|
Pair.pair((sender, arg) -> commandSetLogging(sender, true), "Enables Logging.") |
|
|
|
Pair.pair((sender, arg) -> commandSetLogging(sender, true), "Enables Logging.") |
|
|
@ -182,6 +185,11 @@ public class Commands implements TabExecutor { |
|
|
|
sender.sendMessage("Set Totem mode to " + mode.name()); |
|
|
|
sender.sendMessage("Set Totem mode to " + mode.name()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void commandGetTotemMode(CommandSender sender){ |
|
|
|
|
|
|
|
TotemManager.Mode mode = Sharehealth.Instance.getTotemManager().getMode(); |
|
|
|
|
|
|
|
sender.sendMessage("Current Totem mode: " + mode.name()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void commandSetTotemFraction(CommandSender sender, String amountStr){ |
|
|
|
private void commandSetTotemFraction(CommandSender sender, String amountStr){ |
|
|
|
if (!sender.hasPermission("sharehealth.totem")){ |
|
|
|
if (!sender.hasPermission("sharehealth.totem")){ |
|
|
|
sender.sendMessage("You don't have permissions for this command!"); |
|
|
|
sender.sendMessage("You don't have permissions for this command!"); |
|
|
|