rain rain go away

This commit is contained in:
NewGarbo 2015-11-26 00:53:01 +00:00
parent 11deec75dd
commit a19ade0739
2 changed files with 16 additions and 1 deletions

View File

@ -243,7 +243,8 @@ public class ClansGame extends MiniPlugin
} }
@EventHandler @EventHandler
public void respawn(PlayerRespawnEvent event){ public void respawn(PlayerRespawnEvent event)
{
_clans.getItemMapManager().setMap(event.getPlayer()); _clans.getItemMapManager().setMap(event.getPlayer());
} }

View File

@ -10,6 +10,7 @@ import org.bukkit.Effect;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
@ -36,6 +37,7 @@ import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.event.player.PlayerFishEvent; import org.bukkit.event.player.PlayerFishEvent;
import org.bukkit.event.player.PlayerFishEvent.State; import org.bukkit.event.player.PlayerFishEvent.State;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.weather.WeatherChangeEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -448,6 +450,18 @@ public class Gameplay extends MiniPlugin
saplingArea.getBlock().setData(block.getData()); saplingArea.getBlock().setData(block.getData());
} }
@EventHandler
public void killRain(UpdateEvent event)
{
if (event.getType() != UpdateType.TWOSEC){
for (World world : Bukkit.getWorlds()){
world.setWeatherDuration(0);
world.setThunderDuration(0);
world.setThundering(false);
}
}
}
@EventHandler @EventHandler
public void WildfireSpread(BlockBurnEvent event) public void WildfireSpread(BlockBurnEvent event)
{ {