From 5785cc2164b058646eb38ac9bab395fcbab5e55e Mon Sep 17 00:00:00 2001 From: Steven Lawson Date: Wed, 19 Sep 2012 23:17:10 -0400 Subject: [PATCH] Misc --- .../TotalFreedomMod/Commands/Command_potion.java | 2 +- .../TotalFreedomMod/TotalFreedomMod.java | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java index 635b219b..8fe31605 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_potion.java @@ -66,7 +66,7 @@ public class Command_potion extends TFM_Command return true; } - for (PotionEffect potion_effect : sender_p.getActivePotionEffects()) + for (PotionEffect potion_effect : target.getActivePotionEffects()) { target.removePotionEffect(potion_effect.getType()); } diff --git a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java index 03517cce..38dc1afd 100644 --- a/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java +++ b/src/me/StevenLawson/TotalFreedomMod/TotalFreedomMod.java @@ -12,6 +12,7 @@ import org.apache.commons.lang.exception.ExceptionUtils; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Server; +import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; @@ -76,6 +77,17 @@ public class TotalFreedomMod extends JavaPlugin { TFM_Util.generateFlatlands(flatlandsGenerationParams); } + + if (disableWeather) + { + for (World world : server.getWorlds()) + { + world.setThundering(false); + world.setStorm(false); + world.setThunderDuration(0); + world.setThunderDuration(0); + } + } } @Override