Removed unused method.

This commit is contained in:
Brianna 2019-05-23 23:28:57 -04:00
parent 02e0920feb
commit 46c09cb8d2

View File

@ -33,25 +33,6 @@ public class SettingsManager implements Listener {
Bukkit.getPluginManager().registerEvents(this, plugin); Bukkit.getPluginManager().registerEvents(this, plugin);
} }
public static <K, V> void add(LinkedHashMap<K, V> map, int index, K key, V value) {
assert (map != null);
assert !map.containsKey(key);
assert (index >= 0) && (index < map.size());
int i = 0;
List<Map.Entry<K, V>> rest = new ArrayList<>();
for (Map.Entry<K, V> entry : map.entrySet()) {
if (i++ >= index) {
rest.add(entry);
}
}
map.put(key, value);
for (Map.Entry<K, V> entry : rest) {
map.remove(entry.getKey());
map.put(entry.getKey(), entry.getValue());
}
}
@EventHandler @EventHandler
public void onInventoryClick(InventoryClickEvent event) { public void onInventoryClick(InventoryClickEvent event) {
ItemStack clickedItem = event.getCurrentItem(); ItemStack clickedItem = event.getCurrentItem();