mirror of
https://github.com/Xiao-MoMi/Custom-Nameplates.git
synced 2025-12-30 04:09:12 +00:00
2.2.3.3
This commit is contained in:
@@ -50,8 +50,7 @@ public abstract class AbstractMainCommand implements TabExecutor {
|
||||
return true;
|
||||
}
|
||||
return subCommand.onCommand(sender, argList.subList(1, argList.size()));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
AdventureUtils.sendMessage(sender, MessageManager.prefix + MessageManager.unavailableArgs);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -46,8 +46,7 @@ public class NameplatesListCommand extends AbstractSubCommand {
|
||||
stringJoiner.add(availableNameplate);
|
||||
}
|
||||
AdventureUtils.playerMessage(player, MessageManager.prefix + MessageManager.np_available.replace("{Nameplates}", stringJoiner.toString()));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
AdventureUtils.playerMessage(player, MessageManager.prefix + MessageManager.np_haveNone);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -272,7 +272,7 @@ public class ChatBubblesManager extends Function {
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
int finalI = i;
|
||||
String finalBubble = bubble;
|
||||
plugin.getScheduler().runTaskAsyncLater(() -> sendBubble(player, split[finalI], bubbleConfig, finalBubble), (long) i * coolDown / 50);
|
||||
plugin.getScheduler().runTaskAsyncLater(() -> sendBubble(player, split[finalI], bubbleConfig, finalBubble), (long) i * (coolDown / 50) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -226,8 +226,15 @@ public class NameplatePlaceholders extends PlaceholderExpansion {
|
||||
private String getVanilla(String param, Player player) {
|
||||
VanillaHud vanillaHud = placeholderManager.getVanillaHud(param);
|
||||
if (vanillaHud == null) return param + " NOT FOUND";
|
||||
double current = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, vanillaHud.papi()));
|
||||
double max = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, vanillaHud.max()));
|
||||
double current;
|
||||
double max;
|
||||
try {
|
||||
current= Double.parseDouble(PlaceholderAPI.setPlaceholders(player, vanillaHud.papi()));
|
||||
max = Double.parseDouble(PlaceholderAPI.setPlaceholders(player, vanillaHud.max()));
|
||||
} catch (NumberFormatException e) {
|
||||
current = 1;
|
||||
max = 1;
|
||||
}
|
||||
int point = (int) ((current / max) * 20);
|
||||
int full_amount = point / 2;
|
||||
int half_amount = point % 2;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.7 KiB |
@@ -20,7 +20,7 @@ messages:
|
||||
not-exist-nameplates: '<white>This nameplate does not exist!</white>'
|
||||
not-available-nameplates: '<white>This nameplate is currently not available!</white>'
|
||||
available-nameplates: '<white>Available nameplates: {Nameplates}.</white>'
|
||||
have-no-nameplates: '<white>You don''t have any nameplates yet'
|
||||
have-no-nameplates: '<white>You don''t have any nameplate yet'
|
||||
|
||||
equip-bubbles: '<white>Successfully equipped chatting bubbles {Bubble}</white>'
|
||||
force-equip-bubbles: '<white>Successfully equipped chatting bubbles {Bubbles}</white>'
|
||||
@@ -29,4 +29,4 @@ messages:
|
||||
not-exist-bubbles: '<white>This bubble does not exist!</white>'
|
||||
not-available-bubbles: '<white>This bubble is currently not available!</white>'
|
||||
available-bubbles: '<white>Available bubbles: {Bubbles}</white>'
|
||||
have-no-bubbles: '<white>You don''t have any bubbles yet'
|
||||
have-no-bubbles: '<white>You don''t have any bubble yet'
|
||||
Reference in New Issue
Block a user