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 | cdea68443a0b917656e50e2c0dad45d95544baeb (patch) | |
tree | de1364aa35ea93f85fc71e8a28dbbd82a9facde0 /EssentialsProtect/src/com/earth2me | |
parent | 5d8f5ceceeeebb9fa85ba9e96252713594df2357 (diff) | |
download | Essentials-cdea68443a0b917656e50e2c0dad45d95544baeb.tar Essentials-cdea68443a0b917656e50e2c0dad45d95544baeb.tar.gz Essentials-cdea68443a0b917656e50e2c0dad45d95544baeb.tar.lz Essentials-cdea68443a0b917656e50e2c0dad45d95544baeb.tar.xz Essentials-cdea68443a0b917656e50e2c0dad45d95544baeb.zip |
Only get data from valid rows
Fixes #641
Diffstat (limited to 'EssentialsProtect/src/com/earth2me')
-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) { |