TriggerReactor / TriggerReactor

Simple script parser with infinite possibility
GNU General Public License v3.0
50 stars 18 forks source link

Code error when writing multi-line comments #565

Open LimuLhw opened 1 year ago

LimuLhw commented 1 year ago

Before/읽어주세요

Make sure that you have used /trg debug so that the more detailed error message will show up in the console. 신고전에 /trg debug 명령어를 사용해서 디버그 모드를 켜주세요. 그래야 콘솔창에 더 자세한 정보가 나옵니다.


Describe the bug/버그 증상 여러 줄 주석 작성 후 아래에 빈 칸 혹은 코드 한 줄 작성 후 로드 시 오류가 발생합니다.

코드: / 주석 테스트 테스트 1 테스트 2 주석 1 2 3 /

LOG "!"


Server information/서버 정보 1.20.1 Paper, TRG 3.3.7 혹은 그 이상

Error message/에러 메시지 If error message (in red color) shows up in Minecraft client or on the console, report it here 에러메시지 (빨간색) 가 나타났다면 클라이언트와 콘솔의 메시지를 올려주세요. image

Others/그 밖의 정보들

Sayakie commented 1 year ago

Could not be reproducible and staled.

wysohn commented 1 year ago
    /*damageTypeString = event.getDamageType().toString()
    IF damageTypeString.contains("BLOCK")
    event.setDamageAmount(0)
    ENDIF*/
[04:21:43 WARN]: io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager$TriggerInitFailedException: Failed to initialize Trigger [CustomTrigger -- TriggerInfo{triggerName=vehicle-cancel-event-damage, config='GsonConfigSource{ file=vehicle-cancel-event-damage.json }', path='plugins/TriggerReactor/CustomTrigger/vehicle-cancel-event-damage.trg'}]!
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.Trigger.init(Trigger.java:132)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.custom.CustomTriggerLoader.load(CustomTriggerLoader.java:54)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.custom.CustomTriggerLoader.load(CustomTriggerLoader.java:31)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager.reload(AbstractTriggerManager.java:109)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager.reload(AbstractTriggerManager.java:87)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.custom.CustomTriggerManager.reload(CustomTriggerManager.java:54)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.main.TRGCommandHandler.onCommand(TRGCommandHandler.java:1454)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.bukkit.main.AbstractJavaPlugin.onCommand(AbstractJavaPlugin.java:287)
[04:21:43 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[04:21:43 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[04:21:43 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:907)
[04:21:43 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[04:21:43 WARN]:        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
[04:21:43 WARN]:        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:322)
[04:21:43 WARN]:        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:306)
[04:21:43 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2297)
[04:21:43 WARN]:        at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$20(PlayerConnection.java:2257)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[04:21:43 WARN]:        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[04:21:43 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1342)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.bi(MinecraftServer.java:1319)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1312)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.i_(MinecraftServer.java:1290)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1178)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
[04:21:43 WARN]:        at java.base/java.lang.Thread.run(Thread.java:840)
[04:21:43 WARN]: Caused by: io.github.wysohn.triggerreactor.core.script.parser.ParserException: Error occured while processing a token after [type: ENDL, value: 'null'] at row[3], col[0]
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.script.parser.Parser.nextToken(Parser.java:76)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.script.parser.Parser.skipEndLines(Parser.java:84)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.script.parser.Parser.parseStatement(Parser.java:109)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.script.parser.Parser.parse(Parser.java:93)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.Trigger.init(Trigger.java:123)
[04:21:43 WARN]:        ... 31 more
[04:21:43 WARN]: Caused by: io.github.wysohn.triggerreactor.core.script.lexer.LexerException: Found an unrecognizable character near row:6 col:8
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.script.lexer.Lexer.getToken(Lexer.java:156)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.script.parser.Parser.nextToken(Parser.java:59)
[04:21:43 WARN]:        ... 35 more
[04:21:43 WARN]: java.lang.RuntimeException: Failed to load TriggerInfo{triggerName=vehicle-cancel-event-damage, config='GsonConfigSource{ file=vehicle-cancel-event-damage.json }', path='plugins/TriggerReactor/CustomTrigger/vehicle-cancel-event-damage.trg'}
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager.reload(AbstractTriggerManager.java:121)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager.reload(AbstractTriggerManager.java:87)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.custom.CustomTriggerManager.reload(CustomTriggerManager.java:54)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.main.TRGCommandHandler.onCommand(TRGCommandHandler.java:1454)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.bukkit.main.AbstractJavaPlugin.onCommand(AbstractJavaPlugin.java:287)
[04:21:43 WARN]:        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45)
[04:21:43 WARN]:        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155)
[04:21:43 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.CraftServer.dispatchCommand(CraftServer.java:907)
[04:21:43 WARN]:        at org.bukkit.craftbukkit.v1_19_R3.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64)
[04:21:43 WARN]:        at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
[04:21:43 WARN]:        at net.minecraft.commands.CommandDispatcher.performCommand(CommandDispatcher.java:322)
[04:21:43 WARN]:        at net.minecraft.commands.CommandDispatcher.a(CommandDispatcher.java:306)
[04:21:43 WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2297)
[04:21:43 WARN]:        at net.minecraft.server.network.PlayerConnection.lambda$handleChatCommand$20(PlayerConnection.java:2257)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.b(IAsyncTaskHandler.java:59)
[04:21:43 WARN]:        at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
[04:21:43 WARN]:        at net.minecraft.server.TickTask.run(TickTask.java:18)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1342)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.bi(MinecraftServer.java:1319)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1312)
[04:21:43 WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.i_(MinecraftServer.java:1290)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1178)
[04:21:43 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
[04:21:43 WARN]:        at java.base/java.lang.Thread.run(Thread.java:840)
[04:21:43 WARN]: Caused by: java.lang.NullPointerException
[04:21:43 WARN]:        at java.base/java.util.Objects.requireNonNull(Objects.java:209)
[04:21:43 WARN]:        at java.base/java.util.Optional.of(Optional.java:113)
[04:21:43 WARN]:        at TriggerReactor-bukkit-latest-3.4.4-Release.jar//io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager.reload(AbstractTriggerManager.java:110)
[04:21:43 WARN]:        ... 28 more
[04:21:43 ERROR]: [io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager] Failed to load TriggerInfo{triggerName=vehicle-cancel-event-damage, config='GsonConfigSource{ file=vehicle-cancel-event-damage.json }', path='plugins/TriggerReactor/CustomTrigger/vehicle-cancel-event-damage.trg'}
[04:21:43 ERROR]: [io.github.wysohn.triggerreactor.core.manager.trigger.AbstractTriggerManager] Failed to load TriggerInfo{triggerName=vehicle-cancel-event-damage, config='GsonConfigSource{ file=vehicle-cancel-event-damage.json }', path='plugins/TriggerReactor/CustomTrigger/vehicle-cancel-event-damage.trg'}

Reported in 3.4.4