当前位置: 首页>>代码示例>>Java>>正文


Java Team.removePlayer方法代码示例

本文整理汇总了Java中org.bukkit.scoreboard.Team.removePlayer方法的典型用法代码示例。如果您正苦于以下问题:Java Team.removePlayer方法的具体用法?Java Team.removePlayer怎么用?Java Team.removePlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.scoreboard.Team的用法示例。


在下文中一共展示了Team.removePlayer方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onTeamChange

import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
@EventHandler
public void onTeamChange(PlayerChangeTeamEvent event) {
    Team team = this.simpleScoreboard.getScoreboard().getTeam(event.getNewTeam().getId());

    if (event.getOldTeam() != null) {
        Team oldTeam = this.simpleScoreboard.getScoreboard().getTeam(event.getOldTeam().getId());
        if (oldTeam != null) {
            oldTeam.removePlayer(event.getPlayer());
        }
    }

    if (team != null) {
       team.addPlayer(event.getPlayer());
    }

    if (event.getNewTeam().getId().equals(this.teamModule.getId())) {
        simpleScoreboard.send(event.getPlayer());
    }
}
 
开发者ID:Minehut,项目名称:GamePlate,代码行数:20,代码来源:ScoreboardModule.java

示例2: QuitTeam

import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public static void QuitTeam(Player player){
	
	String worldconfig = plugin.getConfig().getString("lobby.world");
	World world = Bukkit.getServer().getWorld(worldconfig);
	
	String Location = plugin.getConfig().getString("lobby.Location");
	String[] location = Location.split(",");
	int x = Integer.parseInt(location[0]);
	int y = Integer.parseInt(location[1]);
	int z = Integer.parseInt(location[2]);
	
	Location location2 = new Location(world, x, y, z);
	player.teleport(location2);
	
	Team team = PlayerInWhereArea.get(player);
	team.removePlayer(player);
	PlayerInWhereArea.remove(player);
	
	player.sendMessage(ChatColor.BLUE + "�A�h�X�F�C��");
	player.playSound(player.getLocation(), Sound.NOTE_PIANO, 2F, 15F);
	
	player.setGameMode(GameMode.SURVIVAL);
	
	Spawn.cancel(player);
	Spawn2.cancel(player);
}
 
开发者ID:cocomine,项目名称:FastSpawn,代码行数:28,代码来源:Teams.java

示例3: run

import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
@Override
public void run()
{
	
	long start = 0;
	boolean debug = LsMagnata.getPlugin().getConfig().getBoolean("Settings.DebugConsole");
	
	if (debug)
	{
		start = System.currentTimeMillis();
		SysLogger.log("Atualizando scoreboard...");
	}
	
	Team magnataTeam = LsMagnata.scoreboard.getTeam("magnata");
	OfflinePlayer offCurrentMagnata = Bukkit.getOfflinePlayer(MAGNATA);
	
	if (!MagnataManager.getCurrentMagnata().equalsIgnoreCase(MAGNATA) || !magnataTeam.hasPlayer(offCurrentMagnata))
	{
		
		for (OfflinePlayer op : magnataTeam.getPlayers())
		{
			magnataTeam.removePlayer(op);
		}
		
		if (offCurrentMagnata != null)
		{
			magnataTeam.addPlayer(offCurrentMagnata);
		}
	}
	
	for (Player online : Bukkit.getOnlinePlayers())
	{
		online.setScoreboard(LsMagnata.scoreboard);
	}
	
	if (debug)
	{
		SysLogger.log("Atualizacao finalizada ("+(System.currentTimeMillis() - start)+"ms)");
	}
}
 
开发者ID:leonardosnt,项目名称:OldBukkit,代码行数:41,代码来源:UpdateScoreboardThread.java

示例4: run

import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
@Override
public void run()
{
	long start = System.currentTimeMillis();
	System.out.println("[LsMito] Atualizando scoreboard...");
	
	Team mito = LsMitoPlugin.getScoreboard().getTeam("lsmito");

	for (OfflinePlayer offTeamPlayer : mito.getPlayers())
	{
		if (!LsMito.isMito(offTeamPlayer.getName()))
		{
			mito.removePlayer(offTeamPlayer);
		}
	}
	
	for (Player online : Bukkit.getOnlinePlayers())
	{
		if (LsMito.isMito(online))
		{
			OfflinePlayer offMito = Bukkit.getOfflinePlayer(online.getName());
			
			if (offMito != null)
			{
				mito.addPlayer(offMito);
			}
		}
		online.setScoreboard(LsMitoPlugin.getScoreboard());
	}
	
	System.out.println("[LsMito] Scoreboard atualizado (" + (System.currentTimeMillis() - start)+ "ms)");
}
 
开发者ID:leonardosnt,项目名称:OldBukkit,代码行数:33,代码来源:UpdateScoreboardThread.java

示例5: removePlayerNametag

import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public static void removePlayerNametag(Player player, String nametag) {
	Scoreboard board = Bukkit.getScoreboardManager().getMainScoreboard();
	Team team = board.getTeam(nametag);
	if (team == null) {
		Bukkit.getConsoleSender().sendMessage(Skellett.cc(Skellett.prefix + "&cNo nametag under the name " + nametag + " &cwas found!"));
		return;
	}
	team.removePlayer((OfflinePlayer)player);
}
 
开发者ID:TheLimeGlass,项目名称:Skellett,代码行数:11,代码来源:NametagManager.java


注:本文中的org.bukkit.scoreboard.Team.removePlayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。