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


Java BarAPI.setMessage方法代码示例

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


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

示例1: end

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
private void end() {
	String text = ConversionUtil.commaList(Var.teams, ChatColor.GRAY);
	for (Player Online : Bukkit.getOnlinePlayers()) {
		BarAPI.setMessage(Online, text + ChatColor.RED + " Wins!", 100f);
		}
	Var.teams.remove(Var.teams);
	Rixor.broadcast(ChatColor.DARK_PURPLE+"# # # # # # # # # # # # # # # # ");
	Rixor.broadcast(ChatColor.DARK_PURPLE+"# # "+ChatColor.GOLD+"The match has ended!"+ChatColor.DARK_PURPLE+" # #");
	Rixor.broadcast(ChatColor.DARK_PURPLE+"# # # # # # # # # # # # # # # #");
	timingTask.getTask().cancel();
	 //cycle(20);
	//Auto Cycle*/
	for(MapTeam team : getMap().getTeams())
		for(Client client : team.getPlayers()) {
			//client.setTeam(getMap().getObservers(), true, false, false);
			client.getPlayer().setGameMode(GameMode.CREATIVE);
			client.getPlayer().getInventory().setItem(0, new ItemStack(Material.COMPASS));
		}


	
	setCurrentlyRunning(false);
	setCurrentlyCycling(true);
}
 
开发者ID:ProjectRixor,项目名称:Rixor,代码行数:25,代码来源:Match.java

示例2: setBar

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public static void setBar(Player player, String message, int count, int seconds, float percent, TNTRun plugin) {
	try {
		message = message.replace("{COUNT}", String.valueOf(count));
		message = message.replace("{SECONDS}", String.valueOf(seconds));
		message = FormattingCodesParser.parseFormattingCodes(message);
		if(plugin.getConfig().getBoolean("special.UseBarApi") == false){
			return;
		}
		if (Bukkit.getPluginManager().getPlugin("BarAPI") != null) {
			if (!message.equals("")) {
				BarAPI.setMessage(player, message, percent);
			}
		}
	} catch (Throwable t) {
	}
}
 
开发者ID:ShevchikUnsupportedProjects,项目名称:TNTRun,代码行数:17,代码来源:Bars.java

示例3: ProgressTask

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public void ProgressTask(int amount, EpicPlayer player, boolean sendMessage){
	taskCurrent += amount;
	if(!sendMessage) return;
	
	if(player.getPlayer() != null && SendText()){
		player.playerStatistics.AddTasksCompleted(1);
		if(EpicSystem.useBarAPI()){
			BarAPI.setMessage(player.getPlayer(), getPlayerTaskProgressText(), (float)getTaskProgress()/getTaskGoal());
		}else{
			player.getPlayer().sendMessage(getPlayerTaskProgressText());
		}
		
		if(IsComplete() && quest.getQuestAutoComplete() && quest.isCompleted()){
			quest.completeQuest();
		}
	}
}
 
开发者ID:Randehh,项目名称:EpicQuest,代码行数:18,代码来源:EpicQuestTask.java

示例4: setMessage

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
@Override
public void setMessage(Player player, SkillType skill, String newMessage, float percent) {
    String oldMessage = BarAPI.getMessage(player);
    if (!newMessage.equals(oldMessage)) {
        //if the player level ups the message would be different.
        //BarPluginApi doesn't update the message if the player already has a bar
        BarAPI.removeBar(player);
    }

    BarAPI.setMessage(player, newMessage, percent);
    lastSkillType = skill;
}
 
开发者ID:games647,项目名称:mcMMOExtras,代码行数:13,代码来源:BarPluginApi.java

示例5: delayedStart

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public void delayedStart(String arenaName, int c) {
	final String aName = arenaName;
	cg = c;
	num = 6;
	if (Bukkit.getPluginManager().isPluginEnabled("BarAPI")) {
		if (Players.getPlayerAmountOnFloor(aName) != 1) {
			for (String name : Players.getPlayersOnFloor(aName)) {
				Player p = Bukkit.getPlayer(name);
				BarAPI.setMessage(p, BlockParty.messageManager.BAR_WAITING, 100.0F);
			}
		} else {
			BarAPI.setMessage(Bukkit.getPlayer((String) Players.getPlayersOnFloor(aName).get(0)), BlockParty.messageManager.BAR_WAITING, 100.0F);
		}
	}
	dc = Bukkit.getScheduler().scheduleSyncRepeatingTask(BlockParty.getInstance(), new Runnable() {
		public void run() {
			if (Period.num != 0) {
				if (Period.num > 1) {
					Period.num -= 1;
				} else {
					Period.this.start(aName, Period.cg, null);
					Bukkit.getScheduler().cancelTask(Period.dc);
				}
			}
		}
	}, 0L, 20L);
}
 
