ok I test with:
if(Minecraft.getMinecraft().thePlayer.getTeam() == player.worldObj.getScoreboard().getPlayersTeam("test"))
{
System.out.println("je suis détecté");
}
thnaks but i have an error:
Cannot make a static reference to the non-static method getScoreboard() from the type World
Eclipse would change public to public static
Hello all,
I have this method:
Minecraft.getMinecraft().thePlayer.getTeam() for get player's team instance but I want check in which team the player belongs
I would use a simple condition similar at:
if(Minecraft.getMinecraft().thePlayer.getTeam() == methodForGetTeam)
{
}
else if(Minecraft.getMinecraft().thePlayer.getTeam() ==methodForGetSecondTeam)
{
}
hoping to have been explicit
yes I know but I watch you that I can call method
Minecraft.getMinecraft().thePlayer.equals(ScoreboardPlayerTeam.getPlayersTeam.teamMemberships)
this function don't work for get player's team
I have this method:
public Team getTeam()
{
return this.getWorldScoreboard().getPlayersTeam(this.username);
}
but how to caught the player team with this method?