本文整理汇总了Java中org.kitteh.vanish.event.VanishStatusChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java VanishStatusChangeEvent类的具体用法?Java VanishStatusChangeEvent怎么用?Java VanishStatusChangeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VanishStatusChangeEvent类属于org.kitteh.vanish.event包,在下文中一共展示了VanishStatusChangeEvent类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onVanishStatusChange
import org.kitteh.vanish.event.VanishStatusChangeEvent; //导入依赖的package包/类
/**
* Support VanishNoPacket plugin
*
* @param event vanish status change event
*/
@EventHandler
public void onVanishStatusChange(VanishStatusChangeEvent event) {
Player player = event.getPlayer();
if(event.isVanishing()) {
NovaPlayer nPlayer = PlayerManager.getPlayer(player);
if(nPlayer.getAtRegion() != null) {
plugin.getRegionManager().playerExitedRegion(player);
}
}
else {
NovaRegion region = RegionManager.get(player);
if(region != null) {
plugin.getRegionManager().playerEnteredRegion(player, region);
}
}
}
开发者ID:MarcinWieczorek,项目名称:NovaGuilds,代码行数:24,代码来源:VanishListener.java
示例2: onVanish
import org.kitteh.vanish.event.VanishStatusChangeEvent; //导入依赖的package包/类
@EventHandler
public void onVanish(VanishStatusChangeEvent e) {
CombatTracker p = PlayerModule.getInstance().getPlayer(e.getPlayer()).getCombatTracker();
if(p.isInCombat()) {
if(e.isVanishing()) {
PermissionModule.getInstance().getStaffMembers().broadcast(p.getPlayer().getFormattedName() + ChatColor.YELLOW + " is in vanish gegaan, terwijl hij/zij in gevecht was!");
}
}
}
开发者ID:ThEWiZ76,项目名称:KingdomFactions,代码行数:10,代码来源:VanishListener.java
示例3: onVanish
import org.kitteh.vanish.event.VanishStatusChangeEvent; //导入依赖的package包/类
@EventHandler
public void onVanish(VanishStatusChangeEvent event) {
Player p = event.getPlayer();
IPet pet = EchoPet.getManager().getPet(p);
if (pet != null) {
if(!event.isVanishing()) pet.spawnPet(p, false);
else pet.removePet(false, false);
}
}
开发者ID:Borlea,项目名称:EchoPet,代码行数:10,代码来源:VanishListener.java
示例4: onVanishEvent
import org.kitteh.vanish.event.VanishStatusChangeEvent; //导入依赖的package包/类
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onVanishEvent(VanishStatusChangeEvent event) {
PercentSleepWorld world = plugin.getWorlds().get(event.getPlayer().getWorld().getName());
if (world != null) {
world.skipNightIfPossible(false);
}
}
开发者ID:disturbedfood,项目名称:PercentSleep,代码行数:8,代码来源:PercentSleepVanishListener.java
示例5: onVanish
import org.kitteh.vanish.event.VanishStatusChangeEvent; //导入依赖的package包/类
@EventHandler
public void onVanish(VanishStatusChangeEvent event) {
Player p = event.getPlayer();
IPet pet = EchoPet.getManager().getPet(p);
if (pet != null) {
pet.getEntityPet().setShouldVanish(event.isVanishing());
pet.getEntityPet().setInvisible(event.isVanishing());
}
}
开发者ID:TechzoneMC,项目名称:SonarPet,代码行数:10,代码来源:VanishListener.java
示例6: setup
import org.kitteh.vanish.event.VanishStatusChangeEvent; //导入依赖的package包/类
@Override
public void setup(TerminableConsumer consumer) {
Events.subscribe(VanishStatusChangeEvent.class)
.handler(e -> getPlugin().refreshPlayer(e.getPlayer(), 1L))
.bindWith(consumer);
}
开发者ID:lucko,项目名称:ConditionalPerms,代码行数:7,代码来源:IsVanished.java
注:本文中的org.kitteh.vanish.event.VanishStatusChangeEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论