Skip to content

Commit

Permalink
chore: pre-commit changes [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 9, 2024
1 parent a9ff2b5 commit a18c110
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ public List<String> autoComplete(String argData) {
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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -96,7 +100,8 @@ public void registerIncomingChannel(String channel) {
}

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

0 comments on commit a18c110

Please sign in to comment.