Javadocs, cleanup, extension's client rules, built-in BundledModules generators, etc (#544)
* Add javadocs to many methods * Added built-in ways to generate BundledModules and documented them * Add Eclipse launch files to .gitignore and fix 11 warnings * Remove many unused imports * Remove some dead and unused code around app loading * Allow extensions to have client-side rules in their SettingsManager Also change tabs to spaces when those changed * Remove unnecessary classloader param in BundledModule * Change max tickwarp duration to Integer.MAX_VALUE * Move RulePrinter into the source so it can be managed by the IDE * Properly reset hopperCounters when changing worlds Also change tabs to spaces again and minor tweaks to javadocs * Run mergedocs even if Full.md was modified * Update src/main/java/carpet/commands/TickCommand.java Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
This commit is contained in:
1 parent
f444fab183
commit
ba1071a8d1
35 files changed
+315
-91
No files matched your search
@@ -50,6 +50,13 @@ public class CarpetScriptServer
|
||||
private static final List<Module> bundledModuleData = new ArrayList<>();
|
||||
private static final List<Module> ruleModuleData = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Registers a Scarpet App to be always available to be loaded
|
||||
* in the /script load list.
|
||||
* @see BundledModule#fromPath(ClassLoader, String, String, boolean)
|
||||
*
|
||||
* @param app The {@link BundledModule} of the app
|
||||
*/
|
||||
public static void registerBuiltInScript(BundledModule app)
|
||||
{
|
||||
bundledModuleData.add(app);
|
||||
@@ -57,10 +64,11 @@ public class CarpetScriptServer
|
||||
|
||||
/**
|
||||
* Registers a Scarpet App to be used as a Rule App
|
||||
* (to be controlled with the value of a Carpet rule)
|
||||
* (to be controlled with the value of a Carpet rule).
|
||||
* Libraries should be registered with {@link #registerBuiltInScript(BundledModule)} instead
|
||||
* @see BundledModule#fromPath(ClassLoader, String, String, boolean)
|
||||
*
|
||||
* @param app is the BundledModule of an app. Libraries
|
||||
* should be registered as builtInScripts instead
|
||||
* @param app The {@link BundledModule} of the app.
|
||||
*/
|
||||
public static void registerSettingsApp(BundledModule app) {
|
||||
ruleModuleData.add(app);
|
||||
@@ -214,13 +222,6 @@ public class CarpetScriptServer
|
||||
// Messenger.m(source, "r Failed to add "+name+" app: invalid app config (via '__config()' function)");
|
||||
// return false;
|
||||
//}
|
||||
if (module == null)
|
||||
{
|
||||
Messenger.m(source, "r Unable to locate the app, but created empty "+name+" app instead");
|
||||
modules.put(name, newHost);
|
||||
return true;
|
||||
}
|
||||
String code = module.getCode();
|
||||
if (module.getCode() == null)
|
||||
{
|
||||
Messenger.m(source, "r Unable to load "+name+" app - not found");
|
||||
|
||||
Reference in new issue
Block a user