[Plugin devlopment] My Commands doesn't work! Need help!

Discussion in 'Plugin Development' started by BoJustus, Mar 10, 2013.

?

Are you from Germany too?

  1. Yes

    2 vote(s)
    28.6%
  2. No

    4 vote(s)
    57.1%
  3. No but I can speak/write in German

    1 vote(s)
    14.3%
Thread Status:
Not open for further replies.
  1. Offline

    BoJustus

    Hello Forum,
    i develop a Minecraft Bukkit Plugin... But my Commands doesn't work!
    Here is a Error Message:
    Code:
    13:59:33 [WARNUNG] Unexpected exception while parsing console command "teleportmap"
    org.bukkit.command.CommandException: Unhandled exception executing command 'teleportmap' in plugin BoJustus vDEV VERSION 0.1
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
        at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchCommand(CraftServer.java:514)
        at org.bukkit.craftbukkit.v1_4_R1.CraftServer.dispatchServerCommand(CraftServer.java:506)
        at net.minecraft.server.v1_4_R1.DedicatedServer.al(DedicatedServer.java:260)
        at net.minecraft.server.v1_4_R1.DedicatedServer.r(DedicatedServer.java:225)
        at net.minecraft.server.v1_4_R1.MinecraftServer.q(MinecraftServer.java:494)
        at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java:427)
        at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:849)
    Caused by: java.lang.NullPointerException
        at me.BoJustus.Core.Main.onCommand(Main.java:179)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
        ... 8 more
    Plugin.yml:
    Code:
      teleportmap:
        description: Teleport YOU to the new Map
        usage: /<command>
    Main.java (The Command Class):
    Code:
    if(cmd.getName().equalsIgnoreCase("teleportmap"))
            {
                p.sendMessage("Trying to teleport you...");
                teleport();
            if (sender instanceof Player) {
                p.sendMessage("...");
                teleport();
            }
            else {
                Player p = (Player) sender;
               
                p.sendMessage("Please wait...");
                teleport();
               
     
     
     
            }
            return true;
            }
    What is false?


    Sorry my english is not so good because I am from Germany ;)
     
  2. Offline

    crushh87

    Wrong section, durch die Art und Weise. Dies geht in die Plugin Entwicklung tätig.

    Und ist, dass Sie ganze plugin.yml oder nur einen Teil. Wenn es nur ein Teil ist, können wir die ganze Sache?
    Auch das, was auf der Linie 179?

    (google translate)
     
  3. Offline

    Necrodoom

    your problem is failing to use the teleport function properly, along with logic error trying to teleport non-players.
    please read http://jd.bukkit.org/rb/apidocs/
     
  4. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Moving to the proper forum. BoJustus
     
Thread Status:
Not open for further replies.

Share This Page