I feel ever so stupid for not being able to figure this out, but i get the normal 'you screwed up stupid' when i try to run this plugin, and it's wierd because it's very basic. Code: //The Package package com.bukkit.shawn.Basic; import org.bukkit.event.Event; import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.PluginManager; /** * Basic for Bukkit * * @author Saturisk */ //Starts the class public class Basic extends JavaPlugin{ //Links the BasicPlayerListener private final BasicPlayerListener playerListener = new BasicPlayerListener(); @Override //When the plugin is disabled this method is called. public void onDisable() { } @Override //When the plugin is enabled this method is called. public void onEnable() { //Create the pluginmanage pm. PluginManager pm = getServer().getPluginManager(); //Create PlayerCommand listener pm.registerEvent(Event.Type.PLAYER_COMMAND, this.playerListener, Event.Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_JOIN, this.playerListener, Event.Priority.Normal, this); //Get the infomation from the yml file. PluginDescriptionFile pdfFile = this.getDescription(); //Print that the plugin has been enabled! System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" ); } } Code: //The Package package com.bukkit.shawn.Basic; //All the imports import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerChatEvent; import org.bukkit.event.player.PlayerListener; import org.bukkit.event.player.PlayerLoginEvent; import org.bukkit.ChatColor; //Starts the class BasicPlayer listener public class BasicPlayerListener extends PlayerListener{ //This method is called whenever a player uses a command. public void onPlayerJoin(PlayerLoginEvent event) { Player player = event.getPlayer(); player.sendMessage(ChatColor.GREEN + "Welcome to the server " + player.getName() + ", please type '/rules' for the guidelines on this server"); } public void onPlayerCommand(PlayerChatEvent event) { //Make the message a string. String[] split = event.getMessage().split(" "); //Get the player that talked. Player player = event.getPlayer(); //If the first part of the string is /basic or /b then do this. if (split[0].equalsIgnoreCase("/rules")) { player.sendMessage(ChatColor.GREEN + "[1] Don't destroy what isn't yours without permission"); player.sendMessage(ChatColor.GREEN + "[2] Don't nag other players to help you or give you stuff"); player.sendMessage(ChatColor.GREEN + "[3] Have fun"); player.sendMessage(ChatColor.GREEN + "[4] No Griefing"); player.sendMessage(ChatColor.GREEN + "[5] To see a list of commands type '/commands'"); } if (split[0].equalsIgnoreCase("/commands")) { player.sendMessage(ChatColor.GREEN + "Coming soon once i set up everything."); } } } this is my basic and this is my playerListener It gives me the severe warnings, and it's not my YML file, did i set up something wrong?
Oh, I spotted it. You can't use com.bukkit anymore. Change it to something else. http://forums.bukkit.org/threads/on-namespaces-please-do-not-use-bukkit-in-your-plugins.3732/ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Edward XD You are now my favorite person Really quick how do i say: if(player is an op) i say it like (player.isOp) but it doesn't work. Sorry for triple post, but all my plugins have that and it works fine :\ EDIT by Moderator: merged posts, please use the edit button instead of double posting.
alright fixed it. Thanks Edward, once again! Wow it worked, thanks (not that i was doubting you or anything) But on a side note, when i run my SetSpawn thing, it works but the cmd console says unknown command. What is this? EDIT by Moderator: merged posts, please use the edit button instead of double posting.