本文整理汇总了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());
}
}
示例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);
}
示例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)");
}
}
示例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)");
}
示例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);
}