You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.5 KiB
40 lines
1.5 KiB
package cx.sfy.TheBridge.menus.particle;
|
|
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.Material;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.inventory.Inventory;
|
|
import org.bukkit.inventory.ItemStack;
|
|
|
|
import cx.sfy.TheBridge.Main;
|
|
import cx.sfy.TheBridge.utils.ItemBuilder;
|
|
|
|
public class TrailMenu {
|
|
Main plugin;
|
|
|
|
public TrailMenu(Main plugin) {
|
|
this.plugin = plugin;
|
|
}
|
|
|
|
public void createTrailMenu(Player p) {
|
|
Inventory inv = Bukkit.getServer().createInventory(null, plugin.getParticles().getInt("size"),
|
|
plugin.getParticles().get("title"));
|
|
ItemStack arrow = ItemBuilder.item(
|
|
Material.valueOf(plugin.getConfig().getString("shop.trails.type.arrow.icon")),
|
|
plugin.getConfig().getInt("shop.trails.type.arrow.amount"),
|
|
(short) plugin.getConfig().getInt("shop.trails.type.arrow.data"),
|
|
plugin.getLang().get("shop.trails.type.arrow.nameItem"),
|
|
plugin.getLang().get("shop.trails.type.arrow.loreItem"));
|
|
ItemStack feet = ItemBuilder.item(Material.valueOf(plugin.getConfig().getString("shop.trails.type.feet.icon")),
|
|
plugin.getConfig().getInt("shop.trails.type.feet.amount"),
|
|
(short) plugin.getConfig().getInt("shop.trails.type.feet.data"),
|
|
plugin.getLang().get("shop.trails.type.feet.nameItem"),
|
|
plugin.getLang().get("shop.trails.type.feet.loreItem"));
|
|
|
|
inv.setItem(plugin.getConfig().getInt("shop.trails.type.arrow.slot"), arrow);
|
|
inv.setItem(plugin.getConfig().getInt("shop.trails.type.feet.slot"), feet);
|
|
|
|
p.openInventory(inv);
|
|
}
|
|
|
|
}
|