Spigot PlayerPoints 3.2.4

A point based currency system.

  1. Can you check what the columns of your playerpoints_points table look like? It seems like it has an id column for some reason when it shouldn't based on that error message.
     
  2. storage: MySQL
    mysql:
    host: #######
    port: 3306
    database: mc
    user: root
    password: #######
    table: playerpoints
    import:
    use: false
    source: MySQL
    export:
    use: false
    source: MySQL
    retry: 10
    vote:
    enabled: false
    amount: 100
    online: false
    restrictions:
    autocompleteOnline: false
    hasPlayedBefore: false
    debug:
    database: false
    uuid: false
    vault: false
    version: 2.1.5-SNAPSHOT
    # The locale to use in the /locale folder
    # Default: en_US
    locale: zh_TW
    # How many players should be displayed per page on the leaderboard?
    # Default: 10
    leaderboard-per-page: 10
    # Settings for if you want to use MySQL for data management
    mysql-settings:
    # Enable MySQL
    # If false, SQLite will be used instead
    # Default: false
    enabled: true
    # MySQL Database Hostname
    # Default:
    hostname: '#######'
    # MySQL Database Port
    # Default: 3306
    port: 3306
    # MySQL Database Name
    # Default:
    database-name: 'mc'
    # MySQL Database User Name
    # Default:
    user-name: 'root'
    # MySQL Database User Password
    # Default:
    user-password: '#######'
    # If the database connection should use SSL
    # You should enable this if your database supports SSL
    # Default: false
    use-ssl: false
     
  3. Same error for me
     
  4. What version of PlayerPoints did you update from previously?
     
  5. I found the error. the problem is when you delete the migration version number 1 entry. if you can disable this validation or delete this table i thing its innecesary and can be control in the config file and not in the sql.
     
  6. Why would you be manually modifying the migrations table? That value is kept in that table separately because it's the database that needs to be updated, not config files. You should never be modifying the migrations table.
     
  7. Hi, its possible of add the command /points resetall for reset points of everyone ?
     
  8. I have 1 request can u add dialy take point from all player after 24 hour?
     
  9. Suggestions:

    1. The p command should be registered as a single command instead of the alias(like the old player points plugin)
    because many of my plugins are configured to use /p to give points instead of /points, the alias gets override by many other plugins, such as mcmmo party command alias

    2. The set command can not set player points to 0

    3. PlayerPointsAPI class is not public, some plugins can go wrong, such as TradePlus is using this method
    The old one is public
    Code (Java):
    this.playerPointsAPI =
            new PlayerPointsAPI(
                (PlayerPoints) pl.getServer().getPluginManager().getPlugin("PlayerPoints"));
    4. [Link]
    Code (Java):
    /**
         * Gets an OfflinePlayer by name, prioritizing online players.
         *
         * @param name The name of the player
         * @return An OfflinePlayer
         */

        @SuppressWarnings("deprecation")
        public static OfflinePlayer getPlayerByName(String name) {
            OfflinePlayer player = Bukkit.getPlayer(name);
            if (player != null) {
                return player;
            } else {
                return Bukkit.getOfflinePlayer(name);
            }
        }
     
    Bukkit.getPlayer() is Fuzzy matching, Wich means if I want to give player Albert 10 points
    and he is not online, meanwhile, player Albert1 is online, Then the points will give to player Albert1
    you should use Bukkit.getPlayerExact();

    Actually, you could directly use Bukkit.getOfflinePlayer();
    Code (Java):
    public static OfflinePlayer getPlayerByName(String name) {
            return Bukkit.getOfflinePlayer(name);
        }
    it will match online players first and then try offline match
    Code (Java):
    @Deprecated
        public OfflinePlayer getOfflinePlayer(String name) {
            Validate.notNull(name, "Name cannot be null");
            Validate.notEmpty(name, "Name cannot be empty");
            OfflinePlayer result = this.getPlayerExact(name);
            if (result == null) {
                GameProfile profile = null;
                if (this.getOnlineMode() || PaperConfig.isProxyOnlineMode()) {
                    profile = this.console.getUserCache().getProfile(name);
                }

                if (profile == null) {
                    result = this.getOfflinePlayer(new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
                } else {
                    result = this.getOfflinePlayer(profile);
                }
            } else {
                this.offlinePlayers.remove(((OfflinePlayer)result).getUniqueId());
            }

            return (OfflinePlayer)result;
        }
     
    • Like Like x 1
  10. 1). I've had multiple people complain to me that PlayerPoints overrides the mcMMO party command, so somebody is going to end up disliking it no matter how I register it.

    2). I've confirmed that and will get it fixed, you should probably be using /points reset <player> if you're going to just set their points to 0 though.

    3). Decent point. That seems like abuse of the API class to me but I'll switch it back to public.

    4). This is actually intentional by design to be fuzzy matching which is why that getPlayerByName method exists in the first place, but I can see how it could cause some issues such as in the example you gave (even if it's a really uncommon issue). I'll switch it to what you suggested as well.

    Thanks for the tips ^^
     
    • Agree Agree x 1
  11. I have to say your plugin sucks, it's not even better than the old one. it's not even thread-safe
    Recently players report to me they lose some points value
    I have a votifer reward plugin that gives player points reward by command, sometimes it will execute multiple "/points give" commands at the same time in order to give players extra rewards within special conditions
    But player only receives the points value of the last "/points give" command
    Then I write some code to test
    C{2Q515Q$S4UW~668CWQW0X.png

    )@801_(I]0DHHDYQD8I[]61.png

    As you can see.......
     
    • Informative Informative x 1
  12. This is something that I am aware of and am working to fix. It's hard to keep everything in sync properly when the plugin can be connected to a MySQL database. Were you using MySQL in that example that you gave? I'll be on vacation for the next week so I won't be able to really work on it, but it should be fixed soon after I get back. For the most part the plugin is reliable when modifying points, but executing things quickly in succession is the one thing it happens to struggle with since it also has to run things async so it doesn't lag the server when modifying points. I'm sorry for the inconvenience.
     
  13. Would you ever offer conversion from opteco?

    I'm currently on the deprecated version of opteco and need a new plugin. I'm nervous about the several bigger bugs mentioned above regarding rapid succession of transactions and the /p alias screwing with mcmmo
     
  14. I've never heard of opteco before but I can probably add that. The fast transactions thing will be fixed in the next update. The whole deal with mcMMO's /p command is also an alias for /party. It seems to be a 50/50 on which one takes priority right now. Also looking into that, but as I said in the previous post I'm still on vacation for a few more days so it's going to be a little while.
     
  15. Do you have a rough time? By this weekend ?
     
  16. @Esophose Is this plugin 100% compatible with the old playerpoints plugin mysql system? I'm using the old plugin right now and I wouldn't want to lose all my data if I update
     
  17. It depends. If you've changed the table name to something other than playerpoints it won't be entirely compatible because it won't autoconvert to the new format properly. If you join my support Discord server I can give you a jar that will allow you to use an old database and can help walk you through everything to update to the new version. Just join and create a support ticket and let me know who you are if you'd like~
     
  18. Does the plugin accept decimals or not? I think I'm having a problem with this.
     
  19. Esophose updated PlayerPoints with a new update entry:

    PlayerPoints v3.1.0

    Read the rest of this update entry...