开发者ID:Hansdekip,项目名称:BlockParty-1.8,代码行数:28,代码来源:Period.java

示例6: delayedStart

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public void delayedStart(String arenaName, int c) {
	final String aName = arenaName;
	cg = c;
	num = 6;
	if (BlockParty.getArena.get(aName).getEnableActionbarInfo() || Bukkit.getPluginManager().isPluginEnabled("BarAPI")) {
		if (Players.getPlayerAmountOnFloor(aName) != 1) {
			for (String name : Players.getPlayersOnFloor(aName)) {
				Player p = Bukkit.getPlayer(name);
                   if (Bukkit.getPluginManager().isPluginEnabled("BarAPI"))
				    BarAPI.setMessage(p, BlockParty.messageManager.BAR_WAITING, 100.0F);
                   if (BlockParty.getArena.get(aName).getEnableActionbarInfo())
                       Action.sendAction(p, BlockParty.messageManager.ACTIONBAR_WAITING);
               }
		} else {
               if (Bukkit.getPluginManager().isPluginEnabled("BarAPI"))
			    BarAPI.setMessage(Bukkit.getPlayer((String) Players.getPlayersOnFloor(aName).get(0)), BlockParty.messageManager.BAR_WAITING, 100.0F);
               if (BlockParty.getArena.get(aName).getEnableActionbarInfo())
                   Action.sendAction(Bukkit.getPlayer((String) Players.getPlayersOnFloor(aName).get(0)), BlockParty.messageManager.ACTIONBAR_WAITING);
		}
	}
	dc = Bukkit.getScheduler().scheduleSyncRepeatingTask(BlockParty.getInstance(), new Runnable() {
		public void run() {
			if (Period.num != 0) {
				if (Period.num > 1) {
					Period.num -= 1;
				} else {
					Period.this.start(aName, Period.cg, null);
					Bukkit.getScheduler().cancelTask(Period.dc);
				}
			}
		}
	}, 0L, 20L);
}
 
开发者ID:LekoHD,项目名称:BlockParty,代码行数:34,代码来源:Period.java

示例7: restarting

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public void restarting(){
	String p = "s";

	if(restarting == 1) p = "";
	for (Player Online : Bukkit.getOnlinePlayers()) {
			BarAPI.setMessage(Online, ChatColor.DARK_AQUA + "Restarting "
					+ "in " + ChatColor.DARK_RED + restarting + ChatColor.DARK_AQUA + " second" + p + "!", (float) restarting / originalRestart * 100);

	}
	setCurrentlyRestarting(true);
	if (restarting == 0){
		this.restartingTask.getTask().cancel();
		for (Player p1 : Bukkit.getOnlinePlayers()){
			p1.kickPlayer(ChatColor.GREEN + "Server has shutdown! " + ChatColor.GOLD + "Rejoin!");
		}

		for (Map m : Rixor.getMapsPlayed()){
			Rixor.getInstance().getServer().unloadWorld(m.getWorld(), false);
			//Scrimmage.getInstance().getLogger().info(m.getName() + " " + m.getFolder().getAbsolutePath());
			//for (File file : m.getFolder().listFiles()) {
			//	try{
			//		FileDeleteStrategy.FORCE.delete(file);
			//	}catch(IOException e){
		//			Scrimmage.getInstance().getLogger().info(e.getMessage());
		//		}
		//	}
	//	}
		Rixor.getInstance().getServer().shutdown();
	}
	restarting--;
	}
}
 
开发者ID:ProjectRixor,项目名称:Rixor,代码行数:33,代码来源:Match.java

