Development Assistance Syntax Error on Token

Discussion in 'Plugin Help/Development/Requests' started by DeadOaks, Jan 31, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    DeadOaks

    Hello, I'm new to Java and I have a question. I made this simple plugin with one command to test a string and get syntax "}" errors.

    Code:
    Code:
        public void onEnable() {
            getLogger().info("Plugin Enabled");
        }
       
        public void onDisable() {
            getLogger().info("Plugin Disabled");
        }
       
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
                Player player = (Player) sender;
                if(cmd.getName().equalsIgnoreCase("what")){
                    player.sendMessage(ChatColor.BOLD + "Gettin real tired of your shit - do you have the map?");
                   
                }
           
                return false;
    }
    
    The last line is #28 in the code, and that is where the error is:
    I understand the {} concept, but not where to place them. If you need more info, I can get it, thank you!
     
  2. Offline

    nverdier

    @DeadOaks This is a very simple problem, and wouldn't be a problem if you knew how to program in Java. This forums isn't used to learn Java, it's used for the Bukkit API and Bukkit servers, etc. Please learn Java, then tell us if you still have the problem (I really hope you don't. Read some books. I know someone on the forums has some good recommendations.
     
  3. Offline

    DeadOaks

    @nverdier So... instead of helping me with my problem under the Plugin Help section with this easy test plugin I made, you would rather criticise a fairly easy problem to fix? It would have been easier to just to tell me the problem instead of writing all of that rude nonsense.

    Not only that, but I've browsed through this section and the Bukkit Forums and found many posts asking for help and people willing to help solve problems and teach people how to write Java.

    You probably didn't read this part: "Hello, I'm new to Java and I have a question."
     
  4. Offline

    nverdier

    @DeadOaks I wan't intending to be rude, but too many people come to these forums needing help with their plugins, when it's really just a simple Java error. Here are a few things you can do to learn Java:
    1) Read the official tutorials.
    2) Do these interactive tutorials.
    3) Read some books. Not sure what ones are good, but I'm sure some people on here have some suggestions.
    4) Watch this guy's videos. Stay away from other Youtubers because most of them teach bad practices.

    And if you're "new to Java", then you shouldn't be using an API that is written in and requires Java as a prerequisite. Again, I'm not trying to be rude, I'm just trying to help you, and the best way to do that is for you to learn Java.
     
Thread Status:
Not open for further replies.

Share This Page