Solved Player Opacity

Discussion in 'Plugin Development' started by Stigosaurus, Mar 24, 2013.

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

    Stigosaurus

    Hey I was looking at some random YouTube videos ('cause YOLO) and I came across this:

    Does anyone know how the heck they did this?
     
  2. Offline

    chasechocolate

    Maybe by using packets? I don't know though.
     
  3. Offline

    nitrousspark

    i think its the new teams feature in minecraft, team mates can see their team mates?
     
    Stigosaurus and Codisimus like this.
  4. Offline

    Codisimus

    I second that. read that somewhere. so everyone must be on the same team.
     
    Stigosaurus likes this.
  5. Offline

    chasechocolate

    Oh, yes it is. Got this from a quick Google search:
    [​IMG]
     
    Stigosaurus likes this.
  6. Offline

    Stigosaurus

    Ok! Can someone give me an example of how to do this? Maybe Tzeentchful can because he knows a lot about the scoreboard/team packets... :p
     
  7. Offline

    Stigosaurus

    Anyone? I really want to do this :p
     
  8. Offline

    CreeperShift

    Stigosaurus

    create teams:
    Code:
    org.bukkit.World world = Bukkit.getWorld("world");
     
    World mcWorld = ((CraftWorld) world).getHandle();
    mcWorld.getScoreboard().createTeam("team1");
    mcWorld.getScoreboard().createTeam("team2");
    adding players to a team:
    Code:
    org.bukkit.World world = Bukkit.getWorld("world");
     
    World mcWorld = ((CraftWorld) world).getHandle();
     
    ScoreboardTeam team1 = mcWorld.getScoreboard().getTeam("team1");
    mcWorld.getScoreboard().addPlayerToTeam(player.getName(), team1);

    adding the opacity effect (aka can see if they are invisible):
    Code:
    org.bukkit.World world = Bukkit.getWorld("world");
    World mcWorld = ((CraftWorld) world).getHandle();
     
    mcWorld.getScoreboard().getTeam("team1").setCanSeeFriendlyInvisibles(true);
     
    
    This should get you going :)
     
    RFUDEO9EH and Stigosaurus like this.
Thread Status:
Not open for further replies.

Share This Page