Filled [Request] Magnet mode

Discussion in 'Archived: Plugin Requests' started by CatzFuriousSpeed, May 12, 2014.

  1. I was wondering if there was any plugins that automatically picks up items and places them in your inventory when you break a block?.
     
  2. Offline

    Onlineids

    do you want this for all items? All the time?
     
  3. Yes
     
  4. Offline

    Onlineids

    Only on block break?
     
  5. Mhm, :)
     
  6. Offline

    Onlineids

    [quote uid=90614414 name="CatzFuriousSpeed" post=2485267]Mhm, :)[/quote]

    I added so you get the xp as well assumed u would want that
    Download: <Edit by Moderator: Redacted mediafire url>
    Source:
    Show Spoiler
    Code:java
    1. package me.online.MagnetMode;
    2.  
    3. import java.util.Collection;
    4.  
    5. import org.bukkit.Bukkit;
    6. import org.bukkit.event.EventHandler;
    7. import org.bukkit.event.Listener;
    8. import org.bukkit.event.block.BlockBreakEvent;
    9. import org.bukkit.inventory.ItemStack;
    10. import org.bukkit.plugin.java.JavaPlugin;
    11.  
    12. public class Main extends JavaPlugin implements Listener{
    13. public void onEnable() {
    14. Bukkit.getServer().getPluginManager().registerEvents(this, this);
    15. }
    16. @EventHandler
    17. public void onBreak(BlockBreakEvent e){
    18. int xp = e.getExpToDrop();
    19. e.getPlayer().setExp(e.getPlayer().getExp() + xp);
    20. Collection<ItemStack> drops = e.getBlock().getDrops();
    21. for(ItemStack i : drops){
    22. e.getPlayer().getInventory().addItem(i);
    23. }
    24. }
    25.  
    26. }
    27.  
     
    Last edited by a moderator: Nov 2, 2016
  7. [quote uid=90875889 name="Onlineids" post=2485400]I added so you get the xp as well assumed u would want that
    Download: <Edit by Moderator: Redacted mediafire url>
    Source:
    Show Spoiler
    Code:java
    1. package me.online.MagnetMode;
    2.  
    3. import java.util.Collection;
    4.  
    5. import org.bukkit.Bukkit;
    6. import org.bukkit.event.EventHandler;
    7. import org.bukkit.event.Listener;
    8. import org.bukkit.event.block.BlockBreakEvent;
    9. import org.bukkit.inventory.ItemStack;
    10. import org.bukkit.plugin.java.JavaPlugin;
    11.  
    12. public class Main extends JavaPlugin implements Listener{
    13. public void onEnable() {
    14. Bukkit.getServer().getPluginManager().registerEvents(this, this);
    15. }
    16. @EventHandler
    17. public void onBreak(BlockBreakEvent e){
    18. int xp = e.getExpToDrop();
    19. e.getPlayer().setExp(e.getPlayer().getExp() + xp);
    20. Collection<ItemStack> drops = e.getBlock().getDrops();
    21. for(ItemStack i : drops){
    22. e.getPlayer().getInventory().addItem(i);
    23. }
    24. }
    25.  
    26. }
    27.  


    [/quote]

    Thanks a lot! :)

    [quote uid=90875889 name="Onlineids" post=2485400]I added so you get the xp as well assumed u would want that
    Download: <Edit by Moderator: Redacted mediafire url>
    Source:
    Show Spoiler
    Code:java
    1. package me.online.MagnetMode;
    2.  
    3. import java.util.Collection;
    4.  
    5. import org.bukkit.Bukkit;
    6. import org.bukkit.event.EventHandler;
    7. import org.bukkit.event.Listener;
    8. import org.bukkit.event.block.BlockBreakEvent;
    9. import org.bukkit.inventory.ItemStack;
    10. import org.bukkit.plugin.java.JavaPlugin;
    11.  
    12. public class Main extends JavaPlugin implements Listener{
    13. public void onEnable() {
    14. Bukkit.getServer().getPluginManager().registerEvents(this, this);
    15. }
    16. @EventHandler
    17. public void onBreak(BlockBreakEvent e){
    18. int xp = e.getExpToDrop();
    19. e.getPlayer().setExp(e.getPlayer().getExp() + xp);
    20. Collection<ItemStack> drops = e.getBlock().getDrops();
    21. for(ItemStack i : drops){
    22. e.getPlayer().getInventory().addItem(i);
    23. }
    24. }
    25.  
    26. }
    27.  


    [/quote]

    There is a problem it puts the item in the inventory but the item still remains on the floor.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 2, 2016
  8. Offline

    Onlineids

    [quote uid=90614414 name="CatzFuriousSpeed" post=2485421]There is a problem it puts the item in the inventory but the item still remains on the floor.[/quote]

    Oh yea sorry xD

    [quote uid=90614414 name="CatzFuriousSpeed" post=2485421]There is a problem it puts the item in the inventory but the item still remains on the floor.[/quote]

    <Edit by Moderator: Redacted mediafire url>

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 2, 2016
  9. [quote uid=90875889 name="Onlineids" post=2485443]<Edit by Moderator: Redacted mediafire url>

    Thanks! :)
     
    Last edited by a moderator: Nov 2, 2016
  10. Offline

    Onlineids

    [quote uid=90614414 name="CatzFuriousSpeed" post=2485449]Thanks! :)[/quote]

    Dont use that facepalm glitch with xp use this one:
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 2, 2016
  11. [quote uid=90875889 name="Onlineids" post=2485473]Dont use that facepalm glitch with xp use this one:
    <Edit by Moderator: Redacted mediafire url>

    Dang it xD I just downloaded it and put it in my server :p ah well thanks for the re-update.
     
    Last edited by a moderator: Nov 2, 2016
  12. Offline

    Alster551

    [quote uid=90875889 name="Onlineids" post=2485473]Dont use that facepalm glitch with xp use this one:
    <Edit by Moderator: Redacted mediafire url>

    You posted the same link...
     
    Last edited by a moderator: Nov 2, 2016
  13. Online

    timtower Administrator Administrator Moderator

    Same link with new file behind it.
     
  14. Offline

    Onlineids

    Magic
     
  15. [quote uid=90875889 name="Onlineids" post=2485443]<Edit by Moderator: Redacted mediafire url>

    Urm, are you also able to add autosmelting to it? I have autosmelting plugin it doesnt to be seeming to autosmelt, also people are able to break and pick up items from area's that are protected.
     
    Last edited by a moderator: Nov 2, 2016
  16. Offline

    Onlineids

    Yea thats the downfall I can't stop that another plugin is handling that
     
  17. Ah : / I guess Ill have to keep it removed then, thats sucky.
     
  18. Offline

    Onlineids

    Here I got an idea, give me a list of the blocks you want, it might take some time but that will be better, I could also add autosmelting if you give me the details ;)
     
  19. The only blocks I want are: Emeraldblock, emerald ore, diamond ore, diamondblock, gold ore, gold block, iron block, iron ore

    Whenever you get it done let me know on here. ^^

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  20. Offline

    Crud41

    CatzFuriousSpeed
    You aren't allowed to post your skype on forums. Please remove that last message before admins come steamrolling you.
     
  21. Online

    timtower Administrator Administrator Moderator

    That what Crud41 said and some people like to keep Bukkit separated from the rest of their lives
     
  22. Offline

    Onlineids

    Its fine ill be posting it here anyways
     
  23. Sorry, ill keep that in mind next time for that I post.
     
  24. Offline

    Onlineids

    [quote uid=90614414 name="CatzFuriousSpeed" post=2485834]Sorry, ill keep that in mind next time for that I post.[/quote]

    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 2, 2016
  25. Hey I forgot to tell you, but could you possibly re-modify my plugin again? by adding silktouch so that if someone has silktouch they can get items with silktouch (Sorry I wanted to be specific) and also add the items Obsidian and possibly add fortune values whenever you get the time it'd be great!. Onlineids
     
  26. Hope this just meant the auto-smelt and not the protection part :p
     
  27. Offline

    Onlineids

    I fixed that already
     
    AdamQpzm likes this.
  28. Oh and also exp doesnt seem to be picking up. Onlineids

    I guess you have no intention of working more on the plugin :/.. I guess ill have to get it re-created by someone else.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
  29. Offline

    Onlineids

    I finished the plugin as you had requested. Next time make sure the requests have what you want.
     
  30. So your unable to add obsidian and add fortune values, fix exp? :oops:
     

Share This Page