mirror of
https://github.com/songoda/EpicBuckets.git
synced 2025-02-20 13:41:23 +01:00
Extra methods to get shops
This commit is contained in:
parent
5c5ed84b65
commit
711ca8035d
@ -106,6 +106,13 @@ public class Shop {
|
||||
return subShops.get(shop);
|
||||
}
|
||||
|
||||
public SubShop getSubShop(XMaterial mat) {
|
||||
for (SubShop subShop : subShops.values()) {
|
||||
if (subShop.getGenItem().isSimilar(mat.parseItem())) return subShop;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.songoda.epicbuckets.shop;
|
||||
|
||||
import com.songoda.epicbuckets.EpicBuckets;
|
||||
import com.songoda.epicbuckets.genbucket.GenbucketType;
|
||||
import com.songoda.epicbuckets.util.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
@ -134,6 +135,13 @@ public class ShopManager {
|
||||
return shopDatabase.get(shop);
|
||||
}
|
||||
|
||||
public Shop getShop(GenbucketType genbucketType) {
|
||||
for (Shop shop : shopDatabase.values()) {
|
||||
if (shop.getTrait() == genbucketType) return shop;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getShopPath() {
|
||||
return shopPath;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: EpicBuckets
|
||||
version: 1.1
|
||||
version: 1.4
|
||||
description: Generate walls fast and efficient with beautiful guis!
|
||||
author: Songoda
|
||||
main: com.songoda.epicbuckets.EpicBuckets
|
||||
|
Loading…
Reference in New Issue
Block a user