Fix flower pots
This commit is contained in:
@@ -123,11 +123,11 @@ public class FlowerPots {
|
|||||||
String sql;
|
String sql;
|
||||||
if(alreadyFound)
|
if(alreadyFound)
|
||||||
{
|
{
|
||||||
sql = "UPDATE coreFoundPots SET timestamp = '"+(System.currentTimeMillis() / 1000)+"', type = 1 WHERE player = (SELECT id FROM players WHERE uuid = '"+P.getUniqueId().toString()+"')";
|
sql = "UPDATE coreFoundPots SET timestamp = '"+(System.currentTimeMillis() / 1000)+"', type = 1 WHERE player = (SELECT id FROM players WHERE uuid = '"+P.getUniqueId().toString()+"') AND id = '"+pot+"'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sql = "INSERT INTO coreFoundPots(id, player, timestamp, type) VALUES('"+pot+"', (SELECT id FROM players WHERE uuid = '"+P.getUniqueId().toString()+"'),'"+(int) (System.currentTimeMillis() / 1000)+"','"+type+"')";
|
sql = "INSERT INTO coreFoundPots(id, player, timestamp, type) VALUES('"+pot+"', (SELECT id FROM players WHERE uuid = '"+P.getUniqueId().toString()+"'),'"+(int) (System.currentTimeMillis() / 1000)+"',"+type+")";
|
||||||
}
|
}
|
||||||
AnuraCore.getSql().queryUpdate(sql);
|
AnuraCore.getSql().queryUpdate(sql);
|
||||||
Location loc = AnuraCore.getInstance().flowerPots.get(pot);
|
Location loc = AnuraCore.getInstance().flowerPots.get(pot);
|
||||||
|
|||||||
Reference in New Issue
Block a user