Use primitive specific Predicates instead of Function (#859)
This commit is contained in:
1 parent
69e9e9b0bb
commit
be0635de82
3 files changed
+18
-17
No files matched your search
@@ -37,7 +37,7 @@ import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static net.minecraft.server.command.CommandManager.argument;
|
||||
@@ -226,7 +226,7 @@ public class CarpetScriptServer
|
||||
return modules.get(name);
|
||||
}
|
||||
|
||||
public boolean addScriptHost(ServerCommandSource source, String name, Function<ServerCommandSource, Boolean> commandValidator,
|
||||
public boolean addScriptHost(ServerCommandSource source, String name, Predicate<ServerCommandSource> commandValidator,
|
||||
boolean perPlayer, boolean autoload, boolean isRuleApp)
|
||||
{
|
||||
CarpetProfiler.ProfilerToken currentSection = CarpetProfiler.start_section(null, "Scarpet load", CarpetProfiler.TYPE.GENERAL);
|
||||
@@ -457,7 +457,7 @@ public class CarpetScriptServer
|
||||
static class TransferData
|
||||
{
|
||||
boolean perUser;
|
||||
Function<ServerCommandSource, Boolean> commandValidator;
|
||||
Predicate<ServerCommandSource> commandValidator;
|
||||
boolean isRuleApp;
|
||||
private TransferData(CarpetScriptHost host)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user