Open Soruce
Files
All of the downloads are the root dev file that I use. Fell free to make your own version of this plugin. Just please know that you must list this plugin somewhere in that plugin. Thanks
- 0.0.2 InDev - Download http://cdn.isaidno.freeserver.me/0.0.2.zip
Main.java
package me.christophernjspchaka.plugins.no; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin implements Listener { public void onDisable() { System.out.println("[I Said No] Disabled."); } public void onEnable() { getServer().getPluginManager().registerEvents(this, this); System.out.println("[I Said No] Enabled."); try { ISNData.createFiles(); } catch (Exception e) { e.printStackTrace(); } getCommand("nohelp").setExecutor(new CommandExecutor(this)); getCommand("canibestaff").setExecutor(new CommandExecutor(this)); getCommand("mycommands").setExecutor(new CommandExecutor(this)); } @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { event.getPlayer().sendMessage("Welcome, " + event.getPlayer().getDisplayName() + "! Type /nohelp for I Said No Info"); } String message = this.getConfig().getString("message"); }
CommandExecutor.java
package me.christophernjspchaka.plugins.no; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; public class CommandExecutor implements org.bukkit.command.CommandExecutor { @SuppressWarnings("unused") private Main plugin; public CommandExecutor(Main plugin) { this.plugin = plugin; } public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(cmd.getName().equalsIgnoreCase("nohelp")){ sender.sendMessage("/opme - Returns NO! /n /canibestaff - Returns NO!"); } return false; } public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(cmd.getName().equalsIgnoreCase("opme")){ sender.sendMessage("NO!"); } return false; } public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(cmd.getName().equalsIgnoreCase("canibestaff")){ sender.sendMessage("NO!"); } return false; } public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if(cmd.getName().equalsIgnoreCase("mycommands")){ sender.sendMessage("Please type /help for a list of valid commands."); } return false; } }
ISNData.java
package me.christophernjspchaka.plugins.no; import java.io.File; public class ISNData { public static void createFiles() throws Exception { File configFile = new File(Main.getInstance().getDataFolder(), "config.yml"); if (!configFile.exists()) { configFile.getParentFile().mkdirs(); copy(Main.getInstance().getResource("config.yml"), configFile); Main.log.info(Main.getInstance().title + "'config.yml' didn't exist. Created it for you.."); } } }
-
View User Profile
-
Send Message
Posted Apr 4, 2014Hi, the download link isnt working (Site suspended for high CPU usage).
If you need somewhere to host your code you can use github.com (one of the largest code-sharing sites).
Also, you do not list a license. Its illegal for people to use your code unless you specify a license things are automatic copyrighted unless you otherwise give permission in the form of a license. No one can contribute to your code or edit your code (legally). Licenses legally give people permission to use your code but you may restrict their usage if you wish (like name credit). They also provide you legal protection in case something goes wrong with your code (preventing lawsuits...).
You can compare popular licenses at this website. http://choosealicense.com/licenses/
More licenses:
https://tldrlegal.com/licenses/browse