ksafin / DynamicEconomy

A Virtual Economy for your Minecraft Server
http://dev.bukkit.org/server-mods/dynamiceconomy-v-01/
12 stars 7 forks source link

Using /dyneconupdate thru console #38

Closed LordRalex closed 12 years ago

LordRalex commented 12 years ago

When using the command thru the console, you get a null pointer because you assumed the CommandSender was a player, when the console is not.

2012-03-20 16:54:18 [WARNING] Unexpected exception while parsing console command org.bukkit.command.CommandException: Unhandled exception executing command 'dyneconupdate' in plugin DynamicEconomy v.8.3 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166) at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:469) at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:465) at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:599) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:568) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452) at net.minecraft.server.ThreadServerApplication.run(SourceFile:490) Caused by: java.lang.NullPointerException at net.milkbowl.vault.permission.Permission.has(Permission.java:101) at me.ksafin.DynamicEconomy.DynamicEconomyCommandExecutor.onCommand(DynamicEconomyCommandExecutor.java:428) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40) ... 7 more

I can fork it and do a pull request if you want me to fix this

ksafin commented 12 years ago

I'll change all of my commands to work with console (except like, buy and sell).

... eventually.

LordRalex commented 12 years ago

It is a relatively easy fix. I can fork it and do a pull request if you want me to do it?

It is just that the command should be use-able in the console, seems the best place to use it

ksafin commented 12 years ago

My code isn't up to date

LordRalex commented 12 years ago

<.<

ksafin commented 12 years ago

Fixed