Formatting
This commit is contained in:
1 parent
22d55cd3ec
commit
311c4d5ae6
4 files changed
+16
-18
No files matched your search
@@ -113,9 +113,8 @@ public class BountyAddCmd {
|
||||
final double maximum = plugin.getConfig().getDouble("bounty-maximum", 1000000.0);
|
||||
if (parsedAmount > maximum) {
|
||||
|
||||
UtilitiesOG.trueogMessage(setter,
|
||||
plugin.getLang().getColored("command.bounty.set.over-maximum").replace("{maximum}",
|
||||
String.valueOf(maximum)));
|
||||
UtilitiesOG.trueogMessage(setter, plugin.getLang().getColored("command.bounty.set.over-maximum")
|
||||
.replace("{maximum}", String.valueOf(maximum)));
|
||||
return true;
|
||||
|
||||
}
|
||||
@@ -152,12 +151,12 @@ public class BountyAddCmd {
|
||||
|
||||
if (plugin.getConfig().getBoolean("bounty-placed-announce", true)) {
|
||||
|
||||
final String announce = plugin.getLang().getColored("command.bounty.add.announce").replace("{amount}",
|
||||
addedDisplay).replace("{target}", targetDisplay).replace("{total}", totalDisplay)
|
||||
.replace("{player}", setterDisplay);
|
||||
final String announce = plugin.getLang().getColored("command.bounty.add.announce")
|
||||
.replace("{amount}", addedDisplay).replace("{target}", targetDisplay)
|
||||
.replace("{total}", totalDisplay).replace("{player}", setterDisplay);
|
||||
|
||||
Bukkit.getOnlinePlayers().forEach(player -> UtilitiesOG.trueogMessage(player, PlayerBountiesOG.getPrefix()
|
||||
+ "&a" + announce));
|
||||
Bukkit.getOnlinePlayers().forEach(
|
||||
player -> UtilitiesOG.trueogMessage(player, PlayerBountiesOG.getPrefix() + "&a" + announce));
|
||||
|
||||
}
|
||||
|
||||
@@ -203,7 +202,8 @@ public class BountyAddCmd {
|
||||
return false;
|
||||
|
||||
}
|
||||
// TODO: Remove PlayerNotOnlineException catch block after next DiamondBank-OG update.
|
||||
// TODO: Remove PlayerNotOnlineException catch block after next DiamondBank-OG
|
||||
// update.
|
||||
catch (PlayerNotOnlineException temporaryPlayerNotOnlineError) {
|
||||
|
||||
plugin.getLogger().warning("Player " + setter.getName()
|
||||
|
||||
@@ -266,8 +266,7 @@ public class MainBountyGui extends GUIBase {
|
||||
}
|
||||
|
||||
item.lore(lore);
|
||||
item.setButton(new GUIButton()
|
||||
{
|
||||
item.setButton(new GUIButton() {
|
||||
|
||||
@Override
|
||||
public boolean leftClick() {
|
||||
@@ -316,8 +315,8 @@ public class MainBountyGui extends GUIBase {
|
||||
final String targetName = StringUtils.defaultIfBlank(entry.targetName(), "Unknown Player");
|
||||
plugin.getBountyIncreasePromptListener().prompt(viewer.getUniqueId(), entry.targetUuid(), targetName);
|
||||
|
||||
final String promptMessage = plugin.getLang().getColored("command.bounty.add.prompt")
|
||||
.replace("{target}", safeDisplayName(entry.displayName()));
|
||||
final String promptMessage = plugin.getLang().getColored("command.bounty.add.prompt").replace("{target}",
|
||||
safeDisplayName(entry.displayName()));
|
||||
UtilitiesOG.trueogMessage(viewer, promptMessage);
|
||||
|
||||
viewer.closeInventory();
|
||||
|
||||
@@ -247,8 +247,8 @@ public class BountyHeadListener implements Listener {
|
||||
final UUID uuid = parseUuid(targetUuid);
|
||||
final String playerDisplay = formatLuckPermsDisplay(uuid, targetName);
|
||||
final String diamonds = formatDiamonds(bountyAmount);
|
||||
player.sendActionBar(UtilitiesOG.trueogColorize("&c" + playerDisplay + "'s Head &7- &b" + diamonds
|
||||
+ " &bDiamonds"));
|
||||
player.sendActionBar(
|
||||
UtilitiesOG.trueogColorize("&c" + playerDisplay + "'s Head &7- &b" + diamonds + " &bDiamonds"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -78,9 +78,8 @@ public class BountyIncreasePromptListener implements Listener {
|
||||
}
|
||||
|
||||
pendingPrompts.remove(event.getPlayer().getUniqueId());
|
||||
plugin.getServer().getScheduler().runTask(plugin,
|
||||
() -> BountyAddCmd.addBounty(plugin, event.getPlayer(), prompt.targetUuid(), prompt.targetName(), amount,
|
||||
true));
|
||||
plugin.getServer().getScheduler().runTask(plugin, () -> BountyAddCmd.addBounty(plugin, event.getPlayer(),
|
||||
prompt.targetUuid(), prompt.targetName(), amount, true));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user