Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Command :
- package game.commands;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import game.inventory.SpendenInv;
- public class SpendenCommand implements CommandExecutor {
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
- Player p = (Player) sender;
- SpendenInv.openSpendenInv(p);
- return false;
- }
- }
- Inventar :
- package game.inventory;
- import java.util.ArrayList;
- import org.bukkit.Bukkit;
- import org.bukkit.Material;
- import org.bukkit.entity.Player;
- import org.bukkit.inventory.Inventory;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.meta.ItemMeta;
- public class SpendenInv {
- public static void openSpendenInv(Player player){
- Inventory spenden = Bukkit.createInventory(null, 9, "§3Spenden");
- //ItemStack
- ItemStack Ränge = new ItemStack(Material.PAPER);
- ItemStack Rechte = new ItemStack(Material.PAPER);
- ItemStack Level = new ItemStack(Material.PAPER);
- ItemStack Crates = new ItemStack(Material.PAPER);
- ItemStack Kits = new ItemStack(Material.PAPER);
- ItemStack Stuff = new ItemStack(Material.PAPER);
- ItemStack Adden = new ItemStack(Material.NETHER_STAR);
- //ItemMeta
- ItemMeta Rängem = Ränge.getItemMeta();
- ItemMeta Rechtem = Ränge.getItemMeta();
- ItemMeta Levelm = Ränge.getItemMeta();
- ItemMeta Cratesm = Ränge.getItemMeta();
- ItemMeta Kitsm = Ränge.getItemMeta();
- ItemMeta Stuffm = Ränge.getItemMeta();
- ItemMeta Addenm = Ränge.getItemMeta();
- //Lore
- ArrayList<String> Rängel = new ArrayList<>();
- Rängel.add("§7Vip = §310Euro");
- Rängel.add("§7Premium = §320Euro");
- Rängel.add("§7Premium+ = §330Euro");
- Rängem.setLore(Rängel);
- ArrayList<String> Rechtel = new ArrayList<>();
- Rechtel.add("§7Fly (Dauerhaft) = §320Euro");
- Rechtel.add("§7Umfrage (Dauerhaft) = §35Euro");
- Rängem.setLore(Rechtel);
- ArrayList<String> Levell = new ArrayList<>();
- Levell.add("§7500 = §35Euro");
- Levelm.setLore(Levell);
- ArrayList<String> Cratesl = new ArrayList<>();
- Cratesl.add("§7SkyVote 10x = §35Euro");
- Cratesl.add("§7SkyVote 20x = §310Euro");
- Cratesl.add("§7SkyPrem 10x = §35Euro");
- Cratesl.add("§7SkyPrem 20x = §310Euro");
- Cratesl.add("§7Premium+ 10x = §35Euro");
- Cratesl.add("§7Premium+ 20x = §310Euro");
- Cratesl.add("§7SkySpieler 10x = §35Euro");
- Cratesl.add("§7SkySpieler 20x = §310Euro");
- Cratesl.add("§7Rang 10x = §35Euro");
- Cratesl.add("§7Rang 20x = §310Euro");
- Cratesm.setLore(Cratesl);
- ArrayList<String> Kitsl = new ArrayList<>();
- Kitsl.add("§7Vip 10x = §35Euro");
- Kitsl.add("§7Premium 10x = §310Euro");
- Kitsl.add("§7Premium+ 20x = §320Euro");
- Kitsm.setLore(Kitsl);
- ArrayList<String> Stuffl = new ArrayList<>();
- Stuffl.add("§7Ghasttränen 10x64 = §35Euro");
- Stuffl.add("§7Nethersterne 10x64 = §35Euro");
- Stuffm.setLore(Stuffl);
- ArrayList<String> Addenl = new ArrayList<>();
- Addenl.add("§7Adde philli4000 in Skype");
- Addenl.add("§7um die Sachen zu Kaufen.");
- Addenm.setLore(Addenl);
- //DisplayName
- Rängem.setDisplayName("§3Ränge");
- Rechtem.setDisplayName("§3Rechte");
- Levelm.setDisplayName("§3Level");
- Cratesm.setDisplayName("§3Crates");
- Kitsm.setDisplayName("§3Kits");
- Stuffm.setDisplayName("§3Stuff");
- Addenm.setDisplayName("§3Skype");
- //SetItemMeta
- Ränge.setItemMeta(Rechtem);
- Rechte.setItemMeta(Rechtem);
- Level.setItemMeta(Levelm);
- Crates.setItemMeta(Cratesm);
- Kits.setItemMeta(Kitsm);
- Stuff.setItemMeta(Stuffm);
- Adden.setItemMeta(Addenm);
- spenden.setItem(0, Ränge);
- spenden.setItem(1, Rechte);
- spenden.setItem(2, Level);
- spenden.setItem(3, Crates);
- spenden.setItem(4, Kits);
- spenden.setItem(5, Stuff);
- spenden.setItem(9, Adden);
- player.openInventory(spenden);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement