mirror of
https://github.com/songoda/EpicBuckets.git
synced 2024-11-14 14:25:29 +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")
|
@Subcommand("help")
|
||||||
@CatchUnknown @Default
|
@CatchUnknown @Default
|
||||||
public void doHelp(CommandSender sender) {
|
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")
|
@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) {
|
public static ItemStack setSubShopLore(ItemStack item, List<String> lore, SubShop subShop) {
|
||||||
ItemMeta im = item.getItemMeta();
|
ItemMeta im = item.getItemMeta();
|
||||||
List<String> newLore = new ArrayList<>();
|
List<String> newLore = new ArrayList<>();
|
||||||
lore.forEach(s -> newLore.add(ChatColor.translateAlternateColorCodes('&', s)));
|
lore.forEach(s -> newLore.add(ChatColor.translateAlternateColorCodes('&', s.replace("${price}", subShop.getPrice() + "").replace("${material}", subShop.getGenItem().getType().name()))));
|
||||||
newLore.forEach(s -> {
|
|
||||||
if (s.contains("${price}")) s.replace("${price}", subShop.getPrice() + "");
|
|
||||||
if (s.contains("${material}")) s.replace("${material}", subShop.getGenItem().getType().name());
|
|
||||||
});
|
|
||||||
im.setLore(newLore);
|
im.setLore(newLore);
|
||||||
item.setItemMeta(im);
|
item.setItemMeta(im);
|
||||||
return item;
|
return item;
|
||||||
|
Loading…
Reference in New Issue
Block a user