Skip to content

Commit

Permalink
Clean up smells
Browse files Browse the repository at this point in the history
Jikoo committed Jun 10, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
Jikoo Adam
1 parent 5a0ca9a commit 4a56961
Showing 6 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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;
@@ -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!",
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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();

Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 4a56961

Please sign in to comment.