So I recently started to program with bukkit, but I don't have much experience. Can someone tell if this code will work? The goal is to always have it sunny in the server (no rain). My main class: public class Main extends JavaPlugin{ public void onEnable(){ new ChangeWeatherListener(this); } } My Listener class: public class ChangeWeatherListener implements Listener { public ChangeWeatherListener(Main plugin){ plugin.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler public void onWeatherChange(WeatherChangeEvent e){ World world = e.getWorld(); world.setThundering(false); world.setStorm(false); } }
First off, please encase your code in [.code=java] [/code] tags (Without the dot before code) Why do you ask if it will work? You should test it yourself to see if it works, then if not, post here