chore: pre-commit changes [skip ci]

This commit is contained in:
github-actions[bot] 2024-12-09 03:32:17 +00:00
parent a9ff2b5a69
commit a18c110cf3
2 changed files with 16 additions and 8 deletions

View File

@ -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();
}

View File

@ -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: