Use newer Java features in places where it makes sense and more (#1009)

This commit is contained in:
altrisi authored and GitHub committed 2021-08-03 07:32:40 -03:00
1 parent 28cb136c6b
commit 7fb5e47da5
34 files changed
+338 -399

No files matched your search

@@ -90,7 +90,7 @@ public class CarpetScriptServer
* @param app The {@link BundledModule} of the app.
*/
public static void registerSettingsApp(BundledModule app) {
ruleModuleData.add(app);
ruleModuleData.add(app);
}
static
@@ -412,16 +412,11 @@ public class CarpetScriptServer
});
}
static class TransferData
private static record TransferData(boolean perUser, Predicate<ServerCommandSource> commandValidator, boolean isRuleApp)
{
boolean perUser;
Predicate<ServerCommandSource> commandValidator;
boolean isRuleApp;
private TransferData(CarpetScriptHost host)
{
perUser = host.perUser;
commandValidator = host.commandValidator;
isRuleApp = host.isRuleApp;
this(host.perUser, host.commandValidator, host.isRuleApp);
}
}