as per discussion, since scripts can now be stowed in the global bin, it makes sense for apps to behave like datapacks. fixes #613
This commit is contained in:
1 parent
f400c9c006
commit
e8a6b8936f
3 files changed
+2
-3
No files matched your search
@@ -427,7 +427,7 @@ public class CarpetSettings
|
||||
extra = "if /script is enabled",
|
||||
category = SCARPET
|
||||
)
|
||||
public static boolean scriptsAutoload = false;
|
||||
public static boolean scriptsAutoload = true;
|
||||
|
||||
@Rule(desc = "Enables /player command to control/spawn players", category = COMMAND)
|
||||
public static String commandPlayer = "ops";
|
||||
|
||||
@@ -217,7 +217,7 @@ public class CarpetScriptHost extends ScriptHost
|
||||
if (!(ret instanceof MapValue)) return false;
|
||||
Map<Value, Value> config = ((MapValue) ret).getMap();
|
||||
setPerPlayer(config.getOrDefault(new StringValue("scope"), new StringValue("player")).getString().equalsIgnoreCase("player"));
|
||||
persistenceRequired = config.getOrDefault(new StringValue("stay_loaded"), Value.FALSE).getBoolean();
|
||||
persistenceRequired = config.getOrDefault(new StringValue("stay_loaded"), Value.TRUE).getBoolean();
|
||||
// read custom arguments
|
||||
Value arguments = config.get(StringValue.of("arguments"));
|
||||
if (arguments != null)
|
||||
|
||||
@@ -122,7 +122,6 @@ public class CarpetScriptServer
|
||||
});
|
||||
if (CarpetSettings.scriptsAutoload)
|
||||
{
|
||||
Messenger.m(server.getCommandSource(), "Auto-loading world scarpet apps");
|
||||
for (String moduleName: listAvailableModules(false))
|
||||
{
|
||||
addScriptHost(server.getCommandSource(), moduleName, null, true, true, false);
|
||||
|
||||
Reference in new issue
Block a user