本文整理汇总了Java中cn.nukkit.event.player.PlayerQuitEvent类的典型用法代码示例。如果您正苦于以下问题:Java PlayerQuitEvent类的具体用法?Java PlayerQuitEvent怎么用?Java PlayerQuitEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlayerQuitEvent类属于cn.nukkit.event.player包,在下文中一共展示了PlayerQuitEvent类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onPlayerQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@EventHandler
public void onPlayerQuit(PlayerQuitEvent evt){
String s = (String)pl.getConfig().get("QuitMessage");
if(s != null){
if(!s.equalsIgnoreCase("none")){
evt.setQuitMessage(new TextContainer(s
.replaceAll("&", "§")
.replaceAll("%pleyer", evt.getPlayer().getDisplayName())));
List<String> p = (List<String>)pl.getConfig().get("MOTD");
if(p != null){
for(String k: p){
evt.getPlayer().sendMessage(k
.replaceAll("&", "§")
.replaceAll("%player", evt.getPlayer().getDisplayName()));
}
}
} else {
evt.setQuitMessage(new TextContainer(""));
}
}
}
示例2: onPlyaerQuitEvent
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onPlyaerQuitEvent(final PlayerQuitEvent event){
if(plugin.player != null) {
if (plugin.player.equals(event.getPlayer().getName())) {
CheckGameTimeout.time = 200;
}
}
}
示例3: clall
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void clall(PlayerQuitEvent e){
String name =e.getPlayer().getName();
teamsys.pteamti.put(name,teamsys.ctime);
joinedpvp.remove(name);
lastHit.remove(name);
if(mysql.get(e.getPlayer().getName(),"isvip" ) ==3){
e.getPlayer().setOp(false);
}
if(ap.containsKey(name)){
apc.remove(name);
mysql.addap(name,ap.get(name));
ap.remove(name);
}
}
示例4: onQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onQuit(PlayerQuitEvent event){
Player player = event.getPlayer();
if(users.containsKey(player.getName().toLowerCase())){
users.remove(player.getName().toLowerCase());
}
}
示例5: onQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onQuit(PlayerQuitEvent event){
Player player = event.getPlayer();
if(containers.containsKey(player.getName())){
containers.get(player.getName()).quit();
}
event.setAutoSave(false);
}
示例6: onPlayerQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
FawePlayer fp = FawePlayer.wrap(player);
if (fp != null) {
fp.unregister();
}
Fawe.get().unregister(event.getPlayer().getName());
}
示例7: onLeave
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR)
public void onLeave(PlayerQuitEvent event) {
if (TaskManager.TELEPORT_QUEUE.contains(event.getPlayer().getName())) {
TaskManager.TELEPORT_QUEUE.remove(event.getPlayer().getName());
}
PlotPlayer pp = NukkitUtil.getPlayer(event.getPlayer());
pp.unregister();
}
示例8: onPlayerQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler()
public void onPlayerQuit(PlayerQuitEvent event){
VirtualItem.despawnAllFrom(event.getPlayer());
}
示例9: onQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onQuit(PlayerQuitEvent event){
this.lastMove.remove(event.getPlayer());
}
示例10: onQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onQuit(PlayerQuitEvent event) {
Player player = event.getPlayer();
NoteBlockAPI.getInstance().stopPlaying(player);
}
示例11: onPlayerQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event){
Player player = event.getPlayer();
this.manager.unsetPlayer(player);
}
示例12: onQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler(priority = EventPriority.NORMAL)
public void onQuit(PlayerQuitEvent event) {
Users.closeUser(event.getPlayer());
}
示例13: onQuit
import cn.nukkit.event.player.PlayerQuitEvent; //导入依赖的package包/类
@EventHandler
public void onQuit(PlayerQuitEvent event){
this.attachments.remove(event.getPlayer());
}