Vault

Vault

7M Downloads

I still cant support vault in my plugin!

danieltabrizian opened this issue ยท 18 comments

commented

its very important that my plugins supports vault

and i already looked at the gringotts source still dont get it i also added the vault connector, no luck

please i need a breef description on how to make ma plugin compatible with vault, it works fine with iconomy but i cant use that/ dont want to

commented

Here's another example for you: https://github.com/turt2live/DumbCoin

commented

can you explain what i need? abstracteconomy?

commented

I think the numerous samples and explanations thus far are plenty. Not to mention you've been handed code that you can almost copy and paste.

commented

wow, i asked what do i need instead of that whole message you can also just say VaultImport

but still i appreciate your help!

commented

& do i need this: getBalanceManager().set(players[i].getUniqueId(), balance);

commented

i like applied everything in vault directory but i still get this error when i try to acces vault:

[18:31:31 ERROR]: Could not pass event PlayerJoinEvent to Aconomy v1
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
a:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
ava:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
ava:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.PlayerList.c(PlayerList.java:251) [craft
bukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.PlayerList.a(PlayerList.java:138) [craft
bukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.LoginListener.c(LoginListener.java:76) [
craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.LoginListener.a(LoginListener.java:42) [
craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:160
) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craf
tbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:6
67) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
60) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
58) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
Caused by: java.lang.NullPointerException
at me.lawhit.Aconomy.Listener.Playerjoin.join(Playerjoin.java:16) ~[?:?]

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0

_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0
_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1
.8.0_05]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_05]
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
va:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-2-g1e4dcde-b3086jnks]
... 14 more

commented

You are not using the resources correctly... The classes provided are simply templates for how to actually do the implementation you want.

The template code is just that: A template.

I honestly don't think you know how to use the resources correctly as you are clearly not debugging or analyzing anything.

commented

i duplicated them and then i modify them to be able to run!

commented

Duplication is not what you want. Analyze the resources and modify them to your implementation without violating licenses.

commented

well, i did but it didnt work then i went to duplicating...still doesnt work and sitll no answer to whats critical for vault to recogonise my plugin as a economy?

commented

Well, you need to register the service and you need to make sure that the class is implemented correctly.

commented

& how do you "register" the service?

cuz i know how to implement classes but im new to this api/vault thingy

commented

This is the point where you actually have to look that up yourself. There's 30+ examples in Vault itself, and you have 2 additional examples outside of that.

commented

You mean the implementation of AbstractEconomy or Economy for that matter?

commented

No, you need to register the service class.

commented

Owkay i will take a google thanks for your help! have a nice living!

commented

Have you checked out the webpage that they provide that shows the code required to hook Vault to your plugin?

commented

closing this issue as @turt2live gave a perfectly good example in the second post on how to do this.