New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

サーバーコンソールで「ch info (channel名)」を実行すると、NullPointerExceptionが起こる #45

Closed
ucchyocean opened this Issue Sep 9, 2013 · 2 comments

Comments

Projects
None yet
1 participant
@ucchyocean
Owner

ucchyocean commented Sep 9, 2013

サーバーコンソールで「ch info (channel名)」を実行すると、NullPointerExceptionが起こる。

【Exceptionの内容】

2013-09-09 23:01:01 [WARNING] Unexpected exception while parsing console command "ch info aaaa"
org.bukkit.command.CommandException: Unhandled exception executing command 'ch' in plugin LunaChat v2.3.2
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:191)
    at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523)
    at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchServerCommand(CraftServer.java:512)
    at net.minecraft.server.v1_6_R2.DedicatedServer.ar(DedicatedServer.java:262)
    at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:227)
    at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486)
    at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419)
    at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
Caused by: java.lang.NullPointerException
    at com.github.ucchyocean.lc.command.InfoCommand.runCommand(InfoCommand.java:97)
    at com.github.ucchyocean.lc.command.LunaChatCommand.onCommand(LunaChatCommand.java:78)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
    ... 8 more

@ghost ghost assigned ucchyocean Sep 9, 2013

@ucchyocean

This comment has been minimized.

Show comment
Hide comment
@ucchyocean

ucchyocean Sep 9, 2013

Owner

【障害の原因】
スタックトレースにあるとおり、InfoCommand.java:97 で、

        // BANされていないかどうか確認する
        if ( channel.getBanned().contains(player.getName()) ) {

player が null なのに、player.getName() していることが原因。

Owner

ucchyocean commented Sep 9, 2013

【障害の原因】
スタックトレースにあるとおり、InfoCommand.java:97 で、

        // BANされていないかどうか確認する
        if ( channel.getBanned().contains(player.getName()) ) {

player が null なのに、player.getName() していることが原因。

ucchyocean added a commit that referenced this issue Sep 10, 2013

@ucchyocean

This comment has been minimized.

Show comment
Hide comment
@ucchyocean

ucchyocean Sep 11, 2013

Owner

Fixed.
動作確認OK

Owner

ucchyocean commented Sep 11, 2013

Fixed.
動作確認OK

@ucchyocean ucchyocean closed this Sep 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment