Spigot Lite Sign In [1.7-1.17] | Sign-in rewards | Chest GUI | MySQL & SQLite | Customizable 1.5.5

Record each player's sign-in and give them rewards, This process will become interesting!

  1. I tried, but that is so difficult, maybe I need more time to research
     
  2. Can I sign in on the corresponding day by clicking on a wood sign?
     
  3. I'm making, it will be release in 1.5.0 version.
     
    • Like Like x 1
  4. Sadly, this plugin causes crashes when you are running geysermc + floodgate. When mobile player has GUI up, memory usage skyrockets.
     
  5. Do you have crash log?
     
  6. My server has mobile players too, but they never caused server crashed, I don't know what happen about your problem, so I need crash log to solve this problem.
     
  7. Code (Text):
        public ItemStack getCustomTextureHead(String value) {
            ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short)3);
            SkullMeta meta = (SkullMeta) head.getItemMeta();
            GameProfile profile = new GameProfile(UUID.randomUUID(), "");
            profile.getProperties().put("textures", new Property("textures", value));
            Field profileField = null;
            try {
                profileField = meta.getClass().getDeclaredField("profile");
                profileField.setAccessible(true);
                profileField.set(meta, profile);
            } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) {
                e.printStackTrace();
            }
            head.setItemMeta(meta);
            return head;
        }
    This maybe help you. With the param "value" is for base64 string.
     
  8. Yes, sorry for late reply.

    Basically, it was all working perfectly fine until a mobile player joined and claimed his daily reward. Something tells me that might be because of the PlaceholderAPI I used for AnimatedScoreboards, but I'm not sure...

    I had to use external site upload as the crash report file is too big for attachments here.
    https://file.io/U7nfLeRde1IM
     
  9. Accourding to crash log, we can find this report:
    Code (Text):
    studio.trc.bukkit.litesignin.database.engine.SQLiteEngine.executeQuery(SQLiteEngine.java:152)
    studio.trc.bukkit.litesignin.database.SQLiteStorage.<init>(SQLiteStorage.java:102)
    studio.trc.bukkit.litesignin.database.SQLiteStorage.getPlayerData(SQLiteStorage.java:520)
    studio.trc.bukkit.litesignin.api.Storage.getPlayer(Storage.java:167)
    studio.trc.bukkit.litesignin.util.Placeholders.onPlaceholderRequest(Placeholders.java:47)
    me.clip.placeholderapi.PlaceholderHook.onRequest(PlaceholderHook.java:31)
    According to preliminary judgment, the plug-in caused the SQLite database to be locked under high-frequency calls due to the placeholder of the PAPI, which caused the main thread to be suspended.

    But one thing I don't understand, it bypasses the exception catching of the code, explain that this is a problem in the process of submitting data in SQLite, but this is out of the scope of my code.

    This may be a hardware failure. You can try to use /signin database backup and /signin database rollback to move the data to MySQL and run it for a period of time. If there are new discoveries, please tell me in time.
     
    • Like Like x 1
  10. I don't know what's wrong with it but when I reload it it reverts back to the default file
    Console:
    Code (Text):

    [19:25:59 INFO]: [LiteSignIn] Unable to load RewardSettings.yml, Restoring default configuration files...
    [19:25:59 INFO]: RPGv2 | Đăng Nhập >>> The default profile has been restored.
    [19:25:59 INFO]: RPGv2 | Đăng Nhập >>> Reconnecting to SQLite...
    [19:25:59 INFO]: RPGv2 | Đăng Nhập >>> Successful Connection to SQLite Server.
    [19:25:59 INFO]: RPGv2 | Đăng Nhập >>> Find the PlaceholderAPI and get ready.
    [19:25:59 INFO]: RPGv2 | Đăng Nhập >>> Configuration files has been reloaded.
    file config
    Code (Text):

    Reward-Settings:
        Groups-Priority:
        - Default
        Permission-Groups:
            Default:
                Normal-Time:
                    Messages:
                    - '{prefix}&aNhận quà đăng nhập thành công!
                    Commands:
                    - 'server:rpg admin exp give {player} main 200'
                Retroactive-Times:
                    Disabled-Modules:
                        Special-Dates: true
                        Special-Weeks: true
                        Special-Times: false
                        Statistics-Times: false
                    Messages:
                    - '{prefix}&aNhận quà đăng nhập thành công!
                    Commands:
                    - 'server:rpg admin exp give {player} main 200'
                Special-Times:
                    3:
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aBạn đã đăng nhập 3 ngày, phần thưởng sẽ được &enhân đôi&a.'
                        Broadcast-Messages:
                        - '{prefix}&aNgười chơi &e{player} &a đã đăng nhập 3 ngày!'
                        Play-Sounds:
                        - 'ENTITY_PLAYER_LEVELUP-1-0-TRUE'
                        Commands:
                        - 'server:rpg admin exp give {player} main 400'
                        - 'server:rpg admin exp give {player} mining 100'
                        - 'server:rpg admin exp give {player} woodcutting 100'
                    7:
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aBạn đã đăng nhập 1 tuần, phần thưởng: &eĐá Vũ Khí x1'
                        Broadcast-Messages:
                        - '{prefix}&aNgười chơi &e{player} &a đã đăng nhập 1 tuần!'
                        Play-Sounds:
                        - 'ENTITY_PLAYER_LEVELUP-1-0-TRUE'
                        Reward-Items:
                        - 'server:rpg admin exp give {player} main 200'
                        - 'server:mi give GEM_STONE VUKHI1 {player} 1'
                Special-Weeks:
                    7:
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aHôm nay là thứ 7! Phần quà đặc biệt!'
                        Reward-Items:
                        - 'server:rpg admin exp give {player} main 1000'
                Statistics-Times:
                    100:
                        Messages:
                        - '{prefix}&aBạn đã đăng nhập 100 ngày!!!
                        Commands:
                        - 'server:rpg admin level give {player} main 100'
                        - 'server:eco give {player} 100'
                Special-Dates:
                    '6-1':
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aHôm nay là ngày &eQuốc Tế Thiếu Nhi!'
                        Reward-Items:
                        - 'server:rpg admin exp give {player} main 500'
                Special-Time-periods:
                    '22:30:00':
                        Option: After_This_Time
                        Time-Limit: '23:59:59'
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aBạn lại chuẩn bị cày đêm đấy à? Cố lên!'
                        Reward-Items:
                        - 'server:rpg admin exp give {player} main 200'
                    '03:00:00':
                        Option: Before_This_Time
                        Time-Limit: '00:00:00'
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aBạn cày đêm đấy à? Cố lên!'
                        Reward-Items:
                        - 'server:rpg admin exp give {player} main 500'
                Special-Ranking:
                    '1':
                        Override-default-rewards: true
                        Messages:
                        - '{prefix}&aHôm nay là ngày đầu tiên đăng nhập!'
                        Reward-Items:
                        - 'server:rpg admin exp give {player} main 300'
     
  11. Line 8:
    Messages:
    - '{prefix}&aNhận quà đăng nhập thành công!
    Missing single quote " ' "
     
    • Like Like x 1
  12. tysm :3
     
  13. So I decided to not include PAPI in ASB and so far it works flawlessly except one thing I mentioned earlier - the server doesn't run eco command I set up for default rewards, BUT it works for the player that signs in as first. Maybe there's something wrong with my YAML? Could you please look at it?

    Code (YAML):
    Reward-Settings:
       #Groups Priority, From top to bottom.
        Groups-Priority
    :
       - VIP
        - Default
        Permission-Groups
    :
           #This is the default group, you can't delete it!
            Default
    :
               #Triggered when sign-in in normally
                Normal-Time
    :
                   #Send messages when signing.
                    #Support PlaceholderAPI
                    Messages
    :
                   - '{prefix}&aReceive the sign in reward successfully.'
                    #Reward items at check-in
                    #In this option, you can directly fill in the name of the original item,
                    #or the item in RewardSettings.yml (including manually set, added by command).
                    #Format: "[Item name|Collection name]:[Amount]"
                    #For example: "diamond:5" Reward 5 diamonds.
                    #You can use placeholder "[Minimum value]_[Maximum value]" to randomly reward the number of items.
                    #For example: "diamond:1-3" Randomly reward 1-3 diamonds.
                    Reward-Items
    :
                   - 'diamond:1'
                    - 'gold_ingot:1-2'
                    - 'iron_ingot:1-5'
                    Commands
    :
                   - 'server:eco give {player} 3'
                    #Send broadcast messages when signing in.
                    #The information in this option will be seen by everyone.
                    Broadcast-Messages
    : []
                    #Play sounds when signing in.
                    #Format: [Sound]-[Volume]-[Pitch]-[Everyone can hear?]
                    Play-Sounds
    :
                   - 'ENTITY_EXPERIENCE_ORB_PICKUP-1-1-FALSE'
                    #Execute command when signing in.
                    #Format: "[Command type]:[command]"
                    #"Command type" can be "op" 、 "server"、 None
                    #Corresponding to "player execute command with OP permission", "execute console command", "player execute command normally".
                    #For example:
                    # "server:say hello" - Execute console command: "say hello"
                    # "op:gamemode creative" - Player execute command with OP permission: "gamemode creative"
                    # "spawn" - Player execute "spawn" command normally.
                    #Support PlaceholderAPI
                    Commands
    : []
                #Triggered when retrospective sign-in.
                Retroactive-Times
    :
                   #Used to prohibit players from obtaining the rewards of the following modules through retrospective sign-in.
                    Disabled-Modules
    :
                       #It is recommended to enable it to prevent players from directly receiving special rewards on certain special dates.
                        Special-Dates
    : true
                        Special-Weeks
    : true
                        Special-Times
    : false
                        Statistics-Times
    : false
                    Play-Sounds
    :
                   - 'ENTITY_EXPERIENCE_ORB_PICKUP-1-1-FALSE'
                    Reward-Items
    :
                   - 'diamond:1'
                    - 'gold_ingot:1'
                    - 'iron_ingot:1-4'
                    Commands
    :
                   - 'server:eco give {player} 2'
                #Triggered when sign-in in for a certain number of consecutive times
                Special-Times
    :
                    7
    :
                        Override-default-rewards
    : false
                        Messages
    :
                       - '{prefix}&aYou signed in seven days in a row, Frengs reward has &edoubled&a.'
                        Broadcast-Messages
    :
                       - '{prefix}&aPlayer &e{player} &a signed in for seven consecutive days!'
                        Play-Sounds
    :
                       - 'ENTITY_PLAYER_LEVELUP-1-0-TRUE'
                        Reward-Items
    :
                       - 'diamond:1'
                        - 'gold_ingot:3'
                        - 'iron_ingot:6'
                        - 'RetroactiveCard:1'
                        Commands
    :
                       - 'server:eco give {player} 3'
                    30
    :
                        Override-default-rewards
    : false
                        Messages
    :
                        - '{prefix}&aYou signed in for a month in a row, Get extra rewards
    : &e&lSuper Special Sword &aand &eGolden Apple x1'
                        Broadcast-Messages
    :
                       - '{prefix}&aPlayer &e{player} &a signed in for a month!'
                        Play-Sounds
    :
                       - 'ENTITY_PLAYER_LEVELUP-1-0-TRUE'
                        Reward-Items
    :
                       - 'Super_Special_Sword:1'
                        - 'golden_apple:1'
                #Triggered when sign-in in on a speical week.
                Special-Weeks
    :
                   #Sunday
                    7
    :
                        Override-default-rewards
    : false
                        Messages
    :
                       - '{prefix}&aToday is Sunday, reward an extra golden apple!'
                        Reward-Items
    :
                       - 'golden_apple:1'
                #Triggered when the sign-in total reaches a certain number of times.
                Statistics-Times
    :
                    100
    :
                        Messages
    :
                       - '{prefix}&aYou signed in for 100 days in a row and got 1k Frengs reward.'
                        Commands
    :
                       - 'server:eco give {player} 1000'
                #Triggered when signing in on a special date.
                Special-Dates
    :
                   #Format: Month-Day (Be careful not to correspond to "1-1" on January 1, it should be "01-01")
                    '12-25'
    :
                        Override-default-rewards
    : false
                        Messages
    :
                       - '{prefix}&aToday is Christmas. Happy Christmas!'
                        Reward-Items
    :
                       - 'apple:64'
                #Triggered when signing in at a special time periods.
                Special-Time-periods
    :
                   #Format: Hour:Minute:Second
                    #Minimum: 00:00:00 , Maximum: 23:59:59
                    #The absence of minutes or seconds means that the minutes or seconds can be any period of time.
                    #Example: '12:00' is '12:00:00-12:00:59' period.
                    #         '12' is '12:00:00-12:59:59' period.
                    #Ten thirty at night
                    '22:30:00'
    :
                       #Option type: On_Time, After_This_Time, Before_This_Time
                        #Corresponding to: sign in on time, sign in after this time, sign in before this time.
                        Option
    : After_This_Time #Sign in after 22:30:00
                        #Time limit. If Type is not On_Time, you can set a threshold.
                        #"23:59:59" Will be triggered every day from 22:30:00 to 23:59:59.
                        Time-Limit
    : '23:59:59'
                        Override-default-rewards
    : true
                        Messages
    :
                       - '{prefix}&aThe server gives you milk, please rest early.'
                        Reward-Items
    :
                       - 'milk_bucket:1'
                    #Three o'clock in the morning
                    '03:00:00'
    :
                        Option
    : Before_This_Time #Sign in before 03:00:00
                        #Triggered between 03:00:00 and 00:00:00.
                        Time-Limit
    : '00:00:00'
                        Override-default-rewards
    : true
                        Messages
    :
                       - '{prefix}&aThe server gives you milk, please rest early.'
                        Reward-Items
    :
                       - 'milk_bucket:1'
                #Triggered when get a new sign-in ranking.
                Special-Ranking
    :
                   #When the player is the first to sign in
                    '1'
    :
                        Override-default-rewards
    : false
                        Messages
    :
                       - '{prefix}&aToday you are the first to sign in, and you get additional Frengs!'
                        Commands
    :
                       - 'server:eco give {player} 2'
            #Custom group, for example
            VIP
    :
               #Group permission.
                #When the player has this permission, the parameters of this group will be used.
                #The premise is that you have not mistaken the priority between groups!
                Permission
    : signin.reward.vip
                Normal-Time
    :
                    Messages
    :
                   - '{prefix}&aReceive the sign in reward successfully.'
                    Reward-Items
    :
                   - 'diamond:3'
                    - 'gold_ingot:9'
                    - 'iron_ingot:12'
                    Commands
    :
                   - 'server:points give {player} 10'
                Retroactive-Time
    :
                    Disabled-Modules
    :
                        Special-Dates
    : true
                        Special-Weeks
    : true
                        Special-Times
    : false
                        Statistics-Times
    : false
                    Reward-Items
    :
                   - 'diamond:2'
                    - 'gold_ingot:6'
                    - 'iron_ingot:12'
                Special-Times
    :
                    3
    :
                        Override-default-rewards
    : true
                        Messages
    :
                       - '{prefix}&aYou signed in three days in a row, The reward has &edoubled&a.'
                        Reward-Items
    :
                       - 'diamond:6'
                        - 'gold_ingot:18'
                        - 'iron_ingot:24'
                        Commands
    :
                       - 'server:points give {player} 20'
                    7
    :
                        Override-default-rewards
    : false
                        Messages
    :
                        - '{prefix}&aYou signed in for a week in a row, Get extra rewards
    : &e&lSuper Diamond Sword &aand &eGolden Apple x1'
                        Reward-Items
    :
                       - 'Super_Diamond_Sword:1'
                        - 'golden_apple:1'
                Statistics-Times
    :
                    100
    :
                        Messages
    :
                       - '{prefix}&aYou signed in for 100 days in a row and got 10K coins reward.'
                        Commands
    :
                       - 'server:eco give {player} 10000'
                Special-Dates
    :
                    '12-25'
    :
                        Override-default-rewards
    : false
                        Messages
    :
                       - '{prefix}&aToday is Christmas. Happy Christmas!'
                        Reward-Items
    :
                       - 'apple:64'
     
  14. I've found the issue. It was because of the Groups-Priority. After I removed VIP, everything works well. However, nobody had the permission so it makes me wonder why it was blocking Default daily group?
     
  15. 大佬
    请问一下可否新增一个功能令本日尚未签到的玩家登入的时候会自动打开 signin gui 吗
    签到之后就不会再自动打开
    感谢
     
    • Like Like x 1
  16. 等下一個或再下一個版本
    昨天去了你們伺服器正好發現了插件的一個Bug,下一個版本先修這個bug
     
    • Friendly Friendly x 1
  17. 伺服器: Paper version git-Paper-778 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
    沒有改過插件的設定
    leaderboard 狀況:
    [​IMG]

    更新:
    設定 Use-PlaceholderAPI: false 之後就可以正常顯示了
    [​IMG]
    還是回報一下,雖然好像已經晚了,作者您好像已經知道問題了?
     
    #59 rainfishs, Jul 10, 2021
    Last edited: Jul 10, 2021
  18. 這個是因為佔位符的大小寫需要匹配才能運行,可%previousPage%不可%previouspage%,並不是bug,但是這樣也很不方便,容易誤導人,所以打算下個版本重寫算法
     
    • Like Like x 1