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


Java ThunderChangeEvent.toThunderState方法代码示例

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


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

示例1: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGH)
public void onThunderChange(ThunderChangeEvent event)
{
    try
    {
        if (event.getWorld() == TFM_AdminWorld.getInstance().getWorld() && TFM_AdminWorld.getInstance().getWeatherMode() != TFM_AdminWorld.WeatherMode.OFF)
        {
            return;
        }
    }
    catch (Exception ex)
    {
    }

    if (event.toThunderState() && TFM_ConfigEntry.DISABLE_WEATHER.getBoolean())
    {
        event.setCancelled(true);
        return;
    }
}
 
开发者ID:Yoshi41023,项目名称:TatsuCraftMod,代码行数:21,代码来源:TFM_WeatherListener.java

示例2: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority=EventPriority.HIGHEST)
public void onThunderChange(ThunderChangeEvent event) {
  
  if (plugin.getConfig().getString("toggle.noweather").equals(true)) {	
	boolean storm = event.toThunderState();
	if(storm)
		event.setCancelled(true);
	}
}
 
开发者ID:SlamTheHam,项目名称:UltraCore,代码行数:10,代码来源:Events.java

示例3: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGHEST)
public void onThunderChange(ThunderChangeEvent event) {

    if (plugin.getConfig().getString("toggle.noweather").equals(true)) {
        boolean storm = event.toThunderState();
        if (storm)
            event.setCancelled(true);
    }
}
 
开发者ID:SlamTheHam,项目名称:UltraCore,代码行数:10,代码来源:Events.java

示例4: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority=EventPriority.HIGHEST)
public void onThunderChange(ThunderChangeEvent event) {
    boolean storm = event.toThunderState();

    if (storm) {
        event.setCancelled(true);
    }
}
 
开发者ID:ijoeleoli,项目名称:ZorahPractice,代码行数:9,代码来源:EnvironmentListener.java

示例5: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.HIGHEST)
public void onThunderChange(final ThunderChangeEvent event)
{
	final ProtectHolder settings = prot.getSettings();

	if (!event.isCancelled() && settings.getData().isDisableThunder() && event.toThunderState())
	{
		event.setCancelled(true);
	}
}
 
开发者ID:Curtis3321,项目名称:Essentials,代码行数:11,代码来源:EssentialsProtectWeatherListener.java

示例6: thunder

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority = EventPriority.LOWEST)
public void thunder(ThunderChangeEvent e) {
    if (isDedicated() || isNotBlacklist(e.getWorld().getName())) {
        if (e.toThunderState()) {
            e.setCancelled(true);
        }
    }

}
 
开发者ID:Relicum,项目名称:SuperSkyBros,代码行数:10,代码来源:WorldListeners.java

示例7: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority=EventPriority.HIGHEST)
public void onThunderChange(ThunderChangeEvent event) {
    boolean storm = event.toThunderState();
    if(storm) event.setCancelled(true);
}
 
开发者ID:cadox8,项目名称:PA,代码行数:6,代码来源:PACreativo.java

示例8: onThunderChange

import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority=EventPriority.HIGHEST)
public void onThunderChange(ThunderChangeEvent event) {
    if(event.toThunderState()) event.setCancelled(true);
}
 
开发者ID:cadox8,项目名称:PA,代码行数:5,代码来源:PlayerEvents.java


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