[FIX] TotallyOrbSome v1.1 Final - Remove all those stinking orbs... [1185]

Discussion in 'Inactive/Unsupported Plugins' started by feildmaster, Sep 18, 2011.

  1. Offline

    feildmaster

    TotallyOrbSome v1.0
    Remove those pesky orbs​
    This is an amazing, less than 50 line (I even added spaces), plugin to remove orbs.


    Features:
    • Removes orbs from server
    • No configuration necessary (@Verrier2)
    Change Log:
    Version 1.1 Final (Requires CB 1176 or Higher)​
     
  2. Offline

    fffizzz

    terrible lag for about 1-2 mins, which im assuming it was world scanning and removing orbs? either way, its golden now. 80+ online, running great.
     
  3. Offline

    feildmaster

    It shouldn't have lagged (much at all)... o.o It creates new threads for every run it does.
     
  4. Offline

    Adrenaline

    Thx, i test it
     
  5. Offline

    MarkusE.s.

    feildmaster, my Plugin is bad, and your laggs, Hmmm....
     
  6. Offline

    feildmaster

    I said your plugin was dirty/poorly written, and it doesn't lag. Player deaths lag the server before my plugin cleans it up.

    To show you how exactly my plugin works:
    Code:java
    1. package feildmaster.OrbRemove;
    2.  
    3. import org.bukkit.World;
    4. import org.bukkit.entity.Entity;
    5. import org.bukkit.entity.ExperienceOrb;
    6. import org.bukkit.event.Event;
    7. import org.bukkit.event.entity.EntityDeathEvent;
    8. import org.bukkit.event.entity.EntityListener;
    9. import org.bukkit.plugin.java.JavaPlugin;
    10.  
    11. public class plugin extends JavaPlugin {
    12. private plugin plugin;
    13. public void onDisable() {}
    14. public void onEnable() {
    15. plugin = this;
    16. getServer().getPluginManager().registerEvent(Event.Type.ENTITY_DEATH, new DeathListener(), Event.Priority.Low, this);
    17. getServer().getLogger().info(String.format("[%1$s] v%2$s Enabled!",getDescription().getName(), getDescription().getVersion()));
    18. }
    19. public class DeathListener extends EntityListener implements Runnable {
    20. public void onEntityDeath(EntityDeathEvent e) {
    21. getServer().getScheduler().scheduleAsyncDelayedTask(plugin, this, 25);
    22. }
    23. public void run() {
    24. for(World w : getServer().getWorlds())
    25. for(Entity e : w.getEntities())
    26. if(e instanceof ExperienceOrb)
    27. e.remove();
    28. }
    29. }
    30. }
    31.  


    That's 30 lines right there.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  7. Offline

    psycowithespn

    http://wiki.bukkit.org/Scheduler_Programming#Asynchronous_Tasks
     
  8. Offline

    feildmaster

  9. Offline

    psycowithespn

    How do you know?
     
  10. Offline

    feildmaster

    It doesn't edit the entity directly, it "flags" it. The main thread does the removal. This is just like any other plugin that uses the bukkit api in a new thread.

    (And believe me, lots of them use it)
     
  11. Offline

    psycowithespn

    Oh I see. I didn't notice the "flag" in the javadocs. Sorry for doubting you.
     
  12. Offline

    feildmaster

    Also, that "threadsafe" list doesn't include all the functions that are threadsafe. There's quite a number of them... More like, they should be listing "Non-thread-safe functions"
     
  13. Offline

    psycowithespn

    This page was last modified on 15 May 2011, at 15:52.

    That could be why too.
     
  14. Offline

    feildmaster

    That would make sense as well. ^^
     
  15. Offline

    Plague

    this is not really a good plugin submission post, if you only want to have proper info on dev, don'(t release it here, if not make a proper post.
     
  16. Offline

    feildmaster

    I thought you don't accept releases anymore. :eek:
    Which is why I was using this as a bit of advertisement, because it's hard to get people to look at dev.Bukkit without a thread.

    I can tidy it up. :)
     
  17. Offline

    Plague

    we do accept releases here too
     
  18. Offline

    feildmaster

    Will tidy it up then. :D

    (Will also do it to a few other pages)

    @Plague Tidied.

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

    Mukrakiish

    Yup...I have a hell of a time trying to follow new plugins and the like in BukkitDev compared to how it flows 'round here. Glad you pointed it out here.
     
  20. Offline

    Kaosvf

    Does it remove all orbs in multi worlds?
     
  21. Offline

    feildmaster

    Yes.

    If you want it configurable, I might think about it. (But it might just go to code in "ControlORBle")
     
  22. Offline

    Kaosvf

    It would be perfect, because I have 4 worlds with this problem xD
     
  23. Offline

    Lolmewn

  24. Offline

    feildmaster

  25. Offline

    Freakling

    Love it! No initial lag for me and it works.

    TYVM :)
     
  26. Offline

    DiscipleGeek

    Had a few incidents last night on my server... A skeleton spawned as we were trying to make night pass. Killed three of us and caused orbs to explode everywhere and make the server unusable. Trying to correct the problem, I just installed bukkit and this plugin on my server, and while my console says that this plugin is loaded successfully, nothing seems to be happening, orbs everywhere and too much lag to do anything. Do I actually need someone to be in that chunk for the plugin to remove the orbs?
     
  27. Offline

    feildmaster

    Version of plugin and Craftbukkit version please.
     
  28. Offline

    DiscipleGeek

    1185 craftbukkit and 1.1 final of the plugin....

    But, I think it finally kicked in, i toggled back to my mc client and could actually play... no orbs anymore.
     
  29. Offline

    feildmaster

    Interesting... Well, glad it works for you.
     
  30. Offline

    DiscipleGeek

    Thanks for the plugin, the server is finally playable again. Now to start the recovery process after being shot & blown up several times while lagged. :)
     

Share This Page