Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.wayzen;
- import java.util.Arrays;
- import org.bukkit.Bukkit;
- import org.bukkit.ChatColor;
- import org.bukkit.DyeColor;
- import org.bukkit.Material;
- import org.bukkit.SkullType;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.block.Action;
- import org.bukkit.event.player.PlayerInteractEvent;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.meta.ItemMeta;
- import org.bukkit.inventory.meta.SkullMeta;
- public class Inventory
- implements Listener
- {
- org.bukkit.inventory.Inventory inv = Bukkit.createInventory(null, 54, "�9�lMenu");
- public Inventory(Main main) {}
- public void Menu(Player p)
- {
- String player = p.getName();
- ItemStack practice = new ItemStack(Material.DIAMOND_SWORD);
- ItemStack faction = new ItemStack(Material.OBSIDIAN);
- ItemStack box = new ItemStack(Material.GOLD_SWORD);
- ItemStack rush = new ItemStack(Material.BED);
- ItemStack games = new ItemStack(Material.GRASS);
- ItemStack glassG = new ItemStack(Material.STAINED_GLASS_PANE, 1, DyeColor.GRAY.getData());
- ItemStack glassB = new ItemStack(Material.STAINED_GLASS_PANE, 1, DyeColor.LIGHT_BLUE.getData());
- ItemStack tete = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
- ItemStack tphub = new ItemStack(Material.ENDER_PORTAL_FRAME);
- ItemStack tpjump = new ItemStack(Material.DIAMOND_BOOTS);
- ItemStack tpvip = new ItemStack(Material.BEACON);
- ItemStack pref = new ItemStack(Material.FEATHER);
- ItemStack shop = new ItemStack(Material.GOLD_INGOT);
- ItemStack flag = new ItemStack(Material.BANNER, 1, DyeColor.RED.getData());
- ItemStack divergence = new ItemStack(Material.BLAZE_ROD);
- ItemStack uhc = new ItemStack(Material.GOLDEN_APPLE);
- ItemMeta factionm = faction.getItemMeta();
- ItemMeta practicem = practice.getItemMeta();
- ItemMeta boxm = box.getItemMeta();
- ItemMeta rushm = rush.getItemMeta();
- ItemMeta gamesm = games.getItemMeta();
- SkullMeta sm = (SkullMeta)tete.getItemMeta();
- ItemMeta glassGm = glassG.getItemMeta();
- ItemMeta glassBm = glassB.getItemMeta();
- ItemMeta tphubm = tphub.getItemMeta();
- ItemMeta tpjumpm = tpjump.getItemMeta();
- ItemMeta tpvipm = tpvip.getItemMeta();
- ItemMeta prefm = pref.getItemMeta();
- ItemMeta shopm = shop.getItemMeta();
- ItemMeta uhcm = uhc.getItemMeta();
- ItemMeta divergencem = divergence.getItemMeta();
- ItemMeta flagm = flag.getItemMeta();
- factionm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&c&lFaction"));
- faction.setItemMeta(factionm);
- practicem.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&b&lPractice"));
- practice.setItemMeta(practicem);
- boxm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&e&lFight&6&lBox"));
- box.setItemMeta(boxm);
- rushm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&9&lRush"));
- rush.setItemMeta(rushm);
- gamesm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&2&lLostGames"));
- games.setItemMeta(gamesm);
- sm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&8&l" + player));
- sm.setLore(Arrays.asList(new String[] { ChatColor.translateAlternateColorCodes('&', "&7Grade : &eJoueur") }));
- sm.setOwner(player);
- tete.setItemMeta(sm);
- glassBm.setDisplayName(" ");
- glassB.setItemMeta(glassBm);
- glassGm.setDisplayName(" ");
- glassG.setItemMeta(glassGm);
- tphubm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&7&lRetour au Hub"));
- tphub.setItemMeta(tphubm);
- tpjumpm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&b&lJump"));
- tpjump.setItemMeta(tpjumpm);
- tpvipm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&e&lZone VIP"));
- tpvip.setItemMeta(tpvipm);
- prefm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&7&lParam�tres"));
- pref.setItemMeta(prefm);
- shopm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6&lBoutique"));
- shopm.setLore(Arrays.asList(new String[] { ChatColor.translateAlternateColorCodes('&', "&7(&cstore.glady-network.eu&7)") }));
- shop.setItemMeta(shopm);
- uhcm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&6&lUHC Sc�naris�s"));
- uhcm.setLore(Arrays.asList(new String[] { ChatColor.translateAlternateColorCodes('&', "&7(&eParties disponibles qu'en cas d'Host&7)") }));
- uhc.setItemMeta(uhcm);
- divergencem.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&e&lDivergence"));
- divergence.setItemMeta(divergencem);
- flagm.setDisplayName(ChatColor.translateAlternateColorCodes('&', "&c&lFlag"));
- flag.setItemMeta(flagm);
- this.inv.setItem(0, glassB);
- this.inv.setItem(1, glassB);
- this.inv.setItem(2, glassB);
- this.inv.setItem(3, glassB);
- this.inv.setItem(4, tphub);
- this.inv.setItem(5, glassB);
- this.inv.setItem(6, glassB);
- this.inv.setItem(7, glassB);
- this.inv.setItem(8, glassB);
- this.inv.setItem(9, glassB);
- this.inv.setItem(10, practice);
- this.inv.setItem(11, glassG);
- this.inv.setItem(12, faction);
- this.inv.setItem(13, glassG);
- this.inv.setItem(14, flag);
- this.inv.setItem(15, glassG);
- this.inv.setItem(16, divergence);
- this.inv.setItem(17, glassB);
- this.inv.setItem(18, glassB);
- this.inv.setItem(19, box);
- this.inv.setItem(20, glassG);
- this.inv.setItem(21, rush);
- this.inv.setItem(22, glassG);
- this.inv.setItem(23, games);
- this.inv.setItem(24, glassG);
- this.inv.setItem(25, uhc);
- this.inv.setItem(26, glassB);
- this.inv.setItem(27, glassB);
- this.inv.setItem(28, glassB);
- this.inv.setItem(29, glassB);
- this.inv.setItem(30, glassB);
- this.inv.setItem(31, glassB);
- this.inv.setItem(32, glassB);
- this.inv.setItem(33, glassB);
- this.inv.setItem(34, glassB);
- this.inv.setItem(35, glassB);
- this.inv.setItem(36, glassB);
- this.inv.setItem(37, tpjump);
- this.inv.setItem(40, pref);
- this.inv.setItem(43, tpvip);
- this.inv.setItem(44, glassB);
- this.inv.setItem(45, tete);
- this.inv.setItem(46, glassB);
- this.inv.setItem(47, glassB);
- this.inv.setItem(48, glassB);
- this.inv.setItem(49, glassB);
- this.inv.setItem(50, glassB);
- this.inv.setItem(51, glassB);
- this.inv.setItem(52, glassB);
- this.inv.setItem(53, shop);
- p.openInventory(this.inv);
- }
- @EventHandler
- public void onPlayerInteract(PlayerInteractEvent e)
- {
- Player p = e.getPlayer();
- if ((p.getItemInHand().getType().equals(Material.COMPASS)) && (
- (e.getAction().equals(Action.RIGHT_CLICK_AIR)) || (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) || (e.getAction().equals(Action.LEFT_CLICK_AIR)) || (e.getAction().equals(Action.LEFT_CLICK_BLOCK)))) {
- Menu(p);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement