File cannot be null exception

Discussion in 'Plugin Development' started by Jobi, Apr 17, 2012.

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

    Jobi

    In my plugin i have a command, that should create some things in a config file. I already have a working config file, but i can' t write some things in it from an other class that isn' t the main class. That means for example that someone performs the command "/trampolin create abc". Now im looking, weather this trampolin already exists, and when not, i want to create it. The problem is, that then this error occurs:

    Code:
    20:37:48 [SCHWERWIEGEND] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'tram
    polin' in plugin FunnyThings v1.0
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:16
    6)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:4
    73)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:821)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
     
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
            at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
            at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:7
    8)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.IllegalArgumentException: File cannot be null
            at org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(Yam
    lConfiguration.java:171)
            at org.bukkit.plugin.java.JavaPlugin.reloadConfig(JavaPlugin.java:117)
            at org.bukkit.plugin.java.JavaPlugin.getConfig(JavaPlugin.java:111)
            at joba97.FunnyThings.commands.trampolin.DeleteTrampolin(trampolin.java:
    146)
            at joba97.FunnyThings.commands.trampolin.onCommand(trampolin.java:56)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
            ... 12 more
     
  2. Offline

    dddeeefff

Thread Status:
Not open for further replies.

Share This Page