Icon Menu

Discussion in 'Resources' started by nisovin, Oct 30, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Mycrowut

    I am extremely confused about some of the help because a lot of the stuff isn't made clear :(
    My code allows the items in the inventory to be moved around, could someone please tell me why its doing this along with a solution?
    Main:
    Code:java
    1. package net.blockie.iconmenu;
    2.  
    3. import java.util.logging.Logger;
    4.  
    5. import org.bukkit.Bukkit;
    6. import org.bukkit.Material;
    7. import org.bukkit.command.Command;
    8. import org.bukkit.command.CommandSender;
    9. import org.bukkit.entity.Player;
    10. import org.bukkit.event.EventHandler;
    11. import org.bukkit.event.EventPriority;
    12. import org.bukkit.event.Listener;
    13. import org.bukkit.inventory.ItemStack;
    14. import org.bukkit.plugin.Plugin;
    15. import org.bukkit.plugin.PluginManager;
    16. import org.bukkit.plugin.java.JavaPlugin;
    17.  
    18. public class Main extends JavaPlugin implements Listener{
    19. public final Logger logger = Logger.getLogger("Minecraft");
    20.  
    21. public Plugin plugin;
    22. public void plugin(Plugin instance) {
    23. this.plugin = instance;
    24. }
    25. @Override
    26. public void onEnable(){
    27. PluginManager pm = Bukkit.getPluginManager();
    28. pm.registerEvents(new IconMenu(), this);
    29. this.logger.info("IconMenu is now enabled.");
    30. }
    31. @Override
    32. public void onDisable(){
    33. this.logger.info("IconMenu is now disabled.");
    34. }
    35.  
    36. @EventHandler(priority = EventPriority.HIGHEST)
    37. public boolean onCommand(final CommandSender sender, Command cmd, String commandLabel, final String[] args) {
    38. if(commandLabel.equalsIgnoreCase("sup")){
    39.  
    40. IconMenu menu = new IconMenu("My Fancy Menu", 9, new IconMenu.OptionClickEventHandler() {
    41. @Override
    42. public void onOptionClick(IconMenu.OptionClickEvent event) {
    43. Player clicker = event.getPlayer(); //Get the player who clicked
    44. String name = event.getName(); //Returns the display name of the item the player clicked
    45. event.setWillClose(true); //Will close the inventory when they click on an item
    46. }
    47. }, plugin)
    48. .setOption(3, new ItemStack(Material.APPLE, 1), "Food", "The food is delicious")
    49. .setOption(4, new ItemStack(Material.IRON_SWORD, 1), "Weapon", "Weapons are for awesome people")
    50. .setOption(5, new ItemStack(Material.EMERALD, 1), "Money", "Money brings happiness");
    51. Player p = (Player) sender;
    52. menu.open(p);
    53. }
    54.  
    55.  
    56. return false;
    57.  
    58. }
    59. }
    60.  
     
  2. Offline

    Retherz_

    i got an error
    Code:
    java.lang.NullPointerException
            at net.mercilessmc.MKits.IconMenu.<init>(IconMenu.java:38)
            at net.mercilessmc.MKits.EventListeners.PlayerSpawn.<init>(PlayerSpawn.j
    ava:32)
            at net.mercilessmc.MKits.Main.onEnable(Main.java:78)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
    .java:457)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
    r.java:381)
            at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.jav
    a:282)
            at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.
    java:264)
            at net.minecraft.server.v1_6_R2.MinecraftServer.l(MinecraftServer.java:3
    13)
            at net.minecraft.server.v1_6_R2.MinecraftServer.f(MinecraftServer.java:2
    90)
            at net.minecraft.server.v1_6_R2.MinecraftServer.a(MinecraftServer.java:2
    50)
            at net.minecraft.server.v1_6_R2.DedicatedServer.init(DedicatedServer.jav
    a:151)
            at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java
    :391)
            at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:5
    82)
     
  3. Offline

    Samthelord1

    desht you're a known genious :p gotta say you've been extremely helpful to people in this thread, I'm just wondering does the format of the OP still work or have some of the classes changed?
     
  4. Offline

    desht

    Hi, I'm pretty sure the code in the OP is still fully functional. I'll leave it to nisovin to confirm that, though :)
     
  5. Offline

    XrusherX

    I am having an issue and i don't know what's wrong
    Main:
    Code:
    package me.funnybuilder456.iconmenu;
     
    import org.bukkit.Bukkit;
    import org.bukkit.Material;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Main extends JavaPlugin {
        public static IconMenu im;
     
        @Override
        public void onEnable() {
            PluginManager pm = Bukkit.getPluginManager();
            pm.registerEvents(im, this);
        }
     
        public boolean onCommand(CommandSender s, Command cmd, String cl,
                String[] args) {
            Player p = (Player) s;
     
            if (cl.equalsIgnoreCase("imenu")) {
                menu.open(p);
            }
            return false;
        }
        IconMenu menu = new IconMenu("My Fancy Menu", 9, new IconMenu.OptionClickEventHandler() {
            @Override
            public void onOptionClick(IconMenu.OptionClickEvent event) {
            Player clicker = event.getPlayer(); //Get the player who clicked
            String name = event.getName(); //Returns the display name of the item the player clicked
            event.setWillClose(true); //Will close the inventory when they click on an item
            }
            }, IconMenu.plugin)
            .setOption(3, new ItemStack(Material.APPLE, 1), "Food", "The food is delicious")
            .setOption(4, new ItemStack(Material.IRON_SWORD, 1), "Weapon", "Weapons are for awesome people")
            .setOption(5, new ItemStack(Material.EMERALD, 1), "Money", "Money brings happiness");
    }
    IconMenu:
    Code:
    package me.funnybuilder456.iconmenu;
     
    import java.util.Arrays;
     
    import org.bukkit.Bukkit;
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.EventPriority;
    import org.bukkit.event.HandlerList;
    import org.bukkit.event.Listener;
    import org.bukkit.event.inventory.InventoryClickEvent;
    import org.bukkit.event.inventory.InventoryType;
    import org.bukkit.inventory.Inventory;
    import org.bukkit.inventory.ItemStack;
    import org.bukkit.inventory.meta.ItemMeta;
    import org.bukkit.plugin.Plugin;
     
    public class IconMenu implements Listener {
     
        private String name;
        private int size;
        private OptionClickEventHandler handler;
     
        private String[] optionNames;
        private ItemStack[] optionIcons;
       
        public static Plugin plugin;
     
        public IconMenu(Main instance) {
            plugin = instance;
        }
     
        public IconMenu(String name, int size, OptionClickEventHandler handler, Plugin plugin) {
            this.name = name;
            this.size = size;
            this.handler = handler;
            this.plugin = plugin;
            this.optionNames = new String[size];
            this.optionIcons = new ItemStack[size];
            plugin.getServer().getPluginManager().registerEvents(this, plugin);
        }
     
        public IconMenu setOption(int position, ItemStack icon, String name, String... info) {
            optionNames[position] = name;
            optionIcons[position] = setItemNameAndLore(icon, name, info);
            return this;
        }
     
        public void open(Player player) {
            Inventory inventory = Bukkit.createInventory(player, size, name);
            for (int i = 0; i < optionIcons.length; i++) {
                if (optionIcons[i] != null) {
                    inventory.setItem(i, optionIcons[i]);
                }
            }
            player.openInventory(inventory);
        }
     
        public void destroy() {
            HandlerList.unregisterAll(this);
            handler = null;
            plugin = null;
            optionNames = null;
            optionIcons = null;
        }
     
        @EventHandler(priority = EventPriority.MONITOR)
        void onInventoryClick(InventoryClickEvent event) {
            final Player p = (Player) event.getWhoClicked();
            if (event.getSlotType() == InventoryType.SlotType.OUTSIDE) {
                event.setCancelled(true);
                p.updateInventory();
                event.getWhoClicked().closeInventory();
                destroy();
            }
            if (event.getInventory().getTitle().equals(name)) {
                event.setCancelled(true);
                int slot = event.getRawSlot();
                if (slot >= 0 && slot < size && optionNames[slot] != null) {
                    Plugin plugin = this.plugin;
                    OptionClickEvent e = new OptionClickEvent((Player) event.getWhoClicked(), slot, optionNames[slot]);
                    handler.onOptionClick(e);
                    if (e.willClose()) {
                        p.closeInventory();
                        /*Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                        public void run() {
                        p.closeInventory();
                        }
                        }, 1);
                        }*/
                        if (e.willDestroy()) {
                            destroy();
                        }
                    }
                }
            }
        }
       
        public interface OptionClickEventHandler {
            public void onOptionClick(OptionClickEvent event);     
        }
       
        public class OptionClickEvent {
            private Player player;
            private int position;
            private String name;
            private boolean close;
            private boolean destroy;
         
            public OptionClickEvent(Player player, int position, String name) {
                this.player = player;
                this.position = position;
                this.name = name;
                this.close = true;
                this.destroy = false;
            }
         
            public Player getPlayer() {
                return player;
            }
         
            public int getPosition() {
                return position;
            }
         
            public String getName() {
                return name;
            }
         
            public boolean willClose() {
                return close;
            }
         
            public boolean willDestroy() {
                return destroy;
            }
         
            public void setWillClose(boolean close) {
                this.close = close;
            }
         
            public void setWillDestroy(boolean destroy) {
                this.destroy = destroy;
            }
        }
     
        private ItemStack setItemNameAndLore(ItemStack item, String name, String[] lore) {
            ItemMeta im = item.getItemMeta();
                im.setDisplayName(name);
                im.setLore(Arrays.asList(lore));
            item.setItemMeta(im);
            return item;
        }
    } 
    
    Error:
    Code:
    Error occurred while enabling IconMenu v1.0 (Is it up to date?)
    java.lang.IllegalArgumentException: Listener can not be null
        at org.apache.commons.lang.Validate.notNull(Validate.java:203)
        at org.bukkit.plugin.java.JavaPluginLoader.createRegisteredListeners(JavaPluginLoader.java:361)
        at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:502)
        at me.funnybuilder456.iconmenu.Main.onEnable(Main.java:18)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
        at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.java:282)
        at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.java:264)
        at org.bukkit.craftbukkit.v1_6_R2.CraftServer.reload(CraftServer.java:605)
        at org.bukkit.Bukkit.reload(Bukkit.java:275)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189)
        at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523)
        at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchServerCommand(CraftServer.java:512)
        at net.minecraft.server.v1_6_R2.DedicatedServer.ar(DedicatedServer.java:262)
        at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:227)
        at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
        at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
        at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
    
     
  6. Offline

    RobotJuice

    Because this isnt being called
    Code:
    IconMenu menu = new IconMenu("My Fancy Menu", 9, new IconMenu.OptionClickEventHandler() {
            @Override
            public void onOptionClick(IconMenu.OptionClickEvent event) {
            Player clicker = event.getPlayer(); //Get the player who clicked
            String name = event.getName(); //Returns the display name of the item the player clicked
            event.setWillClose(true); //Will close the inventory when they click on an item
            }
            }, IconMenu.plugin)
            .setOption(3, new ItemStack(Material.APPLE, 1), "Food", "The food is delicious")
            .setOption(4, new ItemStack(Material.IRON_SWORD, 1), "Weapon", "Weapons are for awesome people") 
            .setOption(5, new ItemStack(Material.EMERALD, 1), "Money", "Money brings happiness");
    add it to the onenable function.
     
  7. Could you please make a YouTube tutorial and link it to me? I'm new at the whole plugin thing and I can badly get by coding a YAML file. If you did it would be much appreciated! :)
     
  8. Offline

    Ultimate_n00b

    ... watch YouTube videos on Java. Then this will all make sense.
     
    SoS_Dylan and bobacadodl like this.
  9. Offline

    chasechocolate

    I seem to have an error... I don't really know how to better explain it than all items of the same type get the same name. Even using debug messages prints the correct name, however the item names are the same. Here is a snippet of my code that may be causing the error:
    Code:java
    1. int ironPos = 0;
    2. int goldPos = 9;
    3. int emeraldPos = 18;
    4. int diamondPos = 24;
    5.  
    6. for(KitType kit : KitType.values()){
    7. boolean hasKit = kit.hasKit(player);
    8. String name = kit.getName();
    9. KitPerm perm = kit.getPerm();
    10. ItemStack icon = perm.toItemStack();
    11. String hasKitString = ((hasKit || perm == KitPerm.IRON) ? ChatColor.GREEN + "You own this kit." : ChatColor.RED + "You don't own this kit.");
    12. int itemPos = 0;
    13.  
    14. if(perm == KitPerm.IRON){
    15. itemPos = ironPos;
    16. ironPos += 1;
    17. } else if(perm == KitPerm.GOLD){
    18. itemPos = goldPos;
    19. goldPos += 1;
    20. } else if(perm == KitPerm.EMERALD){
    21. itemPos = emeraldPos;
    22. emeraldPos += 1;
    23. } else if(perm == KitPerm.DIAMOND){
    24. itemPos = diamondPos;
    25. diamondPos += 1;
    26. }
    27.  
    28. menu.setOption(itemPos, icon, (hasKit ? ChatColor.GREEN : ChatColor.RED) + "" + ChatColor.BOLD + name, ChatColor.DARK_PURPLE + "Click to select kit.", hasKitString);
    29. }
     
  10. Offline

    XrusherX

    I get a red line underneath the menu.open(p)
     
  11. Offline

    RobotJuice

    Because "menu" was only being declared in the onEnable function.

    this should fix it.
    Code:
    IconMenu menu;
    onEnable() {
    menu = new IconMenu("My Fancy Menu", 9, new IconMenu.OptionClickEventHandler() {
            @Override
            public void onOptionClick(IconMenu.OptionClickEvent event) {
            Player clicker = event.getPlayer(); //Get the player who clicked
            String name = event.getName(); //Returns the display name of the item the player clicked
            event.setWillClose(true); //Will close the inventory when they click on an item
            }
            }, IconMenu.plugin)
            .setOption(3, new ItemStack(Material.APPLE, 1), "Food", "The food is delicious")
            .setOption(4, new ItemStack(Material.IRON_SWORD, 1), "Weapon", "Weapons are for awesome people")
            .setOption(5, new ItemStack(Material.EMERALD, 1), "Money", "Money brings happiness");
    }
    
     
  12. Offline

    XrusherX

    Wow i never thought of that....
     
  13. Offline

    bloodless2010

    I seem to be having a small problem;
    If a user clicks an item once, it says, You have chosen 'Item', one time, but on the second click, it will send it twice, on the third time 3 times, and fourth time fourth times ect.. How do I make it only run once each time?
     
  14. Offline

    bloodless2010

    If you open a iconmenu twice in teh same tick you can take the items out. Does aynone have any code to fix this
     
  15. Tnx nisovin i actually made an in-game donate shop with this and actually was just about to make a shop plugin with this. ;)
     
  16. Offline

    Ultimate_n00b

    I actually was working on an improved version of this - I'll try to release it if anyone wants it.
     
  17. Offline

    DrTURTLE2

    Ultimate_n00b

    Please do, I need one like this for my kit plugin
     
  18. Offline

    Ultimate_n00b

    You could use the current one posted on this thread for now.. it works fine.
     
  19. Offline

    bloodless2010

    Ultimate_n00b it doesn't.. the current one runs the event +1 every time (first time once it works;open the menu again and click sonething it will run twice) and if you open it twice in the same tick it causes users to be able to take stuff out of it.
     
  20. Offline

    Ultimate_n00b

    Hmph, fine. Here's an early version of it (not finished at all, but I suppose it works):

    Code:java
    1. package me.ultimate.SRPG;
    2.  
    3. import java.util.ArrayList;
    4. import java.util.Arrays;
    5. import java.util.List;
    6.  
    7. import org.bukkit.Bukkit;
    8. import org.bukkit.Material;
    9. import org.bukkit.entity.Player;
    10. import org.bukkit.event.EventHandler;
    11. import org.bukkit.event.Listener;
    12. import org.bukkit.event.inventory.InventoryClickEvent;
    13. import org.bukkit.event.inventory.InventoryCloseEvent;
    14. import org.bukkit.event.server.PluginDisableEvent;
    15. import org.bukkit.inventory.Inventory;
    16. import org.bukkit.inventory.ItemStack;
    17. import org.bukkit.inventory.meta.ItemMeta;
    18.  
    19. public class IconMenu implements Listener {
    20.  
    21. private String name;
    22. private int size;
    23. private onClick click;
    24. List<String> viewing = new ArrayList<String>();
    25.  
    26. private ItemStack[] items;
    27.  
    28. public IconMenu(String name, int size, onClick click) {
    29. this.name = name;
    30. this.size = size * 9;
    31. items = new ItemStack[this.size];
    32. this.click = click;
    33. Bukkit.getPluginManager().registerEvents(this, Bukkit.getPluginManager().getPlugins()[0]);
    34. }
    35.  
    36. @EventHandler
    37. public void onPluginDisable(PluginDisableEvent event) {
    38. for (Player p : this.getViewers())
    39. close(p);
    40. }
    41.  
    42. public IconMenu open(Player p) {
    43. p.openInventory(getInventory(p));
    44. viewing.add(p.getName());
    45. return this;
    46. }
    47.  
    48. private Inventory getInventory(Player p) {
    49. Inventory inv = Bukkit.createInventory(p, size, name);
    50. for (int i = 0; i < items.length; i++)
    51. if (items[i] != null)
    52. inv.setItem(i, items[i]);
    53. return inv;
    54. }
    55.  
    56. public IconMenu close(Player p) {
    57. if (p.getOpenInventory().getTitle().equals(name))
    58. p.closeInventory();
    59. return this;
    60. }
    61.  
    62. public List<Player> getViewers() {
    63. List<Player> viewers = new ArrayList<Player>();
    64. for (String s : viewing)
    65. viewers.add(Bukkit.getPlayer(s));
    66. return viewers;
    67. }
    68.  
    69. @EventHandler
    70. public void onInventoryClick(InventoryClickEvent event) {
    71. if (viewing.contains(event.getWhoClicked().getName())) {
    72. event.setCancelled(true);
    73. Player p = (Player) event.getWhoClicked();
    74. Row row = getRowFromSlot(event.getSlot());
    75. if (!click.click(p, this, row, event.getSlot() - row.getRow() * 9, event.getCurrentItem()))
    76. close(p);
    77. }
    78. }
    79.  
    80. @EventHandler
    81. public void onInventoryClose(InventoryCloseEvent event) {
    82. if (viewing.contains(event.getPlayer().getName()))
    83. viewing.remove(event.getPlayer().getName());
    84. }
    85.  
    86. public IconMenu addButton(Row row, int position, ItemStack item, String name, String... lore) {
    87. items[row.getRow() * 9 + position] = getItem(item, name, lore);
    88. return this;
    89. }
    90.  
    91. public Row getRowFromSlot(int slot) {
    92. return new Row(slot / 9, items);
    93. }
    94.  
    95. public Row getRow(int row) {
    96. return new Row(row, items);
    97. }
    98.  
    99. public interface onClick {
    100. public abstract boolean click(Player clicker, IconMenu menu, Row row, int slot, ItemStack item);
    101. }
    102.  
    103. public class Row {
    104. private ItemStack[] rowItems = new ItemStack[9];
    105. int row;
    106.  
    107. public Row(int row, ItemStack[] items) {
    108. this.row = row;
    109. int j = 0;
    110. for (int i = (row * 9); i < (row * 9) + 9; i++) {
    111. rowItems[j] = items[i];
    112. j++;
    113. }
    114. }
    115.  
    116. public ItemStack[] getRowItems() {
    117. return rowItems;
    118. }
    119.  
    120. public ItemStack getRowItem(int item) {
    121. return rowItems[item] == null ? new ItemStack(Material.AIR) : rowItems[item];
    122. }
    123.  
    124. public int getRow() {
    125. return row;
    126. }
    127. }
    128.  
    129. private ItemStack getItem(ItemStack item, String name, String... lore) {
    130. ItemMeta im = item.getItemMeta();
    131. im.setDisplayName(name);
    132. im.setLore(Arrays.asList(lore));
    133. item.setItemMeta(im);
    134. return item;
    135. }
    136.  
    137. }[/i][/i][/i]


    Example usage:

    Code:java
    1. IconMenu menu = new IconMenu("IconMenu", 2, new onClick() {
    2. @Override
    3. public boolean click(Player p, IconMenu menu, Row row, int slot, ItemStack item) {
    4. if(row.getRow() == 1){
    5. Bukkit.broadcastMessage(row.getRowItem(slot).getType().name());
    6. }
    7. return true;
    8. }
    9. });
    10. menu.addButton(menu.getRow(1), 0, new ItemStack(Material.STONE), "Stone Button ;)");
    11. menu.addButton(menu.getRow(1), 1, new ItemStack(Material.WOOD), "Wood Button ;)");
    12. menu.addButton(menu.getRow(1), 2, new ItemStack(Material.DIAMOND), "Diamond Button ;)");
    13. menu.addButton(menu.getRow(1), 3, new ItemStack(Material.GOLD_BLOCK), "Gold Button ;)");
    14. menu.addButton(menu.getRow(1), 4, new ItemStack(Material.IRON_BLOCK), "Iron Button ;)");
    15. menu.addButton(menu.getRow(1), 5, new ItemStack(Material.OBSIDIAN), "Obby Button ;)");
    16. menu.addButton(menu.getRow(1), 6, new ItemStack(Material.ANVIL), "Anvil Button ;)");
    17. menu.addButton(menu.getRow(1), 7, new ItemStack(Material.STONE_BUTTON), "Button Button ;)");
    18. menu.addButton(menu.getRow(1), 8, new ItemStack(Material.PORTAL), "Portal Button ;)");
    19. menu.open(p.getPlayer());


    This uses a new slot selector. Instead of doing item 14 (being the 5th item in the second row) you would get Row 2, and then get the 5th item. When adding a button, you can use an Array or a single string to add lore.
     
    bloodless2010 likes this.
  21. Offline

    chasechocolate

    RobotJuice likes this.
  22. Offline

    Ultimate_n00b

    Since I don't want to ruin the formatting, I'll make a double post (sorry!).

    I forgot to mention two things:
    1. When defining the amount of rows, I said 2. Why? Because I wanted to make two rows. Unlike in the original IconMenu, you don't put the amount of slots.
    2. This is the only spot where I don't start at 0. If you are getting a row, row 0 in code is row 1 and such. This is because java itself starts at 0.
     
  23. Offline

    bloodless2010

  24. Offline

    chasechocolate

    bloodless2010 I'm not sure. Just don't open it twice in the same tick :p
     
  25. Offline

    bloodless2010

    chasechocolate But users can open it twice in the same click if they lag and open it twice and it submits the code at the same time/tick, it will cause a dupe bug I no want
     
  26. Offline

    Ultimate_n00b

    Try using mine?
     
  27. Offline

    bloodless2010

  28. Offline

    turt2live

    Then it needs to be reported on the Leaky tracker with proficient proof that cancelling the event does not work.
     
    Ultimate_n00b likes this.
  29. Offline

    PizzaPixel

    How to I make when I right click an item the icon menu pops up and how do I make the blocks or item in the icon menu execute a command desht MisterErwin
     
  30. Offline

    Compressions

    I am also having an issue with output duplication. If I wanted a message sent to the player who clicked, each click, the message would be duplicated by one more than the time before. If anyone can fix this, that would be awesome.
     
Thread Status:
Not open for further replies.

Share This Page