本文整理汇总了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;
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
示例8: onThunderChange
import org.bukkit.event.weather.ThunderChangeEvent; //导入方法依赖的package包/类
@EventHandler(priority=EventPriority.HIGHEST)
public void onThunderChange(ThunderChangeEvent event) {
if(event.toThunderState()) event.setCancelled(true);
}