remove TerraScript ID keyword in favor of file name

This commit is contained in:
dfsek committed 2021-10-17 11:16:24 -07:00
1 parent ab100c85a1
commit 18bc083431
8 files changed
+39 -45

No files matched your search

@@ -0,0 +1,16 @@
package com.dfsek.terra.api.util;
import java.io.File;
public class StringUtil {
public static String fileName(String path) {
if(path.contains(File.separator)) {
return path.substring(path.lastIndexOf(File.separatorChar) + 1, path.lastIndexOf('.'));
} else if(path.contains(".")) {
return path.substring(0, path.lastIndexOf('.'));
} else {
return path;
}
}
}