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


Java PlayerKickEvent.setLeaveMessage方法代码示例

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


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

示例1: onLeave

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onLeave(PlayerKickEvent event){
	Player p = event.getPlayer();
	SPlayer player = SPlayer.getDPlayer(p);
	Skywars.getStorage().unloadData(player);
	event.setLeaveMessage(null);
	Arena a = new ArenaManager().getArena(p);
	if(a==null){
		return;
	}
	a.leave(p);

	player.removeHolo(player);
	
	
}
 
开发者ID:SpikyBite,项目名称:BiteSkywars,代码行数:17,代码来源:PlayerListener.java

示例2: PlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.LOWEST)
public void PlayerKick(final PlayerKickEvent event) {
	final Player player = event.getPlayer();
	if (player.hasMetadata("NPC")) {
		return;
	}
	if (plugin.isUsingCustomJoinQuitMessagesEnabled()) {
		kicked.add(event.getPlayer().getName());
		event.setLeaveMessage("CRAZYLOGIN.KICK");
	}
	if (!plugin.isLoggedIn(player) && plugin.isDelayingJoinQuitMessagesEnabled()) {
		event.setLeaveMessage(null);
	}
	PlayerQuit(player, true);
	Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {

		@Override
		public void run() {
			plugin.unregisterDynamicHooks();
		}
	}, 5);
}
 
开发者ID:ST-DDT,项目名称:CrazyLogin,代码行数:23,代码来源:PlayerListener.java

示例3: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onPlayerKick(final PlayerKickEvent event) {
    this.plugin.entering(this.getClass(), "onPlayerKick");

    String msg = this.punishmentDb.getLeaveMessages().remove(event.getPlayer().getUniqueId());
    if (msg != null) {
        if (this.plugin.isDebugEnabled()) {
            this.plugin.debug("Message not null: '" + msg + '\'');
        }
    } else {
        msg = this.plugin.getMessages().get(MessageId.player_standardKickMessage, event.getPlayer().getName())[0];
        if (this.plugin.isDebugEnabled()) {
            this.plugin.debug("Message is null, setting default: '" + msg + '\'');
        }
    }
    event.setLeaveMessage(msg);

    this.plugin.exiting(this.getClass(), "onPlayerKick");
}
 
开发者ID:Ribesg,项目名称:NPlugins,代码行数:20,代码来源:PunishmentListener.java

示例4: onKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onKick(PlayerKickEvent e) {
    if (e.getReason()
            .equals(ChatColor.RED + "ANNIHILATION-TRIGGER-KICK-01")) {
        e.setReason(ChatColor.RED
                + "You cannot join the game in this phase!");
        e.setLeaveMessage(null);
    }
}
 
开发者ID:cancabron,项目名称:Annihilation,代码行数:10,代码来源:PlayerListener.java

示例5: setFormatChat

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.NORMAL)
public void setFormatChat( PlayerKickEvent e ) {
    PlayerManager.unloadPlayer( e.getPlayer().getName() );
    if ( ServerData.usingConnectionMessages() ) {
        e.setLeaveMessage( null );
    }
}
 
开发者ID:StarQuestMinecraft,项目名称:StarQuestCode,代码行数:8,代码来源:LogoutListener.java

示例6: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler (priority = EventPriority.LOW)
	public void onPlayerKick(PlayerKickEvent e) {
		e.setLeaveMessage("     " + ChatColor.DARK_RED + "" + ChatColor.BOLD + "! " + utils.getNamePrefix(e.getPlayer()) + e.getPlayer().getName() + ChatColor.WHITE +  " - " + ChatColor.RED + "" + ChatColor.ITALIC + e.getReason());
		System.out.println("! " + e.getPlayer().getName() + " " + e.getReason());
//		for (RegisteredListener list : e.getHandlers().getRegisteredListeners()) {
//			log(list.getPlugin().toString());
//		}
//		e.setCancelled(true);
	}
 
开发者ID:Esaych,项目名称:DDCustomPlugin,代码行数:10,代码来源:Chat.java

示例7: PlayerKickMessage

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGHEST)
public void PlayerKickMessage(final PlayerKickEvent event) {
	final Player player = event.getPlayer();
	if (plugin.isUsingCustomJoinQuitMessagesEnabled()) {
		if (event.getLeaveMessage() != null) {
			if (event.getLeaveMessage().equals("CRAZYLOGIN.KICK")) {
				sendDefaultPlayerKickMessage(player);
				event.setLeaveMessage(null);
			}
		}
	}
}
 
开发者ID:ST-DDT,项目名称:CrazyLogin,代码行数:13,代码来源:PlayerListener.java

示例8: bannedPlayer

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void bannedPlayer(PlayerKickEvent e) {
	if(ban.isBanned(e.getPlayer())) {
		e.setLeaveMessage("");
	} else if(ban.isTempBanned(e.getPlayer())) {
		if(!timeunits.isOverTime(fileManager.getLongValue(e.getPlayer().getName().toLowerCase() + ".yml", "time", fileManager.getDir() + File.separator + "bans"))) {
			e.setLeaveMessage("");
		}
	}
}
 
开发者ID:xize,项目名称:xEssentials_old_Source,代码行数:11,代码来源:banKickEvent.java

示例9: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onPlayerKick(PlayerKickEvent event) {
    event.setLeaveMessage(null);
}
 
开发者ID:thekeenant,项目名称:mczone,代码行数:5,代码来源:Events.java

示例10: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onPlayerKick(PlayerKickEvent event) {
	event.setLeaveMessage(null);
}
 
开发者ID:thekeenant,项目名称:mczone,代码行数:5,代码来源:Events.java

示例11: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onPlayerKick(PlayerKickEvent evt) {
    evt.setLeaveMessage(null);
    onLeave(evt.getPlayer());
}
 
开发者ID:Kneesnap,项目名称:Kineticraft,代码行数:6,代码来源:MechanicManager.java

示例12: onKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onKick(PlayerKickEvent event) {
	removeProfile(event);
	event.setLeaveMessage(null);
}
 
开发者ID:HuliPvP,项目名称:Chambers,代码行数:6,代码来源:ProfileListener.java

示例13: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler
public void onPlayerKick(PlayerKickEvent event)
{
	event.setLeaveMessage(null);
}
 
开发者ID:Limeth,项目名称:Breakpoint,代码行数:6,代码来源:PlayerConnectionListener.java

示例14: onPlayerKickEvent

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerKickEvent(PlayerKickEvent event) {
	event.setLeaveMessage(null);
	this.onExit(event.getPlayer());
}
 
开发者ID:imfanhua,项目名称:Minecraft-UAPI,代码行数:6,代码来源:UserListener.java

示例15: onPlayerKick

import org.bukkit.event.player.PlayerKickEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerKick(PlayerKickEvent event) {
    this.module.removeOnlinePlayer(event.getPlayer().getName());
    event.setLeaveMessage(event.getLeaveMessage().replaceFirst(Pattern.quote(event.getPlayer().getName()), ChatColor.RESET + Matcher.quoteReplacement(event.getPlayer().getDisplayName()) + ChatColor.RESET + ChatColor.YELLOW));
}
 
开发者ID:Steveice10,项目名称:Peacecraft,代码行数:6,代码来源:ChatListener.java


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