Jump to content

Neoka

Members
  • Posts

    0
  • Joined

  • Last visited

Neoka's Achievements

Newbie

Newbie (1/8)

0

Reputation

  1. Hi, i'm trying to do something that should be fairly simple. All I want to do is get players in a radius, have them pass a certain check and if they pass make them glow green with Minecraft's spectral arrow effect. Here is what I've come up with: Create a team and set the color to green (This runs when the user decides to enable the feature): public void setupTeam() { team = mc.world.getScoreboard().createTeam("Guild"); team.setColor(TextFormatting.GREEN); String playerName = mc.player.getDisplayName().getFormattedText(); if(playerName.contains("]")) { int index = playerName.indexOf("]"); guildName = playerName.substring(0, index + 1); } else { guildName = playerName; } } Check in a 100 block radius for players, add them to the team and set them to glow: AxisAlignedBB bb = new AxisAlignedBB(mc.player.posX - 100.0D, mc.player.posY - 100.0D, mc.player.posZ - 100.0D, mc.player.posX + 100.0D, mc.player.posY + 100.0D, mc.player.posZ + 100.0D); List<EntityPlayer> nearbyPlayers = mc.world.getEntitiesWithinAABB(EntityPlayer.class, bb); for (EntityPlayer player : nearbyPlayers) { if (player.getDisplayName().getFormattedText().contains(guildName) && mc.world.getScoreboard().getPlayersTeam(player.getName()) != team) { mc.world.getScoreboard().addPlayerToTeam(player.getUniqueID().toString(), team.getName()); player.setGlowing(true); } } The players are glowing, but the color is not green. I should also mention that I am only doing this client side as I wont have access to the server.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.