Spigot Mini-Blocks Library 1.3.5

Use this method to create tiny blocks or ground-laying items!

  1. _Ug

    _Ug

    _Ug submitted a new resource:

    Mini-Blocks Lib - Use this method to create tiny blocks or ground-laying items!

    Read more about this resource...
     
    • Like Like x 1
  2. No command´╝č
     
    • Like Like x 1
  3. It's an API :p
     
    • Like Like x 1
  4. Ok
     
  5. _Ug

    _Ug

    My bad, haha! I've never made one of these before so I just took a guess as what it might be-- thanks!
     
    • Like Like x 1
  6. thanks for plugin :)
     
    • Like Like x 1
  7. _Ug

    _Ug

    Not a single worry :)
     
    • Like Like x 1
  8. Great job :)
     
  9. _Ug

    _Ug

    _Ug updated Mini-Blocks API with a new update entry:

    Mini-Blocks API

    Read the rest of this update entry...
     
    • Like Like x 1
  10. I think i am going to make a plugin for this can u please teach me how to cancel the pickup ?
     
  11. _Ug

    _Ug

    It depends on what you mean by "pickup". If you are meaning right clicking it and obtaining the item in your inventory you can cancel the EntityInteractAtEntityEvent. This is not to be confused with the EntityInteractEntityEvent. Only the first of the two events will work.
     
    • Like Like x 1
  12. Thanks!!!
     
  13. _Ug

    _Ug

    _Ug updated Mini-Blocks API with a new update entry:

    MiniBlock

    Read the rest of this update entry...
     
  14. _Ug

    _Ug

    _Ug updated Mini-Blocks API with a new update entry:

    MiniBlock

    Read the rest of this update entry...
     
  15. _Ug

    _Ug

  16. how do u change if the item is a block or not? if it stays or not
     
  17. _Ug

    _Ug

    I assume you are referring to an older update. Currently it stays indefinitely and it knows if it is a block or not when you pass it an ItemStack.

    If you do want a delayed despawn on it you can simply schedule a Bukkit runnable directly after you initiate it and inside say (MiniBlock variable).remove();

    If you have more questions feel free to ask! :)
     
  18. tnx I am busy making a plugin with this
     
    • Like Like x 1
  19. How do you spawn the block?
    Code (Text):
    package me.egetheking.TestPlugin;

    import org.bukkit.Material;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Listener;
    import org.bukkit.inventory.ItemStack;

    import libs.MiniBlock;


    public class MiniBlocks implements Listener {
     
        Main main;
        public MiniBlocks(Main plugin) {
            plugin.getServer().getPluginManager().registerEvents(this, plugin);
            this.main = plugin; }
     
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if(sender instanceof Player) {
                Player player = (Player)sender;
                if(cmd.getName().equalsIgnoreCase("miniblock")); {
                    ItemStack im = new ItemStack(Material.WOOL);
                    MiniBlock block = new MiniBlock(player.getLocation(), im, 1);
                    player.sendMessage("There you go!");
                    return true;
                }
            }
            return false;
        }
    }
    Cant really figure it out. Adding the ItemStack to the inventory doesnt work either.

    BTW Im new to this so ples dont hate!
     
    #20 Egetheking, Jan 12, 2016
    Last edited: Jan 12, 2016