CPJiNan / AkariLevel

Advanced Level System for RPG Server
Creative Commons Zero v1.0 Universal
9 stars 4 forks source link

Commands that require the level name do not work, support for & with gradient and hexadecimal colors is missing. #7

Closed Zarkness closed 4 months ago

Zarkness commented 4 months ago

Hi, @CPJiNan I was testing the version you gave me in this issue #5 and when I put the command /akarilevel exp add 1000 and the same with the level add command, it didn't work and gave me these errors. -> https://paste.helpch.at/dabicaralo.rb

I think you forgot that I also asked you that for the levels you can also use & together with gradient and hexadecimal colors instead of §. (this I could not test if you added support or not since I did not work the commands).

CPJiNan commented 4 months ago

Hi, @Zarkness

Thank you for helping with the testing!

The issue you encountered might be due to the Kotlin serialization dependency not loading. Please try this build.

Regarding hex colors, the colored() function in Taboolib seems to support this feature. This means you can directly use hex color codes like &{#FFFF00}.

HexColor &{#4C88E4}Hex&{#98F5F9}Color

Zarkness commented 4 months ago

now it works without any problem and the color theme at least in the level action does not work.

image

the akarilevel levelup command does not work with or without op having the necessary permissions.

When I put as before to level 20 a condition now instead of raising me by much xp that I give the user does not rise to level 20 even if you have the permission remains at level 19, this is the config that I have.

I'm not going to bad but I'm getting a little tired of encountering problems with the plugin every now and then.

# 示例等级组
Example:
  # 展示名称
  Display: "示例等级组"
  # 来源设置
  Source:
    # 监听的经验来源
    # - "VANILLA_EXP_CHANGE"
    Subscribe:
      - "MYTHICMOBS_DROP_EXP"
  # 追踪设置
  # 当玩家追踪某个等级组时,将在原版经验条上显示其经验进度
  Trace:
    # 该等级组是否能被追踪
    Enable: true
    # 追踪该等级组所需条件 (Kether支持, 每行返回值均为 true 时才可追踪)
    # Condition:
    #   - false
    Condition: [ ]
    # 追踪该等级组后执行的动作 (Kether支持)
    Action: [ ]
  # 等级设置
  Level:
    # 最高等级
    Max: 100
    # 满足要求自动升级
    Auto-Levelup: true
    # 达到最大等级后不再获取经验
    Exp-Limit: true
    # 关键等级设置
    # 只需对关键等级进行修改, 处于非关键等级时将自动读取上一个关键等级的信息
    Key:
      # 0 级等级设置
      0:
        # 等级名称
        # %level% -> 对应等级
        Name: "§8Lv.§b0"
        # 升至该等级所需经验 (JavaScript支持)
        # %level% -> 对应等级
        Exp: "0"
        # 升至该等级所需条件 (Kether支持, 每行返回值均为 true 时才可升级)
        # Kether动作列表 https://kether.tabooproject.org/list.html
        # Condition:
        #   - "permission akarilevel.default"
        Condition: [ ]
        # 升级后执行的动作 (Kether支持)
        # Action:
        #   - command inline "give {{sender}} apple 1" as op
        Action: [ ]
      # 1 级 - 49 级(下一个关键等级之前的等级) 等级设置
      1:
        Name: "&{#4C88E4}Lv.§b%level%"
        Exp: "%level% * 5 + 100"
        Condition: [ ]
        Action:
          - title "&{#4C88E4}§lLevel UP!"
          - subtitle inline "{{ papi %akarilevel_lastlevelname% }} §7→ {{ papi %akarilevel_levelname% }}" by 10 20 10
          - actionbar inline "&{#98F5F9}[ §7{{ papi %akarilevel_exp% }} §8/ §7{{ papi %akarilevel_nextlevelexp% }} §8]"
      20:
        Name: "&{#4C88E4}Lv.§b%level%"
        Exp: "%level% * 5 + 100"
        Condition:
          - "permission testing.level.20"
        Action:
          - title "&{#4C88E4}§lLevel UP!"
          - subtitle inline "{{ papi %akarilevel_lastlevelname% }} §7→ {{ papi %akarilevel_levelname% }}" by 10 20 10
          - actionbar inline "&{#98F5F9}[ §7{{ papi %akarilevel_exp% }} §8/ §7{{ papi %akarilevel_nextlevelexp% }} §8]"
      # 50 级 - 100 级(满级) 等级设置
      50:
        Name: "§8Lv.§b%level%"
        Exp: "%level% * 10 + 100"
        Condition: [ ]
        Action:
          - title "§e§lLevel UP!"
          - subtitle inline "{{ papi %akarilevel_lastlevelname% }} §7→ {{ papi %akarilevel_levelname% }}" by 10 20 10
          - actionbar inline "§8[ §7{{ papi %akarilevel_exp% }} §8/ §7{{ papi %akarilevel_nextlevelexp% }} §8]"
CPJiNan commented 4 months ago

I apologize for the inconvenience you have experienced. I am working on fixing the known issues and optimizing the plugin. Please stay tuned for the release of version 4.0.

Additionally, here are the relevant descriptions in the Kether action list regarding hexcolor codes. You don't need to rush to test it, please wait for the upcoming updates.

Color

HexColor

title inline "{{ color '&{#4C88E4}Hex&{#98F5F9}Color' }}" by 10 20 10

Thank you for your patience.

CPJiNan commented 4 months ago

Additionally, the issue you mentioned regarding the levelup command not working has been fixed.

CPJiNan commented 4 months ago

Language en_US is supported in this build. Regarding the level condition issue, it is still pending a fix.

Zarkness commented 4 months ago

it's ok, when the devs are so nice and good people I have no problem to wait for them to finish fixing things.

Ok, now I try the last possible snapshot, thanks for fixing all the bugs I report you

Zarkness commented 4 months ago

one thing, shouldn't the akarilevel levelup command ask you for the name of the experience system?

Zarkness commented 4 months ago

by the way, I am testing the last snapshot that is this https://github.com/CPJiNan/AkariLevel/actions/runs/9630761802 and when I do levelup or I have the autolevelup activated I don't get the title, besides it doesn't generate the 2 level files, it only generates 1.

CPJiNan commented 4 months ago

by the way, I am testing the last snapshot that is this https://github.com/CPJiNan/AkariLevel/actions/runs/9630761802 and when I do levelup or I have the autolevelup activated I don't get the title, besides it doesn't generate the 2 level files, it only generates 1.

This issue has been fixed, and the generation of level file depends on your language.

Additionally, the feature request regarding the levelup command of specific level group will be adopted.

Besides, the snapshot version may have some problems, so please refer to the official version 4.0.

CPJiNan commented 4 months ago

@Zarkness

Just now I pushed an update, which may be the official version 4.0 update.

During my testing, it seems that all the issues you mentioned have been fixed. If you think it's ok, I will upload it to the SpigotMC update.

Thank you for your help with AkariLevel testing so far.

Zarkness commented 4 months ago

ok, so far for what I have tested if this well and works perfectly the only thing the language as it is put as the level I always get the Chinese version, when I use the English language, should not put the 2 default if one speaks English, or Chinese? and the same settings as I always puts me the Chinese version instead of English.

or how to set the language? @CPJiNan

CPJiNan commented 4 months ago

ok, so far for what I have tested if this well and works perfectly the only thing the language as it is put as the level I always get the Chinese version, when I use the English language, should not put the 2 default if one speaks English, or Chinese? and the same settings as I always puts me the Chinese version instead of English.

or how to set the language? @CPJiNan

@Zarkness You can try to change the "Language" item in the lang/zh_CN.yml file from zh_CN to en_US.

Zarkness commented 4 months ago

ok, so far for what I have tested if this well and works perfectly the only thing the language as it is put as the level I always get the Chinese version, when I use the English language, should not put the 2 default if one speaks English, or Chinese? and the same settings as I always puts me the Chinese version instead of English.
or how to set the language? @CPJiNan

@Zarkness You can try to change the "Language" item in the lang/zh_CN.yml file from zh_CN to en_US.

nothing, it would be easier to put in the settings.yml the language: \<en_US> or \<zh_CN>.