mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-30 06:23:49 +01:00
Fix issue with loading flags on non-existing regions from SQL.
No idea if this actually works or what the issue was ¯\_(ツ)_/¯ Thanks to EONABloodrayne for the updated statement (if it works) and also blame them if it doesn't. Fixes WORLDGUARD-3355.
This commit is contained in:
parent
43a5bf1638
commit
4239bdc96d
@ -223,7 +223,11 @@ private void loadFlags() throws SQLException {
|
|||||||
PreparedStatement stmt = closer.register(conn.prepareStatement(
|
PreparedStatement stmt = closer.register(conn.prepareStatement(
|
||||||
"SELECT region_id, flag, value " +
|
"SELECT region_id, flag, value " +
|
||||||
"FROM " + config.getTablePrefix() + "region_flag " +
|
"FROM " + config.getTablePrefix() + "region_flag " +
|
||||||
"WHERE world_id = " + worldId));
|
"WHERE world_id = " + worldId +
|
||||||
|
"AND region_id IN " +
|
||||||
|
"(SELECT id FROM " +
|
||||||
|
config.getTablePrefix() + "region WHERE" +
|
||||||
|
"world_id=" + worldId + ")"));
|
||||||
|
|
||||||
ResultSet rs = closer.register(stmt.executeQuery());
|
ResultSet rs = closer.register(stmt.executeQuery());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user