Filled per world tab list plugin

Discussion in 'Plugin Requests' started by swaggod, Mar 21, 2017.

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

    YoloSanta

    Does this fit your needs? https://www.dropbox.com/s/oq98rmsrmv42ks3/PerWorldTabList.jar?dl=0
    If not you may use my code to share and someone may help you to continue this project.

    Code (open)

    Code:
    package me.imanthe.plugins;
    
    import org.bukkit.entity.Player;
    import org.bukkit.event.EventHandler;
    import org.bukkit.event.Listener;
    import org.bukkit.event.player.PlayerChangedWorldEvent;
    import org.bukkit.event.player.PlayerJoinEvent;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Main extends JavaPlugin implements Listener
    {
      public void onEnable()
      {
        getServer().getPluginManager().registerEvents(this, this);
      }
     
      @EventHandler
      public void onJoin(PlayerJoinEvent e)
      {
        showAndHidePlayers(e.getPlayer());
      }
     
      @EventHandler
      public void onWorldChange(PlayerChangedWorldEvent e)
      {
        showAndHidePlayers(e.getPlayer());
      }
     
      private void showAndHidePlayers(Player p)
      {
        for (Player pl : getServer().getOnlinePlayers()) {
          if (p.getWorld() != pl.getWorld())
          {
            if (p.canSee(pl)) {
              p.hidePlayer(pl);
            }
            if (pl.canSee(p)) {
              pl.hidePlayer(p);
            }
          }
          else
          {
            if (!pl.canSee(p)) {
              pl.showPlayer(p);
            }
            if (!p.canSee(pl)) {
              p.showPlayer(pl);
            }
          }
        }
      }
    }
    
     
  2. Offline

    swaggod

    thx I'll test it.


    EDIT: Did you add config? because config don't show up
     
    Last edited: May 21, 2017
  3. Offline

    YoloSanta

    No sorry no config was added :( I was kinda in a hurry while making this,
     
  4. Offline

    swaggod

    so are you gonna add it or no?
     
  5. Offline

    YoloSanta

    Currently Im not home and not close to my pc im on vacation and I currently cannot but your more than welcome to share my code with another dev to help your out.
     
  6. Offline

    swaggod

    but your tablist plugin can do what i said on my post? like that picture i showed on my post
     
  7. Offline

    YoloSanta

    If your asking me if it can I'm not sure, I didn't test it before I left my house
     
  8. Offline

    RcExtract

    @swaggod a ton of bumps
    Can I simply put where the world the player is inside beside their name? Example:
    Bob WorldA Isaac WorldD
    Mike WorldB Gary WorldE
    Christine WorldC Cammie WorldF
     
  9. Offline

    swaggod

    no I want it like I said in the post
     
    Last edited: May 22, 2017
  10. Offline

    swaggod

  11. Offline

    swaggod

  12. Offline

    swaggod

  13. Offline

    swaggod

  14. Offline

    swaggod

  15. Offline

    swaggod

  16. Offline

    swaggod

  17. Offline

    swaggod

  18. Offline

    icedmoca

    Last edited: Jun 19, 2017
  19. Offline

    swaggod

  20. Offline

    icedmoca

    There are hub plugins that offer this.
    Haha I said something like this before: https://bukkit.org/threads/perworld-tabs-1-9.415066/
    I was making a server and I found a plugin:
    I know this is spigot but oh well, https://www.spigotmc.org/resources/bungeetablistplus.313/
    That works with multi world support.
    Something you may want? https://dev.bukkit.org/projects/worldisolation
    This?: https://dev.bukkit.org/projects/mytablist
    But I'm pretty sure this is what you need: https://dev.bukkit.org/projects/tabapi
    This is what you need with TabAPI: https://dev.bukkit.org/projects/tab-deco
     
  21. Offline

    YoloSanta

  22. Offline

    swaggod

    thanks!
     
Thread Status:
Not open for further replies.

Share This Page