mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2025-01-24 00:51:21 +01:00
chore: pre-commit changes [skip ci]
This commit is contained in:
parent
a9ff2b5a69
commit
a18c110cf3
@ -40,9 +40,12 @@ public class TriggerBlockTag implements Tag.AutoComplete, Tag.Split {
|
||||
System.out.println("Auto complete");
|
||||
System.out.println(argData);
|
||||
|
||||
var triggerBlocks = serverContainer.getCommonTriggerBlocks().stream().filter(block -> block.contains(argData)).toList();
|
||||
var triggerBlocks = serverContainer.getCommonTriggerBlocks()
|
||||
.stream()
|
||||
.filter(block -> block.contains(argData))
|
||||
.toList();
|
||||
|
||||
if(triggerBlocks.isEmpty()) {
|
||||
if (triggerBlocks.isEmpty()) {
|
||||
return serverContainer.getAllTriggerBlocks();
|
||||
}
|
||||
|
||||
|
@ -20,13 +20,17 @@ public class SpigotServerContainer implements ServerContainer {
|
||||
private CoreListeners coreListeners;
|
||||
private final Server server;
|
||||
// Create an array of items
|
||||
private final List<String> commonTriggerBlockList = Arrays.asList(
|
||||
Material.WATER, Material.LAVA, Material.AIR, Material.NETHER_PORTAL, Material.END_GATEWAY, Material.END_PORTAL).stream().map(Enum::name).toList();
|
||||
private final List<String> commonTriggerBlockList =
|
||||
Arrays
|
||||
.asList(Material.WATER, Material.LAVA, Material.AIR,
|
||||
Material.NETHER_PORTAL, Material.END_GATEWAY,
|
||||
Material.END_PORTAL)
|
||||
.stream()
|
||||
.map(Enum::name)
|
||||
.toList();
|
||||
|
||||
private final List<String> fullTriggerBlockList =
|
||||
Arrays.stream(Material.values())
|
||||
.map(Enum::name)
|
||||
.toList();
|
||||
Arrays.stream(Material.values()).map(Enum::name).toList();
|
||||
|
||||
public SpigotServerContainer(Server server) {
|
||||
this.server = server;
|
||||
@ -96,7 +100,8 @@ public class SpigotServerContainer implements ServerContainer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchCommand(UUID uuid, String command, CommandTag.CommandLevel commandLevel) {
|
||||
public void dispatchCommand(UUID uuid, String command,
|
||||
CommandTag.CommandLevel commandLevel) {
|
||||
Player player = server.getPlayer(uuid);
|
||||
switch (commandLevel) {
|
||||
case CONSOLE:
|
||||
|
Loading…
Reference in New Issue
Block a user