Skip to content
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

[1.12.2] Console spell teaching errors out for offline player #76

Closed
jacklin213 opened this issue Oct 31, 2018 · 0 comments · Fixed by #79
Closed

[1.12.2] Console spell teaching errors out for offline player #76

jacklin213 opened this issue Oct 31, 2018 · 0 comments · Fixed by #79
Assignees
Labels

Comments

@jacklin213
Copy link
Member

jacklin213 commented Oct 31, 2018

HPS Version: 1.1.9 BETA
Spigot Version: 1.12.2 r0.1

If you try to teach spells to a player through console and the player isn't online it throws an error

[15:24:20 WARN]: Unexpected exception while parsing console command "teach time manginoanime"
org.bukkit.command.CommandException: Unhandled exception executing 'teach time manginoanime' in com.hpspells.core.HPS$HackyCommand(teach)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:148) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:648) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:634) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:444) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:407) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_171]
Caused by: java.lang.NullPointerException
        at com.hpspells.core.command.Teach.onCommand(Teach.java:57) ~[?:?]
        at com.hpspells.core.HPS$HackyCommand.execute(HPS.java:388) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot-1.12.2.jar:git-Spigot-642f6d2-57ab4cf]
        ... 7 more

Remedies either:

  • Message console saying player is not online
  • Add spells to PSC for the player (If they have played before vs New player)
@jacklin213 jacklin213 self-assigned this Oct 31, 2018
@jacklin213 jacklin213 added the Bug label Oct 31, 2018
@jacklin213 jacklin213 added this to the 1.1.10 milestone Oct 31, 2018
@jacklin213 jacklin213 changed the title [1.1.9] Console spell teaching errors out for offline player [1.12.2] Console spell teaching errors out for offline player Oct 31, 2018
@jacklin213 jacklin213 removed this from the 1.1.10 milestone Feb 21, 2019
jacklin213 added a commit that referenced this issue May 11, 2019
Changelog:

Issues:
* Fix #76 Teaching offline player no longer throws NPE
* Fix incorrect casing for "harrypotterspell.list.others" permission in
SpellList

Spells:
* Add new spell "Arrow" which fires arrows out of wand
* Add new spell "Duro" which changes the target block into stone
* Expelliarmus:
* Fixed bug where normal sticks were disarmed
* Fixed bug where custom wands would not be disarmed
* Point Me:
* Add missing spell description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant