mirror of
https://github.com/EpicEricEE/ShopChest.git
synced 2024-11-30 14:33:36 +01:00
Shortened getShops method in ShopUtils
This commit is contained in:
parent
a522197112
commit
1fa0f08073
@ -12,7 +12,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
public class ShopUtils {
|
public class ShopUtils {
|
||||||
@ -51,12 +51,7 @@ public class ShopUtils {
|
|||||||
* @return Array of all Shops
|
* @return Array of all Shops
|
||||||
*/
|
*/
|
||||||
public Shop[] getShops() {
|
public Shop[] getShops() {
|
||||||
ArrayList<Shop> shops = new ArrayList<>();
|
Collection<Shop> shops = shopLocation.values();
|
||||||
|
|
||||||
for (Shop shop : shopLocation.values()) {
|
|
||||||
shops.add(shop);
|
|
||||||
}
|
|
||||||
|
|
||||||
return shops.toArray(new Shop[shops.size()]);
|
return shops.toArray(new Shop[shops.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user