Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-2341

Bukkit Scoreboard blocks Mob Color Glowing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Minor Minor
    • None
    • None

      Description: If you create a Scoreboard with ScoreboardManager#get*New*Scoreboard() and you want to color mob ingame with a normal ingame scoreboard and glowing effect it will not shown.

      Commands for the ingame-scoreboard:
      1. /scoreboard teams add shulker
      2. /summon Shulker ~ ~1 ~

      {NoAI:1,Team:shulker}


      3. /effect @e[type=Shulker] minecraft:glowing 9999 1 true
      4. /scoreboard teams option shulker color gold
      (Tested with and without AI, different colors, etc.)

      package de.devpixel.tests;
      
      import org.bukkit.Bukkit;
      import org.bukkit.entity.Player;
      import org.bukkit.event.EventHandler;
      import org.bukkit.event.Listener;
      import org.bukkit.event.player.PlayerJoinEvent;
      import org.bukkit.plugin.Plugin;
      import org.bukkit.plugin.java.JavaPlugin;
      import org.bukkit.scoreboard.Scoreboard;
      import org.bukkit.scoreboard.Team;
      import org.bukkit.scoreboard.Team.Option;
      import org.bukkit.scoreboard.Team.OptionStatus;
      
      public class main extends JavaPlugin implements Listener {
      	
      	private static Plugin plugin;
      	private static Scoreboard scoreboard;
      	
      	@Override
      	public void onEnable() {
      		plugin = this;
      		Bukkit.getPluginManager().registerEvents(this, this);
      		scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
      		Team team = scoreboard.registerNewTeam("myteam");
      		team.setPrefix("§c");
      		team.setAllowFriendlyFire(true);
      		team.setCanSeeFriendlyInvisibles(false);
      		team.setDisplayName("MyTeam");
      		team.setOption(Option.NAME_TAG_VISIBILITY, OptionStatus.ALWAYS);
      		team.setOption(Option.COLLISION_RULE, OptionStatus.NEVER);
      	}
      	
      	public void onDisable() {
      		
      	}
      	
      	public static Plugin getPlugin() {
      		return plugin;
      	}
      	
      	@EventHandler
      	public void onJoin(PlayerJoinEvent e) {
      		scoreboard.getTeam("myteam").addEntry(e.getPlayer().getName());
      		for(Player online : Bukkit.getOnlinePlayers()) {
      			online.setScoreboard(scoreboard);
      		}
      	}
      }	
      

            Unassigned Unassigned
            DevPixel essem
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: