Trace Refactor #233
@ -34,6 +34,7 @@ import org.bukkit.entity.Player;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Linked
|
@Linked
|
||||||
@ -111,11 +112,10 @@ public class TraceCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<String> tabCompletes(CommandSender sender, PreviousArguments previousArguments, String s) {
|
public Collection<String> tabCompletes(CommandSender sender, PreviousArguments previousArguments, String s) {
|
||||||
return ViewFlag.flags.stream()
|
return ViewFlag.flags.stream()
|
||||||
.map(viewFlag -> viewFlag.name)
|
.map(flag -> flag.name)
|
||||||
.map(name -> "--" + name)
|
.map(name -> "--" + name)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,10 @@ import java.util.function.UnaryOperator;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public abstract class ViewFlag {
|
public abstract class ViewFlag {
|
||||||
|
/**
|
||||||
|
* Static registry of static flags
|
||||||
|
*/
|
||||||
|
public static final List<ViewFlag> flags = new ArrayList<>();
|
||||||
|
|
||||||
public static ViewFlag EXPLOSION = new ViewFlag(true,"explosion") {
|
public static ViewFlag EXPLOSION = new ViewFlag(true,"explosion") {
|
||||||
@Override
|
@Override
|
||||||
@ -53,11 +57,6 @@ public abstract class ViewFlag {
|
|||||||
*/
|
*/
|
||||||
public final String[] aliases;
|
public final String[] aliases;
|
||||||
|
|
||||||
/**
|
|
||||||
* Static registry of static flags
|
|
||||||
*/
|
|
||||||
public static final List<ViewFlag> flags = new ArrayList<>();
|
|
||||||
|
|
||||||
public ViewFlag(boolean isStatic, String name, String... aliases) {
|
public ViewFlag(boolean isStatic, String name, String... aliases) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.aliases = aliases;
|
this.aliases = aliases;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren