Plugin category: AdminTools Suggested name: WeatherOff *Just a suggestion, im terrible at names.* What I want: Well, i know there used to be some of these, but i haven't found a single updated one in a while. I've seen servers that do it but they never tell me exactly how its done. So i'm requesting a plugin to make it short sweet and to the point. Basically, i would like a plugin that just disables weather. No snow, no rain, no lightning. Just a normal day and normal night. No weather effects whats-so-ever. Ideas for commands: /permtoggle weather or just no commands and it auto does it in the config. Ideas for permissions: Make it so if there is a command, only OP can use it. And no one can see that OP is using it, they just notice hey no rain sweet When I'd like it by: Any time, but hopefully as soon as possible. Don't wanna open the server until we can get it situated Thank you for taking the time to read this and if you create it thank you very much Anyone looking into this?
Any chance you want to learn to create plugins yourself? This is a really simple plugin and a good one for beginners. Otherwise, I can send you a link to something I threw together called "NoRain" It disables weather but the "/toggledownfall" command still works for admins.
I've always wanted to learn how to do it, i just never really dove into it. Is there tutorials on Bukkit?
The only program experience i've ever had was making a JavaScript website become red. I went into it for about a good 20 minutes, copied the code from the video, did it, then i just never really continued. So basically starting from scratch lol
Download link for NoRain: https://dl.dropboxusercontent.com/u/23866327/Plugins/Dev Builds/NoRain.jar Full plugin Source: Code:java package com.codisimus.norain; import org.bukkit.event.EventHandler;import org.bukkit.event.EventPriority;import org.bukkit.event.Listener;import org.bukkit.event.player.PlayerCommandPreprocessEvent;import org.bukkit.event.weather.WeatherChangeEvent;import org.bukkit.plugin.java.JavaPlugin; public class NoRain extends JavaPlugin implements Listener { //This is a variable that our two methods will use to "communicate" with each other private boolean denyRain = true; @Override public void onEnable() { //Register all of the EventHandlers within this class getServer().getPluginManager().registerEvents(this, this); } @EventHandler (ignoreCancelled = true, priority = EventPriority.LOW) public void onWeatherChange(WeatherChangeEvent event) { if (event.toWeatherState()) { //Rain is trying to turn on //Cancel the event if denyRain is set to true event.setCancelled(denyRain); } //Reset the denyRain value until next time a Player issues the /toggledownfall command denyRain = true; } @EventHandler (ignoreCancelled = true, priority = EventPriority.MONITOR) public void onPlayerCommand(PlayerCommandPreprocessEvent event) { //Check if the Player is attempting to change the weather if (event.getMessage().startsWith("/toggledownfall")) { //Verify that the Player has permission to change the weather if (event.getPlayer().hasPermission("bukkit.command.toggledownfall")) { //Allow the Rain to start for this occasion denyRain = false; } } }} Simple version of the plugin: Code:java package com.codisimus.norain; import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.weather.WeatherChangeEvent;import org.bukkit.plugin.java.JavaPlugin; public class NoRain extends JavaPlugin implements Listener { @Override public void onEnable() { getServer().getPluginManager().registerEvents(this, this); } @EventHandler public void onWeatherChange(WeatherChangeEvent event) { event.setCancelled(true); }} Sorry for the double post but editing the previous one messes up how the code is formatted. I just wanted to point out that this plugin is taken directly from <Removed shortened link - Shorted links are not allowed here - Necrodoom> . This is one of the first plugins that it walks you through creating. EDIT by Moderator: merged posts, please use the edit button instead of double posting.