-
Notifications
You must be signed in to change notification settings - Fork 22
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
1.21.1: Failed parsing view condition for component! -> Issue with boolean return? #2916
Comments
Another error: Type: FORMAT
Key: "is_player"
Value: |-
checkPlayer();
function checkPlayer() {
var val = "{luckperms_inherits_group_player}";
if (val == "yes") {
return true;
} else {
return false;
}
}
Sender_Condition: ""
Sender_Permission: "" 16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] -------------------------------------------------------------------------------------------
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Error parsing Sender_Condition in format!
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Format: chat.yml
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Option: real
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Line: !{is_player}
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Sender: darifo
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Variables: [channel, message_uuid, message_is_denied_silently, message, sender]
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Error: Report: Error parsing JavaScript! Line: 1. Error: <eval>:1:11 Expected : but found }
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] !{is_player}
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] ^ in <eval> at line number 1 at column number 11
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl]
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] Check that Sender_Conditon is a JavaScript
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] code returning a valid Boolean!
[16:35:24] [Async Chat Thread - #164/INFO]: [ChatControl] -------------------------------------------------------------------------------------------
[16:35:24] [Async Chat Thread - #164/ERROR]: Could not pass event AsyncChatEvent to ChatControl v11.0.3-BETA
org.mineacademy.chatcontrol.lib.exception.FoScriptException: Report: Error parsing JavaScript! Line: 1. Error: <eval>:1:11 Expected : but found }
!{is_player}
^ in <eval> at line number 1 at column number 11
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:330) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:216) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:156) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Format$Part.build(Format.java:343) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Format.build(Format.java:153) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:627) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.model.Channel.sendMessage(Channel.java:542) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.listener.chat.ChatHandler.handle0(ChatHandler.java:225) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.listener.chat.ChatHandler.handle(ChatHandler.java:49) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.listener.chat.AdventureChatListener.execute(AdventureChatListener.java:61) ~[ChatControl-11.0.3-BETA.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:1.21.1-2329-803bf62]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.adventure.ChatProcessor.post(ChatProcessor.java:378) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at io.papermc.paper.adventure.ChatProcessor.processModern(ChatProcessor.java:151) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at io.papermc.paper.adventure.ChatProcessor.process(ChatProcessor.java:106) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.server.network.ServerGamePacketListenerImpl.chat(ServerGamePacketListenerImpl.java:2493) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.server.network.ServerGamePacketListenerImpl.broadcastChatMessage(ServerGamePacketListenerImpl.java:2609) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChat$13(ServerGamePacketListenerImpl.java:2257) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at net.minecraft.util.FutureChain.lambda$append$1(FutureChain.java:25) ~[purpur-1.21.1.jar:1.21.1-2329-803bf62]
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: javax.script.ScriptException: <eval>:1:11 Expected : but found }
!{is_player}
^ in <eval> at line number 1 at column number 11
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:463) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:530) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[ChatControl-11.0.3-BETA.jar:?]
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262) ~[java.scripting:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:272) ~[ChatControl-11.0.3-BETA.jar:?]
... 26 more
Caused by: org.openjdk.nashorn.internal.runtime.ParserException: <eval>:1:11 Expected : but found }
!{is_player}
^
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:293) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.error(AbstractParser.java:278) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.expectDontAdvance(AbstractParser.java:349) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.AbstractParser.expect(AbstractParser.java:336) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.propertyAssignment(Parser.java:3198) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.objectLiteral(Parser.java:2977) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.primaryExpression(Parser.java:2777) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.memberExpression(Parser.java:3598) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.leftHandSideExpression(Parser.java:3382) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.unaryExpression(Parser.java:4397) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.unaryExpression(Parser.java:4377) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.expression(Parser.java:4568) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.conditionalExpression(Parser.java:4720) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.assignmentExpression(Parser.java:4659) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.expression(Parser.java:4537) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.expressionStatement(Parser.java:1840) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.statement(Parser.java:1146) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.sourceElements(Parser.java:900) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.program(Parser.java:835) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.parse(Parser.java:322) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.parser.Parser.parse(Parser.java:282) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.runtime.Context.compile(Context.java:1484) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:1451) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.internal.runtime.Context.compileScript(Context.java:761) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:528) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:517) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:395) ~[ChatControl-11.0.3-BETA.jar:?]
at ChatControl-11.0.3-BETA.jar/org.openjdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:151) ~[ChatControl-11.0.3-BETA.jar:?]
at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262) ~[java.scripting:?]
at ChatControl-11.0.3-BETA.jar/org.mineacademy.chatcontrol.lib.model.JavaScriptExecutor.run(JavaScriptExecutor.java:272) ~[ChatControl-11.0.3-BETA.jar:?]
... 26 more |
Hey there! I can't reproduce the JS error. Can you please ZIP me your /chc debug? |
2024-12-22-2.log |
Got it, I will have more time to sit with this after holidays, thanks for your understanding. |
Thanks, it's happening quite often and once it broke the whole chat format, so I'll prob wait for the fix until trying to update again |
Are you using MySQL?
No
Are you using a proxy?
No
"/version ChatControlRed" - plugin version
11.0.3
Optional: Error log
No response
ZIP of "/chc debug"
No response
Steps to reproduce
Hello, I have:
and I use it in my format:
and now I received this error:
also there's Not Secure prefix, is it ok? In console
The text was updated successfully, but these errors were encountered: