Skip to content

Commit

Permalink
Clean up smells
Browse files Browse the repository at this point in the history
  • Loading branch information
Jikoo committed Jun 10, 2024
1 parent 5a0ca9a commit 4a56961
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Server;
import org.bukkit.World;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Server;
import org.bukkit.World;
Expand Down Expand Up @@ -74,12 +72,10 @@ void testEntries() {
// Google's Multimap EntrySet (and other things) appear to fail in comparison.
List<Pair<Block, ArrayList<Object>>> entries =
blockMultimap.entrySet().stream()
.map(entry -> new Pair<>(entry.getKey(), new ArrayList<>(entry.getValue())))
.collect(Collectors.toList());
.map(entry -> new Pair<>(entry.getKey(), new ArrayList<>(entry.getValue()))).toList();
List<Pair<Block, ArrayList<Object>>> values =
normalMap.asMap().entrySet().stream()
.map(entry -> new Pair<>(entry.getKey(), new ArrayList<>(entry.getValue())))
.collect(Collectors.toList());
.map(entry -> new Pair<>(entry.getKey(), new ArrayList<>(entry.getValue()))).toList();

assertThat(
"Entries must match!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import com.github.jikoo.planarwrappers.mock.ServerMocks;
import java.util.logging.Logger;
import org.bukkit.Bukkit;
import org.bukkit.Server;
import org.bukkit.command.SimpleCommandMap;
import org.bukkit.plugin.Plugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ void beforeEach() {
}).when(plugins).disablePlugin(any(Plugin.class));
doAnswer(invocation -> enabledPlugins.toArray(new Plugin[0])).when(plugins).getPlugins();
doAnswer(invocation -> {
Plugin plugin = invocation.getArgument(0);
return plugin.isEnabled();
Plugin targetPlugin = invocation.getArgument(0);
return targetPlugin.isEnabled();
}).when(plugins).isPluginEnabled(any(Plugin.class));
doReturn(plugins).when(server).getPluginManager();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ void isBankOwner() {
@Test
void isBankMemberNoProvider() {
String bankName = "Server Bank";
assertThat("Response is sane default", econHook.isBankOwner(bankName, player), is(false));
assertThat("Response is sane default", econHook.isBankMember(bankName, player), is(false));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.github.jikoo.planarwrappers.service.VaultPermission.FrozenServerOp;
import java.util.logging.Logger;
import net.milkbowl.vault.permission.Permission;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.Server;
import org.bukkit.command.SimpleCommandMap;
Expand Down

0 comments on commit 4a56961

Please sign in to comment.