My plugin I made is not working -please help-

Discussion in 'Plugin Development' started by sapita, Oct 22, 2013.

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

    sapita

    Hello! A bit of a problem here. I've recently made a simple plugin that if the user runs a command it tells them what my server is about! I get a very weird and long error in the console upon starting. Here is my class:

    Code:
    package me.sapita.fplugin;
    
    import org.bukkit.Bukkit;
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class class1 extends JavaPlugin {
     
        public void onEnable() {
            Bukkit.getServer().getLogger().info("Test Plugin Enabled!");
    }
    
    public void onDisable() {
            Bukkit.getServer().getLogger().info("Test Plugin Disabled!");
    }
    
    public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
       
            if (!(sender instanceof Player)) {
                    sender.sendMessage(ChatColor.AQUA + "The console ran the test command! Good job!");
                    return true;
            }
       
            Player player = (Player) sender;
       
            if (cmd.getName().equalsIgnoreCase("test")) {
                    player.sendMessage(ChatColor.DARK_AQUA + "Custom-Aspect Gaming is all about giving YOU the minecraft player a great experience on Minecraft multiplayer. We strive the best to bring you custom gamemodes and great staff. Enjoy the server!");
            }
            return true;
    }
    }
    Here is my plugin.yml :

    Code:
    name: CustomCommands
    version: 1.0
    main: me.sapita.fplugin.class1
    author: sapita
    description: Custom plugin by sapita owner of server. This plugin adds custom commands that display text and do special features.
    
    commands:
        aspects:
            usage: /<command>
            description: Info command!
         
         
         
         
    name: Test
    version: 1.0
    main: me.pogostick29.test.Test
    author: PogoStick29
    description: A test plugin!
    
    commands:
        test:
            usage: /<command>
            description: A test command!
    Would be greatly helpful if someone could tell me what's wrong with my plugin or how I can fix it! Thank you. (PS Yes I did put the plugin in my plugins folder and restarted the server and I'm running on latest CraftBukkit.)

    Hi, this is my plugin.yml actually. sorry
    Code:
    name: CustomCommands
    version: 1.0
    main: me.sapita.fplugin.class1
    author: sapita
    description: Custom plugin by sapita owner of server. This plugin adds custom commands that display text and do special features.
     
    commands:
        aspects:
            usage: /<command>
            description: Info command!
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 5, 2016
  2. Offline

    Iroh

    Moved to plugin development.
     
  3. Offline

    Garris0n

    What error?
     
  4. Offline

    sapita

    @Garris0n
    Here's the error.

    Code:
    2013-10-22 16:31:06 [SEVERE] Could not load 'plugins\CustomCommands6.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:257)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:132)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugins(CraftServer.java:239)
        at org.bukkit.craftbukkit.v1_6_R3.CraftServer.<init>(CraftServer.java:217)
        at net.minecraft.server.v1_6_R3.PlayerList.<init>(PlayerList.java:56)
        at net.minecraft.server.v1_6_R3.DedicatedPlayerList.<init>(SourceFile:11)
        at net.minecraft.server.v1_6_R3.DedicatedServer.init(DedicatedServer.java:107)
        at net.minecraft.server.v1_6_R3.MinecraftServer.run(MinecraftServer.java:393)
        at net.minecraft.server.v1_6_R3.ThreadServerApplication.run(SourceFile:583)
    Caused by: while scanning for the next token
    found character    '\t' that cannot start any token
    in "<reader>", line 8, column 1:
            aspects:
        ^
     
    
     
  5. Offline

    5pHiNxX

    @sapita: just don't use TAB (\t) for the plugin.yml and use SPACES instead ...
     
  6. Offline

    sapita

    5pHiNxX

    Thank you so much! :)
     
Thread Status:
Not open for further replies.

Share This Page