mirror of
https://github.com/songoda/EpicHeads.git
synced 2024-11-29 14:06:29 +01:00
Removed unused method.
This commit is contained in:
parent
02e0920feb
commit
46c09cb8d2
@ -33,25 +33,6 @@ public class SettingsManager implements Listener {
|
||||
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
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
ItemStack clickedItem = event.getCurrentItem();
|
||||
|
Loading…
Reference in New Issue
Block a user