GroupManager / unofficial

GNU General Public License v3.0
10 stars 8 forks source link

manudel in console #8

Open CreepsoOff opened 5 years ago

CreepsoOff commented 5 years ago

Hello, so I was using a plugin working with GroupManager but i got in trouble when it comes to "manudel " I'm running GroupManager 0.2.0, with Spigot-1.8.8 and I was on 1.9.4 with ViaVersion

Bukkit/Spigot Version Spigot version 1.8.8-R0.1-SNAPSHOT

GroupManager Version 0.2.0

Other Plugins image

Describe Issue With a plugin called RankGrantPlus there is an option to grant, a certain group for an amount of time, or permanently, when this time is excessed, the plugin execute the command "/manudel %target%" (/manudel ) but it generates a console error, tried to do it manually in the console and get the error too, so this comes from GM but not from my plugin.

Console Errors & Exceptions [00:32:36] [Server thread/WARN]: Unexpected exception while parsing console command "manudel _Creepso" org.bukkit.command.CommandException: Unhandled exception executing command 'manudel' in plugin GroupManager v0.2.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchCommand(CraftServer.java:641) ~[spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.dispatchServerCommand(CraftServer.java:627) [spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at net.minecraft.server.v1_8_R3.DedicatedServer.aO(DedicatedServer.java:412) [spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:375) [spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at java.lang.Thread.run(Thread.java:813) [?:1.8.0_192] Caused by: java.lang.IllegalArgumentException: Name cannot be null at org.apache.commons.lang.Validate.notNull(Validate.java:192) ~[spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at org.bukkit.craftbukkit.v1_8_R3.CraftServer.getPlayer(CraftServer.java:403) ~[spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] at org.anjocaido.groupmanager.GroupManager.onCommand(GroupManager.java:576) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spigotmc-1.8.8-R0.1.jar:git-Spigot-e4d4710-e1ebe52] ... 8 more

ghost commented 5 years ago

Hi! Please try using the this build for 1.8.8, and see if the issue persists.

AtjonTV commented 5 years ago

I did a little test and I can confirm /manudel working in 0.2.0 on

(No other plugins) (GM and Spigot were build from Source)


For me this doesnt seem like a issue in GM in standalone, it may be caused by another plugin you have running, or the Spigot Server.

Looking at the code where the issue come from, and the Stacktrace you gave:

  1. The issue is: Name cannot be null at
  2. Caused by GroupManager line 576: targetPlayer = this.getServer().getPlayer(auxUser.getLastName());
  3. Your player does not have a Name!?

I made a little patch that uses the UUID rather then the Name:

Issue8-Patch.txt

You can apply that patch to the code using git am Issue8-Patch.txt (Automatically Commits it, you can just push now)

I can also make a PR if you would like that ;D

CreepsoOff commented 5 years ago

Switched to LuckPerms so yeah, thanks for the help

ghost commented 5 years ago

@AtjonTV Thank you, please feel free to make a pull request!

AtjonTV commented 5 years ago

@Xadzkon the PR is open and ready for review ;D

Markyroson commented 4 years ago

@Xadzkon You merged the PR, so this could probably be closed(?)