Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reload script with formatted strings #3906

Closed
waveteams opened this issue Apr 19, 2021 · 2 comments
Closed

Cannot reload script with formatted strings #3906

waveteams opened this issue Apr 19, 2021 · 2 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

Comments

@waveteams
Copy link

Description

I keep receiving a strange error when I try to reload may script. It says
java.lang.NoSuchMethodError: net.md_5.bungee.api.ChatColor.of(Ljava/lang/String;)Lnet/md_5/bungee/api/ChatColor;

Steps to Reproduce

It started to occure when I modified strings (translated them, used unicode and color formatting)
(code will be below)

Expected Behavior

It should not work like that. There shouldn't be any errors.

Errors / Screenshots

https://pastebin.com/YzeuuE6H - Console log
https://pastebin.com/N0gZpiaD - Throws an error
https://pastebin.com/nDTWncz9 - Works perfectly

Server Information

  • Server version/platform: Spigot 1.12.2 | CraftBukkit version git-Spigot-dcd1643-e60fc34 (MC: 1.12.2)
  • Skript version: 2.5.3
  • Addons: skbee-1.10.2, skellet, skquery-4.1.4, skript-mirror-0.19.1
@MovesLikeJaeger
Copy link

You may want to try this with 1.12.2 Paper rather than the version you're using. Also I couldn't help but notice your skript mirror is extremely outdated (this is probably unrelated to your issue but thought I should let you know)

@TPGamesNL
Copy link
Member

A check for valid hex (e.g. regex) should be added to Utils.parseHexColor(String):

public static ChatColor parseHexColor(String hex) {

Besides that, that method should never have been called, because Utils.HEX_SUPPORTED should be false:

public final static boolean HEX_SUPPORTED = Skript.isRunningMinecraft(1, 16);

@TPGamesNL TPGamesNL added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation). labels Apr 19, 2021
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Apr 20, 2021
@TPGamesNL TPGamesNL added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. priority: medium Issues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).
Projects
None yet
Development

No branches or pull requests

4 participants