本文整理汇总了Java中in.twizmwaz.cardinal.event.TeamNameChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java TeamNameChangeEvent类的具体用法?Java TeamNameChangeEvent怎么用?Java TeamNameChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TeamNameChangeEvent类属于in.twizmwaz.cardinal.event包,在下文中一共展示了TeamNameChangeEvent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTeamNameChange
import in.twizmwaz.cardinal.event.TeamNameChangeEvent; //导入依赖的package包/类
@EventHandler
public void onTeamNameChange(TeamNameChangeEvent event) {
if (event.getTeam().isObserver()) return;
updateTeamTitle(event.getTeam());
if (Blitz.matchIsBlitz()) {
updateTeamBlitz();
}
if (ScoreModule.matchHasScoring()) {
updateTeamScore();
}
}
示例2: alias
import in.twizmwaz.cardinal.event.TeamNameChangeEvent; //导入依赖的package包/类
@Command(aliases = {"alias"}, desc = "Renames a the team specified.", usage = "<team> <name>", min = 2)
@CommandPermissions("cardinal.team.alias")
public static void alias(final CommandContext cmd, CommandSender sender) throws CommandException {
Optional<TeamModule> team = Teams.getTeamByName(cmd.getString(0));
if (!team.isPresent()) {
throw new CommandException(new LocalizedChatMessage(ChatConstant.ERROR_NO_TEAM_MATCH).getMessage(ChatUtil.getLocale(sender)));
}
String msg = cmd.getJoinedStrings(1);
ChatUtil.getGlobalChannel().sendLocalizedMessage(new UnlocalizedChatMessage(ChatColor.GRAY + "{0}", new LocalizedChatMessage(ChatConstant.GENERIC_TEAM_ALIAS, team.get().getCompleteName() + ChatColor.GRAY, team.get().getColor() + msg + ChatColor.GRAY)));
team.get().setName(msg);
Bukkit.getServer().getPluginManager().callEvent(new TeamNameChangeEvent(team.get()));
}
示例3: onTeamChangeName
import in.twizmwaz.cardinal.event.TeamNameChangeEvent; //导入依赖的package包/类
@EventHandler
public void onTeamChangeName(TeamNameChangeEvent event) {
renderTeamTitle(event.getTeam());
}