示例8: cycling

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public boolean cycling(RotationSlot next) {
	String p = "s";
	if (next == null){
		restart(30);
		return true;
	}
	if(cycling == 1) p = "";
	for (Player Online : Bukkit.getOnlinePlayers()) {
		BarAPI.setMessage(Online, ChatColor.DARK_AQUA + "Cycling to " + ChatColor.AQUA + next.getLoader().getName() + ChatColor.DARK_AQUA
				+ " in " + ChatColor.DARK_RED + cycling + ChatColor.DARK_AQUA + " second" + p + "!", (float) cycling / cycleTime * 100);
	}
	
	setCurrentlyCycling(true);
	if(cycling == 0) {

		Var.canSetNext = 0;
		cyclingTask.getTask().cancel();
		setCurrentlyCycling(false);
		Rixor.callEvent(new MatchCycleEvent(getMap(), next.getMap()));
		Rixor.getRotation().setSlot(next);
		for(Client client : Client.getClients())
			client.setTeam(next.getMap().getObservers(), true, true, true);

		next.getMatch().start();
		Rixor.addMapToMapsPlayed(next.getMap());
		hasEnded = false;
		return true;
	}
	
	if(cycling == 1 && !loaded && next != null) {
		setLoaded(true);
		next.load();
	}
	
	cycling--;
	return false;
}
 
开发者ID:ProjectRixor,项目名称:Rixor,代码行数:38,代码来源:Match.java

示例9: setBossBarAll

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
/**
 * Set's boss bar content for all players.
 * 
 * @param replace
 *            message (max 40 char.)
 */
public void setBossBarAll(final String message) {
    for (Player p : this.activePlayers) {
        BarAPI.removeBar(p);
        BarAPI.setMessage(p, message);
    }
}
 
开发者ID:dobrakmato,项目名称:PexelCore,代码行数:13,代码来源:AdvancedArena.java

示例10: run

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
@Override
public void run() {
    String message = getNextColor() + "-=- " + messages.get(timer) + " -=-";
    float progress = ((float) timer) / (messages.size() - 1);

    for (Player player : plugin.getServer().getOnlinePlayers()) {
        BarAPI.setMessage(player, message, progress * 100);
    }

    timer++;
    if (timer == messages.size()) timer = 0;
}
 
开发者ID:EyeOfEnder-Ltd,项目名称:EOEHub,代码行数:13,代码来源:BarTimer.java

示例11: onPlayerMove

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onPlayerMove(PlayerMoveEvent e) {
	if (BlockParty.onFloorPlayers.containsKey(e.getPlayer().getName())) {
		Location loc = e.getTo();
		loc.setY(e.getTo().getBlockY() - 1);
		try {
			if (loc.getBlock().getTypeId() == (BlockParty.getArena.get(BlockParty.onFloorPlayers.get(e.getPlayer().getName()))).getOutBlock()) {
				if (Players.getPlayerAmountOnFloor((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())) > 1) {
					if (Bukkit.getPluginManager().isPluginEnabled("NoteBlockAPI")) {
						Songs.stop(e.getPlayer());
					}
					e.getPlayer().getInventory().clear();
					e.getPlayer()
							.getInventory()
							.addItem(
									new ItemStack[] { ((Config) BlockParty.getArena.get(BlockParty.onFloorPlayers.get(e.getPlayer().getName())))
											.getVoteItem() });
					e.getPlayer().updateInventory();
					BlockParty.inLobbyPlayers.put(e.getPlayer().getName(), (String) BlockParty.onFloorPlayers.get(e.getPlayer().getName()));
					World world = e.getPlayer().getWorld();
					world.strikeLightning(e.getPlayer().getLocation());
					Config.broadcastInGame(BlockParty.messageManager.PERIOD_ELIMINATED.replace("$PLAYER$", e.getPlayer().getName()), Config.arenaName);

					// e.getPlayer().sendMessage("�3[BlockParty] �8You were �4ELIMINATED");
					e.getPlayer().teleport(Arena.getLobbySpawn((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())));
					BlockParty.onFloorPlayers.remove(e.getPlayer().getName());
					if (Bukkit.getPluginManager().isPluginEnabled("BarAPI")) {
						BarAPI.setMessage(e.getPlayer(), BlockParty.messageManager.BAR_WAITING, 100.0F);
					}
				}
			}
		} catch (Exception ex) {
			Config.broadcastInGame(BlockParty.messageManager.PERIOD_ELIMINATED.replace("$PLAYER$", e.getPlayer().getName()), Config.arenaName);

			// e.getPlayer().sendMessage("�3[BlockParty] �8You were �4ELIMINATED");
			if (BlockParty.onFloorPlayers.containsKey(e.getPlayer().getName())) {
				BlockParty.onFloorPlayers.remove(e.getPlayer().getName());
			}

			BlockParty.inLobbyPlayers.put(e.getPlayer().getName(), Config.arenaName);
			Arena.leave(e.getPlayer());
		}
	}
}
 
