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

Non [a-z0-9/._-] sound name causes severe error #2412

Closed
bluelhf opened this issue Sep 1, 2019 · 3 comments · Fixed by #2413
Closed

Non [a-z0-9/._-] sound name causes severe error #2412

bluelhf opened this issue Sep 1, 2019 · 3 comments · Fixed by #2413
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: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@bluelhf
Copy link
Contributor

bluelhf commented Sep 1, 2019

Description

Trying to play a sound with a non [a-z0-9/._-] name results in a severe error

Steps to Reproduce

Run this piece of code in any trigger:
play sound "sound name with a space" at all players

Expected Behavior

The sound shouldn't play and no error should be given.

Errors / Screenshots

#!#!
#!#! [Skript] Severe Error:
#!#!
#!#! Something went horribly wrong with Skript.
#!#! This issue is NOT your fault! You probably can't fix it yourself, either.
#!#! It looks like you are using some plugin(s) that alter how Skript works (addons).
#!#! Here is full list of them:
#!#! skript-mirror (https://github.com/btk5h/skript-mirror)
#!#! We could not identify which of those are specially related, so this might also be Skript issue.
#!#! You should try disabling those plugins one by one, trying to find which one causes it.
#!#! If the error doesn't disappear even after disabling all listed plugins, it is probably Skript issue.
#!#! In that case, you will be given instruction on how should you report it.
#!#! On the other hand, if the error disappears when disabling some plugin, report it to author of that plugin.
#!#! Only if the author tells you to do so, report it to Skript's issue tracker.
#!#!
#!#! Stack trace:
#!#! net.minecraft.server.v1_14_R1.ResourceKeyInvalidException: Non [a-z0-9/._-] character in path of location: minecraft:nonexistent sound here
#!#! at net.minecraft.server.v1_14_R1.MinecraftKey.<init>(SourceFile:38)
#!#! at net.minecraft.server.v1_14_R1.MinecraftKey.<init>(SourceFile:43)
#!#! at org.bukkit.craftbukkit.v1_14_R1.CraftWorld.playSound(CraftWorld.java:2079)
#!#! at ch.njol.skript.effects.EffPlaySound.playSound(EffPlaySound.java:187)
#!#! at ch.njol.skript.effects.EffPlaySound.execute(EffPlaySound.java:153)
#!#! at ch.njol.skript.lang.Effect.run(Effect.java:52)
#!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
#!#! at ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:89)
#!#! at ch.njol.skript.command.Commands.handleEffectCommand(Commands.java:278)
#!#! at ch.njol.skript.command.Commands$3$1.call(Commands.java:211)
#!#! at ch.njol.skript.command.Commands$3$1.call(Commands.java:1)
#!#! at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftFuture.run(CraftFuture.java:88)
#!#! at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452)
#!#! at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1147)
#!#! at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:420)
#!#! at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1074)
#!#! at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:918)
#!#! at java.lang.Thread.run(Thread.java:748)
#!#!
#!#! Version Information:
#!#! Skript: 2.4-beta5 (latest)
#!#! Flavor: skriptlang-github
#!#! Date: 2019-08-04
#!#! Bukkit: 1.14.4-R0.1-SNAPSHOT
#!#! Minecraft: 1.14.4
#!#! Java: 1.8.0_212 (OpenJDK 64-Bit Server VM 25.212-b01)
#!#! OS: Linux amd64 4.4.0-143-generic
#!#!
#!#! Server platform: Paper
#!#!
#!#! Current node: null
#!#! Current item: play sound "nonexistent sound here" at (me >> ch.njol.skript.classes.Converter$ConverterUtils$1@348ca083: commandsender -> location)
#!#!
#!#! Thread: Server thread
#!#!
#!#! Language: english
#!#! Link parse mode: DISABLED
#!#!
#!#! End of Error.
#!#!
@bensku bensku added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. labels Sep 1, 2019
@bensku
Copy link
Member

bensku commented Sep 1, 2019

Skript should validate sound names. That being said, this issue is caused by Minecraft not allowing other characters in sound names.

@ham1255
Copy link

ham1255 commented Sep 8, 2019

ah just force lowers chars and make skripts error out when using invalid

@FranKusmiruk FranKusmiruk reopened this Sep 29, 2019
@FranKusmiruk FranKusmiruk added the completed The issue has been fully resolved and the change will be in the next Skript update. label Sep 29, 2019
@ham1255
Copy link

ham1255 commented Sep 29, 2019

Ah lol?

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: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants