From 0f196f59c6a4cb76ab8409da62ff1f35505f94a8 Mon Sep 17 00:00:00 2001 From: Dico Karssiens Date: Sun, 11 Nov 2018 14:06:45 +0000 Subject: Changes I made before breaking my local repository. Hoping this works. --- .../java/io/dico/dicore/command/LambdaCommand.java | 70 +++++++++++----------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'dicore3/command/src/main/java/io/dico/dicore/command/LambdaCommand.java') diff --git a/dicore3/command/src/main/java/io/dico/dicore/command/LambdaCommand.java b/dicore3/command/src/main/java/io/dico/dicore/command/LambdaCommand.java index 71b5ca4..5f55122 100644 --- a/dicore3/command/src/main/java/io/dico/dicore/command/LambdaCommand.java +++ b/dicore3/command/src/main/java/io/dico/dicore/command/LambdaCommand.java @@ -1,35 +1,35 @@ -package io.dico.dicore.command; - -import io.dico.dicore.exceptions.checkedfunctions.CheckedBiFunction; -import org.bukkit.Location; -import org.bukkit.command.CommandSender; - -import java.util.List; -import java.util.Objects; -import java.util.function.BiFunction; - -public class LambdaCommand extends ExtendedCommand { - private CheckedBiFunction executor; - private BiFunction> completer; - - public LambdaCommand executor(CheckedBiFunction executor) { - this.executor = Objects.requireNonNull(executor); - return this; - } - - public LambdaCommand completer(BiFunction> completer) { - this.completer = Objects.requireNonNull(completer); - return this; - } - - @Override - public String execute(CommandSender sender, ExecutionContext context) throws CommandException { - return executor.checkedApply(sender, context); - } - - @Override - public List tabComplete(CommandSender sender, ExecutionContext context, Location location) { - return completer == null ? super.tabComplete(sender, context, location) : completer.apply(sender, context); - } - -} +package io.dico.dicore.command; + +import io.dico.dicore.exceptions.checkedfunctions.CheckedBiFunction; +import org.bukkit.Location; +import org.bukkit.command.CommandSender; + +import java.util.List; +import java.util.Objects; +import java.util.function.BiFunction; + +public class LambdaCommand extends ExtendedCommand { + private CheckedBiFunction executor; + private BiFunction> completer; + + public LambdaCommand executor(CheckedBiFunction executor) { + this.executor = Objects.requireNonNull(executor); + return this; + } + + public LambdaCommand completer(BiFunction> completer) { + this.completer = Objects.requireNonNull(completer); + return this; + } + + @Override + public String execute(CommandSender sender, ExecutionContext context) throws CommandException { + return executor.checkedApply(sender, context); + } + + @Override + public List tabComplete(CommandSender sender, ExecutionContext context, Location location) { + return completer == null ? super.tabComplete(sender, context, location) : completer.apply(sender, context); + } + +} -- cgit v1.2.3