From c49b37bd9aa29c8802fda0fd95a1e48bda6cd15c Mon Sep 17 00:00:00 2001 From: kaenganxt Date: Mon, 20 Oct 2014 14:58:35 +0200 Subject: [PATCH] Fix flower pots --- src/de/anura/core/FlowerPots.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/anura/core/FlowerPots.java b/src/de/anura/core/FlowerPots.java index dacbb87..d4b6706 100644 --- a/src/de/anura/core/FlowerPots.java +++ b/src/de/anura/core/FlowerPots.java @@ -123,11 +123,11 @@ public class FlowerPots { String sql; 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 { - 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); Location loc = AnuraCore.getInstance().flowerPots.get(pot);