开发者ID:Hansdekip,项目名称:BlockParty-1.8,代码行数:46,代码来源:MoveListener.java

示例12: join

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public void join(Player p) {
	if (this.isEnabled) {
		if (!BlockParty.inGamePlayers.containsKey(p.getName())) {
			if (exists(p)) {
				if (!Players.reachedMaxPlayers(Config.arenaName)) {
					if ((allowJoinDuringGame == false && (Players.getPlayerAmountOnFloor(arenaName) <= 1)) || allowJoinDuringGame) {
						// Save Player Info
						BlockParty.locs.put(p.getName(), p.getLocation());
						BlockParty.gm.put(p.getName(), p.getGameMode());

						// Reset game mode so they cannot fly
						p.setGameMode(GameMode.ADVENTURE);

						// TP to arena
						p.teleport(this.lobbySpawn);

						// notify everyone someone joined
						broadcastInGame(BlockParty.messageManager.JOIN_SUCCESS_BROADCAST.replace("$PLAYER$", p.getName()), Config.arenaName);

						// Add to game at this point
						BlockParty.inGamePlayers.put(p.getName(), Config.arenaName);
						BlockParty.inLobbyPlayers.put(p.getName(), Config.arenaName);

						// Archive Inventory
						BlockParty.inventoryManager.storeInv(p, true);
						BlockParty.inventoriesToRestore.add(p.getPlayer().getName());
						p.getInventory().clear();
						p.getInventory().addItem(new ItemStack[] { getVoteItem() });
						p.updateInventory();

						// Play music while they wait :D
						String song = ((Config) BlockParty.getArena.get(arenaName)).getMostVotedSong();
						if ((Bukkit.getPluginManager().isPluginEnabled("NoteBlockAPI")) && (((Config) BlockParty.getArena.get(arenaName)).getUseSongs())) {
							Songs.stop(p);
							Songs.play(p, song);
						}

						if (Bukkit.getPluginManager().isPluginEnabled("BarAPI")) {
							BarAPI.setMessage(p, BlockParty.messageManager.BAR_WAITING, 100.0F);
						}

						// Allow players to watch while game in progress
						if (((Config) BlockParty.getArena.get(arenaName)).getGameProgress().equalsIgnoreCase("inLobby")) {
							Start.start(Config.arenaName);
							Signs.updateJoin(Config.arenaName, false);
						} else {
							// Something broke if this ever happens :\
							if (Players.getPlayerAmountOnFloor(arenaName) == 0) {
								((Config) BlockParty.getArena.get(arenaName)).setStart(false);
								((Config) BlockParty.getArena.get(arenaName)).setGameProgress("inLobby");

								Start.start(Config.arenaName);
								Signs.updateJoin(Config.arenaName, false);
							}
						}

						p.sendMessage(BlockParty.messageManager.JOIN_SUCCESS_PLAYER.replace("$ARENANAME$", Config.arenaName));

					} else {
						p.sendMessage(BlockParty.messageManager.JOIN_ERROR_FULL.replace("$ARENANAME$", Config.arenaName));
					}
				} else {
					Signs.updateJoin(Config.arenaName, true);
					p.sendMessage(BlockParty.messageManager.JOIN_ERROR_FULL.replace("$ARENANAME$", Config.arenaName));
				}
			}
		} else {
			p.sendMessage(BlockParty.messageManager.JOIN_ERROR_FULL.replace("$ARENANAME$", Config.arenaName));
		}
	} else {
		p.sendMessage(BlockParty.messageManager.JOIN_ARENA_IS_DISABLED.replace("$ARENANAME$", Config.arenaName));
	}
}
 
