本文整理汇总了Java中net.minecraft.network.play.server.S3EPacketTeams类的典型用法代码示例。如果您正苦于以下问题:Java S3EPacketTeams类的具体用法?Java S3EPacketTeams怎么用?Java S3EPacketTeams使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
S3EPacketTeams类属于net.minecraft.network.play.server包,在下文中一共展示了S3EPacketTeams类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: sendScoreboard
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
protected void sendScoreboard(ServerScoreboard scoreboardIn, EntityPlayerMP playerIn)
{
Set<ScoreObjective> set = Sets.<ScoreObjective>newHashSet();
for (ScorePlayerTeam scoreplayerteam : scoreboardIn.getTeams())
{
playerIn.playerNetServerHandler.sendPacket(new S3EPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 19; ++i)
{
ScoreObjective scoreobjective = scoreboardIn.getObjectiveInDisplaySlot(i);
if (scoreobjective != null && !set.contains(scoreobjective))
{
for (Packet packet : scoreboardIn.func_96550_d(scoreobjective))
{
playerIn.playerNetServerHandler.sendPacket(packet);
}
set.add(scoreobjective);
}
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:25,代码来源:ServerConfigurationManager.java
示例2: update
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
public void update(){
int flags = 0;
if(this.friendlyFire) flags |= 0x1;
if(this.friendlyInvisiblesVisible) flags |= 0x2;
//TODO: visibility?
S3EPacketTeams packet = new S3EPacketTeams();
packet.field_149320_a = this.id;
packet.field_149318_b = this.displayName;
packet.field_149319_c = this.prefix;
packet.field_149316_d = this.suffix;
packet.field_149317_e = getPlayerNames();
packet.field_149314_f = 2; //Update
packet.field_149315_g = flags;
manager.sendPacket(packet);
}
开发者ID:nailed,项目名称:nailed,代码行数:17,代码来源:NailedScoreboardTeam.java
示例3: addPlayerToTeam
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* Adds a player to the given team
*/
public boolean addPlayerToTeam(String player, String newTeam)
{
if (super.addPlayerToTeam(player, newTeam))
{
ScorePlayerTeam scoreplayerteam = this.getTeam(newTeam);
this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3EPacketTeams(scoreplayerteam, Arrays.asList(new String[] {player}), 3));
this.func_96551_b();
return true;
}
else
{
return false;
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:ServerScoreboard.java
示例4: removePlayerFromTeam
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* Removes the given username from the given ScorePlayerTeam. If the player is not on the team then an
* IllegalStateException is thrown.
*/
public void removePlayerFromTeam(String p_96512_1_, ScorePlayerTeam p_96512_2_)
{
super.removePlayerFromTeam(p_96512_1_, p_96512_2_);
this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3EPacketTeams(p_96512_2_, Arrays.asList(new String[] {p_96512_1_}), 4));
this.func_96551_b();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:11,代码来源:ServerScoreboard.java
示例5: broadcastTeamCreated
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* This packet will notify the players that this team is created, and that will register it on the client
*/
public void broadcastTeamCreated(ScorePlayerTeam playerTeam)
{
super.broadcastTeamCreated(playerTeam);
this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3EPacketTeams(playerTeam, 0));
this.func_96551_b();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:ServerScoreboard.java
示例6: sendTeamUpdate
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* This packet will notify the players that this team is updated
*/
public void sendTeamUpdate(ScorePlayerTeam playerTeam)
{
super.sendTeamUpdate(playerTeam);
this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3EPacketTeams(playerTeam, 2));
this.func_96551_b();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:10,代码来源:ServerScoreboard.java
示例7: func_96456_a
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
protected void func_96456_a(ServerScoreboard par1ServerScoreboard, EntityPlayerMP par2EntityPlayerMP)
{
HashSet var3 = new HashSet();
Iterator var4 = par1ServerScoreboard.getTeams().iterator();
while (var4.hasNext())
{
ScorePlayerTeam var5 = (ScorePlayerTeam)var4.next();
par2EntityPlayerMP.playerNetServerHandler.sendPacket(new S3EPacketTeams(var5, 0));
}
for (int var9 = 0; var9 < 3; ++var9)
{
ScoreObjective var10 = par1ServerScoreboard.func_96539_a(var9);
if (var10 != null && !var3.contains(var10))
{
List var6 = par1ServerScoreboard.func_96550_d(var10);
Iterator var7 = var6.iterator();
while (var7.hasNext())
{
Packet var8 = (Packet)var7.next();
par2EntityPlayerMP.playerNetServerHandler.sendPacket(var8);
}
var3.add(var10);
}
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:31,代码来源:ServerConfigurationManager.java
示例8: func_151392_a
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
public boolean func_151392_a(String p_151392_1_, String p_151392_2_)
{
if (super.func_151392_a(p_151392_1_, p_151392_2_))
{
ScorePlayerTeam var3 = this.getTeam(p_151392_2_);
this.scoreboardMCServer.getConfigurationManager().func_148540_a(new S3EPacketTeams(var3, Arrays.asList(new String[] {p_151392_1_}), 3));
this.func_96551_b();
return true;
}
else
{
return false;
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:15,代码来源:ServerScoreboard.java
示例9: removePlayerFromTeam
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* Removes the given username from the given ScorePlayerTeam. If the player is not on the team then an
* IllegalStateException is thrown.
*/
public void removePlayerFromTeam(String par1Str, ScorePlayerTeam par2ScorePlayerTeam)
{
super.removePlayerFromTeam(par1Str, par2ScorePlayerTeam);
this.scoreboardMCServer.getConfigurationManager().func_148540_a(new S3EPacketTeams(par2ScorePlayerTeam, Arrays.asList(new String[] {par1Str}), 4));
this.func_96551_b();
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:11,代码来源:ServerScoreboard.java
示例10: func_96456_a
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
public void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_) // CraftBukkit - protected -> public
{
HashSet hashset = new HashSet();
Iterator iterator = p_96456_1_.getTeams().iterator();
while (iterator.hasNext())
{
ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
p_96456_2_.playerNetServerHandler.sendPacket(new S3EPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 3; ++i)
{
ScoreObjective scoreobjective = p_96456_1_.func_96539_a(i);
if (scoreobjective != null && !hashset.contains(scoreobjective))
{
List list = p_96456_1_.func_96550_d(scoreobjective);
Iterator iterator1 = list.iterator();
while (iterator1.hasNext())
{
Packet packet = (Packet)iterator1.next();
p_96456_2_.playerNetServerHandler.sendPacket(packet);
}
hashset.add(scoreobjective);
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:31,代码来源:ServerConfigurationManager.java
示例11: func_151392_a
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
public boolean func_151392_a(String p_151392_1_, String p_151392_2_)
{
if (super.func_151392_a(p_151392_1_, p_151392_2_))
{
ScorePlayerTeam scoreplayerteam = this.getTeam(p_151392_2_);
this.sendAll(new S3EPacketTeams(scoreplayerteam, Arrays.asList(new String[] { p_151392_1_}), 3)); // CraftBukkit - Internal packet method
this.func_96551_b();
return true;
}
else
{
return false;
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:15,代码来源:ServerScoreboard.java
示例12: func_96456_a
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
protected void func_96456_a(ServerScoreboard p_96456_1_, EntityPlayerMP p_96456_2_)
{
HashSet hashset = new HashSet();
Iterator iterator = p_96456_1_.getTeams().iterator();
while (iterator.hasNext())
{
ScorePlayerTeam scoreplayerteam = (ScorePlayerTeam)iterator.next();
p_96456_2_.playerNetServerHandler.sendPacket(new S3EPacketTeams(scoreplayerteam, 0));
}
for (int i = 0; i < 3; ++i)
{
ScoreObjective scoreobjective = p_96456_1_.func_96539_a(i);
if (scoreobjective != null && !hashset.contains(scoreobjective))
{
List list = p_96456_1_.func_96550_d(scoreobjective);
Iterator iterator1 = list.iterator();
while (iterator1.hasNext())
{
Packet packet = (Packet)iterator1.next();
p_96456_2_.playerNetServerHandler.sendPacket(packet);
}
hashset.add(scoreobjective);
}
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:31,代码来源:ServerConfigurationManager.java
示例13: func_151392_a
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
public boolean func_151392_a(String p_151392_1_, String p_151392_2_)
{
if (super.func_151392_a(p_151392_1_, p_151392_2_))
{
ScorePlayerTeam scoreplayerteam = this.getTeam(p_151392_2_);
this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3EPacketTeams(scoreplayerteam, Arrays.asList(new String[] {p_151392_1_}), 3));
this.func_96551_b();
return true;
}
else
{
return false;
}
}
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:15,代码来源:ServerScoreboard.java
示例14: addPlayer
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
@Override
public boolean addPlayer(Player player) {
Checks.notNull(player, "player may not be null");
if(players.add(player)){
S3EPacketTeams packet = new S3EPacketTeams();
packet.field_149320_a = id;
packet.field_149317_e = getPlayerNames();
packet.field_149314_f = 3; //Add Player
manager.sendPacket(packet);
return true;
}else{
return false;
}
}
开发者ID:nailed,项目名称:nailed,代码行数:15,代码来源:NailedScoreboardTeam.java
示例15: removePlayer
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
@Override
public boolean removePlayer(Player player) {
Checks.notNull(player, "player may not be null");
if(players.remove(player)){
S3EPacketTeams packet = new S3EPacketTeams();
packet.field_149320_a = id;
packet.field_149317_e = getPlayerNames();
packet.field_149314_f = 4; //Remove Player
manager.sendPacket(packet);
return true;
}else{
return false;
}
}
开发者ID:nailed,项目名称:nailed,代码行数:15,代码来源:NailedScoreboardTeam.java
示例16: getOrCreateTeam
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
@Nonnull
@Override
public ScoreboardTeam getOrCreateTeam(@Nonnull String id) {
Checks.notNull(id, "Id may not be null");
NailedScoreboardTeam team = teamsById.get(id);
if(team == null){
team = new NailedScoreboardTeam(id, this);
this.teamsById.put(id, team);
this.teams.add(team);
int flags = 0;
if(team.isFriendlyFire()) flags |= 0x1;
if(team.areFriendlyInvisiblesInvisible()) flags |= 0x2;
//TODO: visibility
S3EPacketTeams packet = new S3EPacketTeams();
packet.field_149320_a = team.getId();
packet.field_149318_b = team.getDisplayName();
packet.field_149319_c = team.getPrefix();
packet.field_149316_d = team.getSuffix();
packet.field_149317_e = ImmutableList.of();
packet.field_149314_f = 0; //Create
packet.field_149315_g = flags;
this.sendPacket(packet);
}
return team;
}
开发者ID:nailed,项目名称:nailed,代码行数:29,代码来源:PlayerScoreboardManager.java
示例17: func_96513_c
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
public void func_96513_c(ScorePlayerTeam playerTeam)
{
super.func_96513_c(playerTeam);
this.scoreboardMCServer.getConfigurationManager().sendPacketToAllPlayers(new S3EPacketTeams(playerTeam, 1));
this.func_96551_b();
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:7,代码来源:ServerScoreboard.java
示例18: handleTeams
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-
* memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabled
*/
public void handleTeams(S3EPacketTeams packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Scoreboard scoreboard = this.clientWorldController.getScoreboard();
ScorePlayerTeam scoreplayerteam;
if (packetIn.func_149307_h() == 0)
{
scoreplayerteam = scoreboard.createTeam(packetIn.func_149312_c());
}
else
{
scoreplayerteam = scoreboard.getTeam(packetIn.func_149312_c());
}
if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 2)
{
scoreplayerteam.setTeamName(packetIn.func_149306_d());
scoreplayerteam.setNamePrefix(packetIn.func_149311_e());
scoreplayerteam.setNameSuffix(packetIn.func_149309_f());
scoreplayerteam.setChatFormat(EnumChatFormatting.func_175744_a(packetIn.func_179813_h()));
scoreplayerteam.func_98298_a(packetIn.func_149308_i());
Team.EnumVisible team$enumvisible = Team.EnumVisible.func_178824_a(packetIn.func_179814_i());
if (team$enumvisible != null)
{
scoreplayerteam.setNameTagVisibility(team$enumvisible);
}
}
if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 3)
{
for (String s : packetIn.func_149310_g())
{
scoreboard.addPlayerToTeam(s, packetIn.func_149312_c());
}
}
if (packetIn.func_149307_h() == 4)
{
for (String s1 : packetIn.func_149310_g())
{
scoreboard.removePlayerFromTeam(s1, scoreplayerteam);
}
}
if (packetIn.func_149307_h() == 1)
{
scoreboard.removeTeam(scoreplayerteam);
}
}
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:56,代码来源:NetHandlerPlayClient.java
示例19: handleTeams
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* Updates a team managed by the scoreboard: Create/Remove the team
* registration, Register/Remove the player-team- memberships, Set team
* displayname/prefix/suffix and/or whether friendly fire is enabled
*/
public void handleTeams(S3EPacketTeams packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Scoreboard scoreboard = this.clientWorldController.getScoreboard();
ScorePlayerTeam scoreplayerteam;
if (packetIn.func_149307_h() == 0) {
scoreplayerteam = scoreboard.createTeam(packetIn.func_149312_c());
} else {
scoreplayerteam = scoreboard.getTeam(packetIn.func_149312_c());
}
if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 2) {
scoreplayerteam.setTeamName(packetIn.func_149306_d());
scoreplayerteam.setNamePrefix(packetIn.func_149311_e());
scoreplayerteam.setNameSuffix(packetIn.func_149309_f());
scoreplayerteam.setChatFormat(EnumChatFormatting.func_175744_a(packetIn.func_179813_h()));
scoreplayerteam.func_98298_a(packetIn.func_149308_i());
Team.EnumVisible team$enumvisible = Team.EnumVisible.func_178824_a(packetIn.func_179814_i());
if (team$enumvisible != null) {
scoreplayerteam.setNameTagVisibility(team$enumvisible);
}
}
if (packetIn.func_149307_h() == 0 || packetIn.func_149307_h() == 3) {
for (String s : packetIn.func_149310_g()) {
scoreboard.addPlayerToTeam(s, packetIn.func_149312_c());
}
}
if (packetIn.func_149307_h() == 4) {
for (String s1 : packetIn.func_149310_g()) {
scoreboard.removePlayerFromTeam(s1, scoreplayerteam);
}
}
if (packetIn.func_149307_h() == 1) {
scoreboard.removeTeam(scoreplayerteam);
}
}
开发者ID:SkidJava,项目名称:BaseClient,代码行数:46,代码来源:NetHandlerPlayClient.java
示例20: handleTeams
import net.minecraft.network.play.server.S3EPacketTeams; //导入依赖的package包/类
/**
* Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-
* memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabled
*/
public void handleTeams(S3EPacketTeams p_147247_1_)
{
Scoreboard var2 = this.clientWorldController.getScoreboard();
ScorePlayerTeam var3;
if (p_147247_1_.func_149307_h() == 0)
{
var3 = var2.createTeam(p_147247_1_.func_149312_c());
}
else
{
var3 = var2.getTeam(p_147247_1_.func_149312_c());
}
if (p_147247_1_.func_149307_h() == 0 || p_147247_1_.func_149307_h() == 2)
{
var3.setTeamName(p_147247_1_.func_149306_d());
var3.setNamePrefix(p_147247_1_.func_149311_e());
var3.setNameSuffix(p_147247_1_.func_149309_f());
var3.func_98298_a(p_147247_1_.func_149308_i());
}
Iterator var4;
String var5;
if (p_147247_1_.func_149307_h() == 0 || p_147247_1_.func_149307_h() == 3)
{
var4 = p_147247_1_.func_149310_g().iterator();
while (var4.hasNext())
{
var5 = (String)var4.next();
var2.func_151392_a(var5, p_147247_1_.func_149312_c());
}
}
if (p_147247_1_.func_149307_h() == 4)
{
var4 = p_147247_1_.func_149310_g().iterator();
while (var4.hasNext())
{
var5 = (String)var4.next();
var2.removePlayerFromTeam(var5, var3);
}
}
if (p_147247_1_.func_149307_h() == 1)
{
var2.removeTeam(var3);
}
}
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:57,代码来源:NetHandlerPlayClient.java
注:本文中的net.minecraft.network.play.server.S3EPacketTeams类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论