Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Neoka

Members
  • Joined

  • Last visited

Everything posted by Neoka

  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.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.