开发者ID:Hansdekip,项目名称:BlockParty-1.8,代码行数:74,代码来源:Config.java

示例13: setMessage

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
@Override
public void setMessage(Player player, String message) {
	BarAPI.setMessage(player, message);
}
 
开发者ID:MarcinWieczorek,项目名称:NovaGuilds,代码行数:5,代码来源:BossBarUtilsBarAPIImpl.java

示例14: onPlayerMove

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
@EventHandler
public void onPlayerMove(PlayerMoveEvent e) {
	if (BlockParty.onFloorPlayers.containsKey(e.getPlayer().getName())) {
		loc = e.getPlayer().getLocation();
		loc.setY(loc.getBlockY() - 1);
		try {
			if (loc.getBlock().getTypeId() == (BlockParty.getArena.get(BlockParty.onFloorPlayers.get(e.getPlayer().getName()))).getOutBlock()) {
				if (Players.getPlayerAmountOnFloor((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())) > 1) {
					if (Bukkit.getPluginManager().isPluginEnabled("NoteBlockAPI")) {
						Songs.stop(e.getPlayer());
					}
					e.getPlayer().getInventory().clear();
					e.getPlayer()
							.getInventory()
							.addItem(
									new ItemStack[] { ((Config) BlockParty.getArena.get(BlockParty.onFloorPlayers.get(e.getPlayer().getName())))
											.getVoteItem() });
					e.getPlayer().updateInventory();
					BlockParty.inLobbyPlayers.put(e.getPlayer().getName(), (String) BlockParty.onFloorPlayers.get(e.getPlayer().getName()));

                       //Stats
                       BlockParty.statsManager.setEliminations(e.getPlayer(), (BlockParty.statsManager.getEliminations(e.getPlayer()) + 1));
                       if(Players.getPlayerAmountOnFloor((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())) <= 3)
                       {
                           BlockParty.statsManager.setPlacings(e.getPlayer(), (BlockParty.statsManager.getPlacings(e.getPlayer()) + 1));
                       }
                       if(Players.getPlayerAmountOnFloor((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())) == 3)
                       {
                           BlockParty.statsManager.setPoints(e.getPlayer(), (BlockParty.statsManager.getPoints(e.getPlayer()) + 5));
                           e.getPlayer().sendMessage(BlockParty.messageManager.PERIOD_ANNOUNCE_POINTS_PLUS_FIVE);
                       }
                       if(Players.getPlayerAmountOnFloor((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())) == 2)
                       {
                           BlockParty.statsManager.setPoints(e.getPlayer(), (BlockParty.statsManager.getPoints(e.getPlayer()) + 10));
                           e.getPlayer().sendMessage(BlockParty.messageManager.PERIOD_ANNOUNCE_POINTS_PLUS_TEN);
                       }
                       BlockParty.statsManager.storeStats(e.getPlayer());

                       if(BlockParty.getArena.get((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())).getEnableScoreboard())
                           ScoreboardSys.setLobbyScore(e.getPlayer());
					World world = e.getPlayer().getWorld();
					world.strikeLightning(e.getPlayer().getLocation());
					Config.broadcastInGame(BlockParty.messageManager.PERIOD_ELIMINATED.replace("$PLAYER$", e.getPlayer().getName()), Config.arenaName);

					// e.getPlayer().sendMessage("�3[BlockParty] �8You were �4ELIMINATED");
					e.getPlayer().teleport(Arena.getLobbySpawn((String) BlockParty.onFloorPlayers.get(e.getPlayer().getName())));
					BlockParty.onFloorPlayers.remove(e.getPlayer().getName());
					if (Bukkit.getPluginManager().isPluginEnabled("BarAPI")) {
						BarAPI.setMessage(e.getPlayer(), BlockParty.messageManager.BAR_WAITING, 100.0F);
					}
				}
			}
		} catch (Exception ex) {
			Config.broadcastInGame(BlockParty.messageManager.PERIOD_ELIMINATED.replace("$PLAYER$", e.getPlayer().getName()), Config.arenaName);

			// e.getPlayer().sendMessage("�3[BlockParty] �8You were �4ELIMINATED");
			if (BlockParty.onFloorPlayers.containsKey(e.getPlayer().getName())) {
				BlockParty.onFloorPlayers.remove(e.getPlayer().getName());
			}

			BlockParty.inLobbyPlayers.put(e.getPlayer().getName(), Config.arenaName);
			Arena.leave(e.getPlayer());
		}
	}
}
 
