Vault fails to hook Privileges.
andrepl opened this issue ยท 10 comments
At one point during testing I had this working, but there must be an issue with dependencies / plugin load order, because I haven't been able to reproduce a working setup since then.
When my only plugins are Privileges, Vault and a test plugin designed to look up someones primary group through vault, my startup looks like this:
12:27:26 [INFO] Starting minecraft server version 1.4.6
12:27:26 [INFO] Loading properties
12:27:26 [INFO] Default game type: SURVIVAL
12:27:26 [INFO] Generating keypair
12:27:26 [INFO] Starting Minecraft server on *:25565
12:27:26 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.6-R0.3-b2586jnks (MC: 1.4.6) (Implementing API version 1.4.6-R0.3)
12:27:26 [INFO] [Vault] Loading Vault v1.2.22-b277
12:27:26 [INFO] [Privileges] Loading Privileges v1.7.4-b147
12:27:26 [INFO] [TestPlugin] Loading TestPlugin v0.0.1
12:27:26 [INFO] [Vault] Enabling Vault v1.2.22-b277
12:27:26 [INFO] [Vault][Permission] Privileges found: Loaded
12:27:26 [INFO] [Vault][Permission] SuperPermissions loaded as backup permission system.
12:27:26 [INFO] [Vault] Enabled Version 1.2.22-b277
12:27:26 [INFO] [Privileges] Enabling Privileges v1.7.4-b147
Once upon a time (2 days ago) it used to say: "[INFO] [Vault] [Permission] hooked." as well. (the privileges vault plugin defines it's name as "", hence the extra space instead of saying 'Privileges hooked'...
Without getting that 'hooked' message, the group checks fail from my test plugin:
12:24:49 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'tg' in plugin TestPlugin v0.0.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
at org.bukkit.craftbukkit.v1_4_6.CraftServer.dispatchCommand(CraftServer.java:514)
at net.minecraft.server.v1_4_6.PlayerConnection.handleCommand(PlayerConnection.java:979)
at net.minecraft.server.v1_4_6.PlayerConnection.chat(PlayerConnection.java:897)
at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:852)
at net.minecraft.server.v1_4_6.Packet3Chat.handle(Packet3Chat.java:44)
at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:290)
at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112)
at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39)
at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:598)
at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:494)
at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.NullPointerException
at net.milkbowl.vault.permission.plugins.Permission_Privileges.getPrimaryGroup(Permission_Privileges.java:147)
at net.milkbowl.vault.permission.Permission.getPrimaryGroup(Permission.java:646)
at com.norcode.bukkit.testplugin.TestPlugin.onCommand(TestPlugin.java:25)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
... 15 more
This DID work at one point with the right magical combination of plugins affecting the load order in just the right way (I assume) but I've been unable to reproduce that working state ever since.
Vault hooks at startup, there isn't a load order possible as it doesn't construct all the connectors until the plugin finishes loading. The fact that is shows: 12:27:26 [INFO] [Vault][Permission] Privileges found: Loaded
means that it's creatingthe hook.
Are there any other messages after Privs loads on your system?
All hooks are assumed to be not-stable until after all plugins are used, are you attempting to test a hook before the server has finished starting up?
you mentioned adding specific plugins causes it to fail, which plugins are these?
Also do you ever see a 'Priveleges hooked' message from Vault?
The messages i pasted are the extent of my startup. there is no 'hooked' message ever, and my code is run from a command executed by a logged in player after the server starts up.. The full code for my testplugin is here: http://pastebin.com/tM8A6vXX
There are no specific plugins that cause it to fail, in fact I can't find any combination of plugins that will allow it to work (including ONLY the 3 listed here). It did work at one point but I've since tried recreating the same setup several times with no luck, I just never get the 'hooked' message i'm expecting (and group checks fail)
Here is a compiled version of my test plugin. https://www.box.com/s/l5lj60f9iaqluxxud3ih I just tested bringing up a brand new Linux virtual machine, installing the latest CB Recommended Build, and downloaded Privileges and Vault's latest versions from DBO. with and without my test plugin, I never get a hooked message from vault, and with my plugin, the group checks fail with the same stack trace as above.
Steps to reproduce:
- download http://dl.bukkit.org/downloads/craftbukkit/get/01845_1.4.7-R1.0/craftbukkit.jar
- execute it
- download: http://dev.bukkit.org/media/files/660/679/Privileges.jar and http://dev.bukkit.org/media/files/656/592/Vault.jar
- launch craftbukkit again. No 'hooked' message.
- stop server
- download https://www.box.com/s/l5lj60f9iaqluxxud3ih
- restart server, log in and run /tg
- see stack trace
I managed to get Privileges to load before Vault like bPerms does, but it still didn't hook:
19:19:34 [INFO] [Privileges] Loading Privileges v1.7.4-bDEV
19:19:34 [INFO] [Vault] Loading Vault v1.2.22-b277
19:19:34 [INFO] [TestPlugin] Loading TestPlugin v0.0.1
19:19:34 [INFO] [Vault] Enabling Vault v1.2.22-b277
19:19:34 [INFO] [Vault][Permission] Privileges found: Loaded
19:19:34 [INFO] [Vault][Permission] SuperPermissions loaded as backup permission system.
19:19:34 [INFO] [Vault] Enabled Version 1.2.22-b277
19:19:35 [INFO] [Privileges] Enabling Privileges v1.7.4-bDEV
19:19:35 [INFO] [TestPlugin] Enabling TestPlugin v0.0.1
I'd appreciate if you could test Build 297 http://ci.herocraftonline.com/job/Vault/297/
Seems to work perfectly now. I tried throwing a few more plugins in the mix and it consistently hooks now.
odd, in the event apparently it thinks that the plugin is not enabled even though it was throwing the pluginenableevent. I've disabled that check on all the connectors in dcaase it causes problems.
does this happen with any other permission managers? or just Privs? There isn't any difference in how the hook is being handled in Privs from the other hooks, so it seems odd to me that it simply wouldn't hook in.
19:02:55 [INFO] Starting minecraft server version 1.4.7
19:02:55 [INFO] Loading properties
19:02:55 [INFO] Default game type: SURVIVAL
19:02:55 [INFO] Generating keypair
19:02:55 [INFO] Starting Minecraft server on *:25565
19:02:56 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.7-R1.0-b2624jnks (MC: 1.4.7) (Implementing API version 1.4.7-R1.0)
19:02:56 [INFO] [bPermissions] Loading bPermissions v2.10.4
19:02:56 [INFO] [Vault] Loading Vault v1.2.22-b277
19:02:56 [INFO] [TestPlugin] Loading TestPlugin v0.0.1
19:02:56 [INFO] [Vault] Enabling Vault v1.2.22-b277
19:02:56 [INFO] [Vault][Permission] bPermissions2 hooked.
19:02:56 [INFO] [Vault][Permission] bPermissions 2 found: Loaded
19:02:56 [INFO] [Vault][Permission] SuperPermissions loaded as backup permission system.
19:02:56 [INFO] [Vault][Chat] bPermissions2 hooked.
19:02:56 [INFO] [Vault][Chat] bPermssions2 found: Loaded
19:02:56 [INFO] [Vault] Enabled Version 1.2.22-b277
19:02:56 [INFO] Preparing level "world"
19:02:56 [INFO] Preparing start region for level 0 (Seed: -238467957945212856)
19:02:56 [INFO] Preparing start region for level 1 (Seed: -238467957945212856)
19:02:57 [INFO] Preparing start region for level 2 (Seed: -238467957945212856)
19:02:57 [INFO] Preparing spawn area: 81%
19:02:57 [INFO] [bPermissions] Enabling bPermissions v2.10.4
19:02:57 [INFO] [TestPlugin] Enabling TestPlugin v0.0.1
The primarygroup check works fine too.
I'm able to hook directly into Privileges and get the group, so it's working fine on it's own, but vault isn't hooking it properly, or vice versa.