PlayerPoints
PlayerPoints - The most noble currency for your server.
Use examples:
- Admins and Mods give points to the players if they have built a good building. When you reach a specific amount of points you become Moderator
- Use Points as additional currency
- Use Points as premium currency with which players can buy the most awesome stuff. Players get Points by voting for your server.
- Connect PlayerPoints with useful plugins like BossShop
For online mode servers, this plugin makes connections to api.mojang.com to get offline player UUIDs.
Features:
- Give points to players
- Take points of players
- Pay points to players
- Look, how many points other players have
- Look, how many points you have
- Leader board
- Permissions Support
- Optional Vault support
- Buy things with points (BossShop)
- Supported by many awesome plugins
Commands:
- /points pay <name> <amount>
- /points give <name> <amount>
- /points take <name> <amount>
- /points set <name> <amount>
- /points reset <name>
- /points look <name>
- /points me
- /points lead [next/prev/#]
- Shortcut: /p <give/take/look/me/pay/set/reset>
Permissions:
- PlayerPoints.pay
- PlayerPoints.give
- PlayerPoints.take
- PlayerPoints.set
- PlayerPoints.reset
- PlayerPoints.look
- PlayerPoints.lead
- PlayerPoints.me
Video
ToDo:
- Per-World support
Maven
We support Maven. Just add our repository:
<repository> <id>dakani</id> <name>Dakani Nexus Repo</name> <url>https://repo.dakanilabs.com/repository/public</url> </repository>
And add PlayerPoints as a dependency:
<dependency> <groupId>org.black_ixx</groupId> <artifactId>PlayerPoints</artifactId> <version>2.1.3</version> </dependency>
Trello Dev board
Visit the Trello board to see the current todo list for all projects.
You can comment and vote on any of the topics there.
All changes on the Trello board are in real-time.
<<reply 2092229="">>
Something wrong with your connection between your minecraft server and MySQL database?
[09:37:16 ERROR]: [PlayerPoints] Could not create getter statement.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException Communications link fai
lure
The last packet successfully received from the server was 324,130 milliseconds a
go. The last packet sent successfully to the server was 0 milliseconds ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
~[?:1.7.0_07]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
~[?:1.7.0_07]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce) ~[?:1.7.0_07]
at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.7.0_0
7]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407) ~[server.jar:git
-Spigot-1331]
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1
116) ~[server.jar:git-Spigot-1331]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3082) ~[server
.jar:git-Spigot-1331]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2968) ~[server
.jar:git-Spigot-1331]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3516) ~[server.j
ar:git-Spigot-1331]
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986) ~[server.jar:gi
t-Spigot-1331]
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140) ~[server.jar
:git-Spigot-1331]
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626) ~[ser
ver.jar:git-Spigot-1331]
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
va:2111) ~[server.jar:git-Spigot-1331]
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1362)
~[server.jar:git-Spigot-1331]
at lib.PatPeter.SQLibrary.Database.query(Database.java:261) ~[SQLibrary-
7.1.jar:?]
at lib.PatPeter.SQLibrary.Database.query(Database.java:278) ~[SQLibrary-
7.1.jar:?]
at org.black_ixx.playerpoints.storage.models.MySQLStorage.getPoints(MySQ
LStorage.java:72 [PlayerPoints.jar]
at org.black_ixx.playerpoints.storage.StorageHandler.getPoints(StorageHa
ndler.java:39 [PlayerPoints.jar]
at org.black_ixx.playerpoints.PlayerPointsAPI.look(PlayerPointsAPI.java:
73) [PlayerPoints.jar]
at org.black_ixx.playerpoints.commands.MeCommand.execute(MeCommand.java:
38) [PlayerPoints.jar]
at org.black_ixx.playerpoints.services.CommandHandler.onCommand(CommandH
andler.java:130 [PlayerPoints.jar]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [serv
er.jar:git-Spigot-1331]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:17
5) [server.jar:git-Spigot-1331]
at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServe
r.java:704) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerCon
nection.java:984 [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java
:829) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java
:28) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat
.java:65) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:147
) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.ServerConnection.c(ServerConnection.java
:77) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:7
00) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2
73) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5
62) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java
:469) [server.jar:git-Spigot-1331]
at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6
17) [server.jar:git-Spigot-1331]
Caused by: java.io.EOFException Can not read response from server. Expected to
read 4 bytes, read 0 bytes before connection was unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2529) ~[server.jar:git-
Spigot-1331]
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979) ~[server
.jar:git-Spigot-1331]
... 28 more
>
@Mitsugaru
Mitsugaru. I'm an idiot, I just used SQLibrary 7.1 and its all good here. Thanks for the awesome plugin and sorry for the bother!
@Alphabravo9
Try Build #28. Should not give you that error with remove the command manually from plugin.yml. Let me know if that fixes that issue.
@ArroneXB
I just loaded Build #27 of Player Points, with CB 1.7.2-R0.3, build 2982 (should be beta build) and SQLibrary 7.1. SQLite saved my changes. Are you getting any errors or anything at all that can help pinpoint this issue?
@MinecraftAdmin
Is there anything different from your setup that doesn't match how I tested it above?
@wumpyc
I haven't had a chance to test MySQL yet still.
@Nipshu
The listener is built into the plugin. Just edit the config, under the vote section.
I can confirm that neither MySQL nor SQLite work. I am using Build #27
Where can I find the listener for votifier?
Awesome Plugin, Join mc.corcraft.net and try it out.
@Mitsugaru
Thanks, did it and all works fine, except for this error:
java.lang.NullPointerException at org.black_ixx.playerpoints.PlayerPoints.onEnable(PlayerPoints.java:73) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:250) [craftbukkit.jar:git-Spigot-1325] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:350) [craftbukkit.jar:git-Spigot-1325] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:390) [craftbukkit.jar:git-Spigot-1325] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugin(CraftServer.java:460) [craftbukkit.jar:git-Spigot-1325] at org.bukkit.craftbukkit.v1_7_R1.CraftServer.enablePlugins(CraftServer.java:380) [craftbukkit.jar:git-Spigot-1325] at net.minecraft.server.v1_7_R1.MinecraftServer.m(MinecraftServer.java:348) [craftbukkit.jar:git-Spigot-1325] at net.minecraft.server.v1_7_R1.MinecraftServer.g(MinecraftServer.java:325) [craftbukkit.jar:git-Spigot-1325] at net.minecraft.server.v1_7_R1.MinecraftServer.a(MinecraftServer.java:281) [craftbukkit.jar:git-Spigot-1325] at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:186) [craftbukkit.jar:git-Spigot-1325] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:437) [craftbukkit.jar:git-Spigot-1325] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Spigot-1325]
@wumpyc
Getting the same issue with the plugin. I've tried SQLibrary 7.0 and 7.1 to no avail on the beta build of bukkit. I ran your source code through eclipse with no errors either.
@Alphabravo9
Currently, no... if you're having a conflict, you can remove it from being registered by editing the plugin.yml in the jar itself and removing the entire subentry in the commands section.
@wumpyc
I haven't had a chance to look at that yet, sorry. Is it working in any prior builds? What version of SQLibrary are you running?
Any way to change the P alias to PP or something else?
Build #27 doesn't seem to work with MySQL correctly. Commands always return /p <param> .. Works fine with YAML tho..
@Jleeevinnn
Well, I have made my use case(s) for the default configuration as it stands... but since you require online player autocompletion (even though there's client-side tab autocompletion), you can enable the optional feature for the core plugin's commands from Build #27.
Just set the following config option to true:
restrictions.autocompleteOnline
Once again, to reiterate, this is for online players only. There is no offline autocomplete support. The usability of plugin-handled autocomplete, online or offline, becomes less useful the more fuzzy the input is.
Example:
The following players have visited the server: Remy, Reminia, Rem123
The list could go on. You want to send Rem123, who is offline, some points, but you want to lazily type it in as follows:
/p pay rem 100
Clearly, there is no way for the plugin to determine who to pay, and so will take the input as is, rem.
Lets take this a step further: Remy is currently online. You try the same command, still intending to pay Rem123, in a lazy fashion. Well, by enabling the autocompleteOnline option, since the plugin will guess based on the current online players, its going to send the points to Remy and not your intended target of Rem123.
Lastly, lets say both Rem123 and Remy are online. The autocompleteOnline option is enabled and you attempt the same command. Once again, the plugin cannot determine for you who you intended to use. So, it's going to default to the name as typed.
But there's already a solution for autocomplete for multiple online players: tab autocomplete should cycle through all the valid options.
You might be wondering, what would it take to do a proper implementation of a complete online & offline player name autocompletion search with suggestions? Well, it would mean having to do a user conversation (not difficult, I've done it before). For all possible player names that start with or contain the target partial name, we compile that as a list and then display that through the conversation in a way so the user can paginate through until they make a selection or quit the command / conversation. Once a selection is made, we can attempt the transaction. This list of names can be ridiculously large if the user supplies too vague of an input (single character "name" input).
So, not impossible, completely doable, but not something I have the time for. If you can find a dev willing to code the above and make a pull request, we'll be more than happy to test the implementation and add it in if it works. Once again, the client-side tab autocomplete already does this and does this well for online players.
TL;DR
I think all you are really asking is autocomplete for existing users... however, that's assuming that the given input will return a single, unique name... which is not guaranteed at all. And such, in the very likely cases where there are multiple matches, there's going to need to be user intervention to define the proper, intended target.... otherwise, as I have expanded on above, the results are both unpredictable and undesirable.
To take from your own example, sure, for now you may have a unique match for "bunky" to "Bunky1012" currently. But in the future there may be a user that visits that has the name "BunkyAwesome" or "Bunky2020" or even plain "Bunky". And if / when that happens, there is no longer a unique match for the fuzzy input of "bunky" and the plugin cannot correctly guess who the intended target is.
And so, if you want a secondary step in there, where the user can select out of all the possible matches for a given input, this is where the proposed solution of using Conversations comes in.
I honestly do not believe that online status should be the only defining method of autocomplete for this plugin (which is why its not even enabled by default)... but for a super quick patch edit, it's as far as I will go.
Another .. better example; Player A tries paying player "Bunky1012" 5 vote points, but types /p pay bunky 5
It creates a new user in the storage yaml 'bunky' even though it's not even a minecraft username.
@Jleeevinnn
Well, the best I can do (in a short notice update) is add an option for you to enable that will deny any point events if a player has not been on your server before. Try this dev build (Build #26) and confirm that it works as expected. After updating the jar, there will be a new config option:
restrictions.hasPlayedBefore
Just set that to true and the plugin should do quick validation based on your server's instance.
Realize, that there are use cases for non-standard accounts with balances. Whether or not our users actually implement the plugin in that way is unknown, but I don't see a reason to restrict them by default.
Sending points to players is allowed regardless if they're online or not. I'm a firm believer in asynchronous transactions. I can add that optional restriction in later if you so desire. Voting events however can enforce the online requirement.
Regarding your example, we might ought to look into autocomplete based on online players. That would be easy enough to add in as an option. That being said, its almost unnecessary considering there is tab completion for online player names. Plus, you run into the issue of who to determine to send money in the same example. Did they mean Example123 or do they want to send to player Example, in the case that both are actual existing players and regardless of online status? I'd probably have to do a conversation prompt that walks the user through any such conflict... Doable, but excessive at this point and time.
This plugin ignores false usernames, for example if a player's name is "Example123" and another player tries paying Example123 100 points, but doesn't put 123, it gives "Example" 100 vote points wether or not if they've joined the server, if their offline if they're even a real minecraft name.
Please fix this.
@blie4
PlayerPoints does not do anything with ranks by default
@Blackixx Does the plugin make it so if you have a certain amount of points, you can become mod, by default? Because I do not want players that have a lot of points to randomly get mod. :)
@nicklab
I figured it out *Face Palm*