mirror of
https://github.com/songoda/EpicBuckets.git
synced 2024-11-14 06:17:09 +01:00
Fixed lore + help
This commit is contained in:
parent
c36ef93e95
commit
ce8d0c86ef
@ -29,8 +29,12 @@ public class CommandGenbucket extends BaseCommand {
|
||||
@Subcommand("help")
|
||||
@CatchUnknown @Default
|
||||
public void doHelp(CommandSender sender) {
|
||||
sender.sendMessage("&3&lEpicBuckets");
|
||||
|
||||
sender.sendMessage(ChatUtil.colorString("&3&lEpicBuckets"));
|
||||
sender.sendMessage(ChatUtil.colorString("&f/epicbuckets|eb help: &7shows this help"));
|
||||
sender.sendMessage(ChatUtil.colorString("&f/epicbuckets|eb reload: &7reloads the config"));
|
||||
sender.sendMessage(ChatUtil.colorString("&f/epicbuckets|eb shop: &7opens up the genbucket shop"));
|
||||
sender.sendMessage(ChatUtil.colorString("&f/epicbuckets|eb admin toggle: &7toggle your status to receive genbucket placement notifications"));
|
||||
sender.sendMessage(ChatUtil.colorString("&f/epicbuckets|eb admin panel: &7opens up the panel with all active genbuckets"));
|
||||
}
|
||||
|
||||
@Subcommand("shop")
|
||||
|
@ -0,0 +1,7 @@
|
||||
package com.songoda.epicbuckets.command;
|
||||
|
||||
public class GenbucketCommands {
|
||||
|
||||
protected
|
||||
|
||||
}
|
@ -45,11 +45,7 @@ public class InventoryHelper {
|
||||
public static ItemStack setSubShopLore(ItemStack item, List<String> lore, SubShop subShop) {
|
||||
ItemMeta im = item.getItemMeta();
|
||||
List<String> newLore = new ArrayList<>();
|
||||
lore.forEach(s -> newLore.add(ChatColor.translateAlternateColorCodes('&', s)));
|
||||
newLore.forEach(s -> {
|
||||
if (s.contains("${price}")) s.replace("${price}", subShop.getPrice() + "");
|
||||
if (s.contains("${material}")) s.replace("${material}", subShop.getGenItem().getType().name());
|
||||
});
|
||||
lore.forEach(s -> newLore.add(ChatColor.translateAlternateColorCodes('&', s.replace("${price}", subShop.getPrice() + "").replace("${material}", subShop.getGenItem().getType().name()))));
|
||||
im.setLore(newLore);
|
||||
item.setItemMeta(im);
|
||||
return item;
|
||||
|
Loading…
Reference in New Issue
Block a user