1. Guest, as per the stickied thread, this forum has not been in use since 2014. All bugs and feature requests should be posted to JIRA.

Bug Weather Events

Discussion in 'Bugs & Feature Requests' started by Ryan Wagner, Mar 19, 2013.

  1. I have a weather listener, code below, and in craftbukkit it works just fine. However in Spigot I see storms without notification and I thought it was because spigot had it's own weather handlers. However, in IRC i am being told that is no longer true and that I should report this as a bug. If it is not a bug please point me a resources so I can make the listener spigot compatible, thanks!

    Code (Text):

    public class ListenerWeather implements Listener {
    private pacore ListenerWeather;
    private double chance;
    public <chance> ListenerWeather(pacore ListenerWeather, double num) {
       this.ListenerWeather = ListenerWeather;
       this.chance = num;
    public void onWeatherChange(WeatherChangeEvent eventWeather){
    if ((!eventWeather.isCancelled()) && (eventWeather.toWeatherState())) {
    double dr = Math.random();
    if (dr > this.chance) {
    pacore.log.info("[Weather] Cancelled - The random number was: " + dr + "/" + this.chance);
    } else {
    pacore.log.info("[Weather] Allowed - The random number was: " + dr + "/" + this.chance);
    Bukkit.broadcastMessage(ChatColor.GOLD + "[WEATHER] " + ChatColor.RED + "A storm has started!");
    public void setChance(double parseInt) {
       this.chance = parseInt;
  2. just shy of 24 hours. Can anyone say if this is a bug, or if I need to do something to make it compatible with spigot?