imports and better error reporting and stacktraces
This commit is contained in:
1 parent
15fe9c5ad9
commit
1650f3233b
15 files changed
+351
-245
No files matched your search
@@ -4,6 +4,7 @@ import org.apache.commons.io.IOUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Locale;
|
||||
|
||||
public class BundledModule implements ModuleInterface
|
||||
{
|
||||
@@ -13,9 +14,9 @@ public class BundledModule implements ModuleInterface
|
||||
{
|
||||
try
|
||||
{
|
||||
name = scriptName;
|
||||
name = scriptName.toLowerCase(Locale.ROOT);
|
||||
code = IOUtils.toString(
|
||||
getClass().getClassLoader().getResourceAsStream("assets/carpet/scripts/"+scriptName+".sc"),
|
||||
getClass().getClassLoader().getResourceAsStream("assets/carpet/scripts/"+name+".sc"),
|
||||
StandardCharsets.UTF_8
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user