开发者ID:LekoHD,项目名称:BlockParty,代码行数:67,代码来源:MoveListener.java

示例15: join

import me.confuser.barapi.BarAPI; //导入方法依赖的package包/类
public void join(Player p) {
	if (this.isEnabled) {
		if (!BlockParty.inGamePlayers.containsKey(p.getName())) {
			if (exists(p)) {
				if (!Players.reachedMaxPlayers(Config.arenaName)) {
					if ((allowJoinDuringGame == false && (Players.getPlayerAmountOnFloor(arenaName) <= 1)) || allowJoinDuringGame) {
						// Save Player Info
						BlockParty.locs.put(p.getName(), p.getLocation());
						BlockParty.gm.put(p.getName(), p.getGameMode());

						// Reset game mode so they cannot fly
						p.setGameMode(GameMode.ADVENTURE);

						// TP to arena
						p.teleport(this.lobbySpawn);

						// notify everyone someone joined
						broadcastInGame(BlockParty.messageManager.JOIN_SUCCESS_BROADCAST.replace("$PLAYER$", p.getName()), Config.arenaName);

						// Add to game at this point
						BlockParty.inGamePlayers.put(p.getName(), Config.arenaName);
						BlockParty.inLobbyPlayers.put(p.getName(), Config.arenaName);

                           // Scoreboard
                           if(BlockParty.getArena.get(Config.arenaName).getEnableScoreboard())
                               ScoreboardSys.setLobbyScore(p);

						// Archive Inventory
						BlockParty.inventoryManager.storeInv(p, true);
						BlockParty.inventoriesToRestore.add(p.getPlayer().getName());
						p.getInventory().clear();
						p.getInventory().addItem(new ItemStack[] { getVoteItem() });
						p.updateInventory();

						// Play music while they wait :D
						String song = ((Config) BlockParty.getArena.get(arenaName)).getMostVotedSong();
						if ((Bukkit.getPluginManager().isPluginEnabled("NoteBlockAPI")) && (((Config) BlockParty.getArena.get(arenaName)).getUseSongs())) {
							Songs.stop(p);
							Songs.play(p, song);
						}

						if (Bukkit.getPluginManager().isPluginEnabled("BarAPI")) {
							BarAPI.setMessage(p, BlockParty.messageManager.BAR_WAITING, 100.0F);
						}

						// Allow players to watch while game in progress
						if (((Config) BlockParty.getArena.get(arenaName)).getGameProgress().equalsIgnoreCase("inLobby")) {
							Start.start(Config.arenaName);
							Signs.updateJoin(Config.arenaName, false);
						} else {
							// Something broke if this ever happens :\
							if (Players.getPlayerAmountOnFloor(arenaName) == 0) {
								((Config) BlockParty.getArena.get(arenaName)).setStart(false);
								((Config) BlockParty.getArena.get(arenaName)).setGameProgress("inLobby");

								Start.start(Config.arenaName);
								Signs.updateJoin(Config.arenaName, false);
							}
						}

						p.sendMessage(BlockParty.messageManager.JOIN_SUCCESS_PLAYER.replace("$ARENANAME$", Config.arenaName));

					} else {
						p.sendMessage(BlockParty.messageManager.JOIN_ERROR_FULL.replace("$ARENANAME$", Config.arenaName));
					}
				} else {
					Signs.updateJoin(Config.arenaName, true);
					p.sendMessage(BlockParty.messageManager.JOIN_ERROR_FULL.replace("$ARENANAME$", Config.arenaName));
				}
			}
		} else {
			p.sendMessage(BlockParty.messageManager.JOIN_ERROR_FULL.replace("$ARENANAME$", Config.arenaName));
		}
	} else {
		p.sendMessage(BlockParty.messageManager.JOIN_ARENA_IS_DISABLED.replace("$ARENANAME$", Config.arenaName));
	}
}
 
开发者ID:LekoHD,项目名称:BlockParty,代码行数:78,代码来源:Config.java


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