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


Java TeamNameChangeEvent类代码示例

本文整理汇总了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();
    }
}
 
开发者ID:twizmwazin,项目名称:CardinalPGM,代码行数:12,代码来源:ScoreboardModule.java

示例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()));
}
 
开发者ID:twizmwazin,项目名称:CardinalPGM,代码行数:13,代码来源:TeamCommands.java

示例3: onTeamChangeName

import in.twizmwaz.cardinal.event.TeamNameChangeEvent; //导入依赖的package包/类
@EventHandler
public void onTeamChangeName(TeamNameChangeEvent event) {
    renderTeamTitle(event.getTeam());
}
 
开发者ID:twizmwazin,项目名称:CardinalPGM,代码行数:5,代码来源:TabList.java


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