mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-25 20:02:23 +00:00
Automatically convert infinite to admin shops
This commit is contained in:
parent
ddebe5c594
commit
e00f30bf0b
@ -410,7 +410,13 @@ public abstract class Database {
|
|||||||
rs = ps.executeQuery();
|
rs = ps.executeQuery();
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
if (rs.getInt("id") == id) {
|
if (rs.getInt("id") == id) {
|
||||||
return ShopType.valueOf(rs.getString("shoptype"));
|
String shoptype = rs.getString("shoptype");
|
||||||
|
if (shoptype.equals("INFINITE")) {
|
||||||
|
Shop shop = new Shop(plugin, getVendor(id), getProduct(id), getLocation(id), getBuyPrice(id), getSellPrice(id), ShopType.ADMIN);
|
||||||
|
setShop(id, shop);
|
||||||
|
return ShopType.ADMIN;
|
||||||
|
}
|
||||||
|
return ShopType.valueOf(shoptype);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user