mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-26 16:30:52 +01:00
Permission error fix when plugin added new permission
This commit is contained in:
parent
50f0dc7fb8
commit
8ee87fcdd9
@ -40,8 +40,7 @@ public class PermissionsManager {
|
|||||||
private void loadPermissions() {
|
private void loadPermissions() {
|
||||||
this.badges.clear();
|
this.badges.clear();
|
||||||
|
|
||||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM permissions ORDER BY id ASC")) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM permissions ORDER BY id ASC")) {
|
||||||
try (ResultSet set = statement.executeQuery()) {
|
|
||||||
while (set.next()) {
|
while (set.next()) {
|
||||||
Rank rank = null;
|
Rank rank = null;
|
||||||
if (!this.ranks.containsKey(set.getInt("id"))) {
|
if (!this.ranks.containsKey(set.getInt("id"))) {
|
||||||
@ -60,7 +59,6 @@ public class PermissionsManager {
|
|||||||
this.badges.get(rank.getBadge()).add(rank);
|
this.badges.get(rank.getBadge()).add(rank);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
LOGGER.error("Caught SQL exception", e);
|
LOGGER.error("Caught SQL exception", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user