Emptybottles

Discussion in 'Plugin Requests' started by TerraFiX, Jul 9, 2018.

Thread Status:
Not open for further replies.
  1. Plugin category:

    Minecraft version: 1.8

    Suggested name: NoBottles

    What I want:
    Hey everyone, I am looking for a plugin that removes glass bottles after a potion is consumed.
    When someone drinks a potion, they wont get the empty bottle but it would just get removed.


    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: No permissions needed

    When I'd like it by: Whenever you have time
     
  2. Spigot or Bukkit, doesn't really matter but still.
     
  3. Offline

    tkuiyeager1

    @TerraFiX
    Made it for you.
    Tell me if you need anything else.
     
    Last edited: Jul 9, 2018
  4. @tkuiyeager1
    Anything I need to do to make this plugin work?
    When I drink my potion I still get the bottle
     
  5. Offline

    tkuiyeager1

    Sorry I had a bug, please redownload the jar from the updated link. Also can be found in my previous message.

    Edit:
    @MemeplexOwner I saw your post in plugin development and your solution is more efficient than mine, would you mind uploading the jar here?
     
    Last edited: Jul 9, 2018
  6. yeah i ended up making it :/

    getting download now ;p

    EDIT:
    Code:Java
    1.  
    2. {
    3. for (int i = 0; i < Bukkit.getServer().getOnlinePlayers().size(); i++)
    4. {
    5. Player p = (Player)Bukkit.getServer().getOnlinePlayers().toArray()[I];
    6. if (EmptyBottle.this.toRemove.contains(p.getName()))
    7. {
    8. p.getInventory().getItemInHand().setAmount(0);
    9. EmptyBottle.this.toRemove.remove(p.getName());
    10. }
    11. }
    12. [/I]


    why do that when you can remove it when it happens? (In the event).
     
Thread Status:
Not open for further replies.

Share This Page