diff options
author | snowleo <schneeleo@gmail.com> | 2011-06-23 12:22:52 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-06-23 12:22:52 +0200 |
commit | b0ed17e20f8b9a20355701b1aeff253e3f00b186 (patch) | |
tree | ffb7cfd4553cc11ce596b5e2be32ae76e3620d2e /EssentialsProtect/src/com/earth2me/essentials | |
parent | b5df68541d3d8e04b1f91ddaa37bf29c479f5ae8 (diff) | |
download | Essentials-b0ed17e20f8b9a20355701b1aeff253e3f00b186.tar Essentials-b0ed17e20f8b9a20355701b1aeff253e3f00b186.tar.gz Essentials-b0ed17e20f8b9a20355701b1aeff253e3f00b186.tar.lz Essentials-b0ed17e20f8b9a20355701b1aeff253e3f00b186.tar.xz Essentials-b0ed17e20f8b9a20355701b1aeff253e3f00b186.zip |
Only get data from valid rows
Fixes #641
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java index 1d09f95c4..e6b3c7592 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/data/ProtectedBlockJDBC.java @@ -272,8 +272,7 @@ public abstract class ProtectedBlockJDBC implements IProtectedBlock conn = cpds.getConnection(); ps = getStatementPlayerCountByLocation(conn, block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), playerName); rs = ps.executeQuery(); - rs.next(); - return rs.getInt(1) > 0 && rs.getInt(2) == 0; + return rs.next() && rs.getInt(1) > 0 && rs.getInt(2) == 0; } catch (SQLException ex) { |