mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Use get instead of getX in DB results
This commit is contained in:
1 parent
d92fcf4c64
commit
d91fb12392
1 file changed
+11
-11
+11
-11
@@ -186,11 +186,11 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
||||
final List<DbRow> channelSettings = this.database.getResults("SELECT * from sc_channel_settings WHERE uuid = ?;", uuid.toString());
|
||||
final List<DbRow> ignoredUsers = this.database.getResults("SELECT * from sc_ignored_users WHERE uuid = ?;", uuid.toString());
|
||||
|
||||
final ChatChannel channel = this.carbonChat.channelRegistry().getOrDefault(users.getString("channel"));
|
||||
final ChatChannel channel = this.carbonChat.channelRegistry().getOrDefault(users.get("channel"));
|
||||
|
||||
user.selectedChannel(channel, true);
|
||||
|
||||
final String nickname = users.getString("nickname");
|
||||
final String nickname = users.get("nickname");
|
||||
|
||||
if (nickname != null) {
|
||||
user.nickname(nickname, true);
|
||||
@@ -201,9 +201,9 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
||||
user.spyingWhispers(users.get("spyingwhispers"), true);
|
||||
user.customChatColor(users.get("customchatcolor"), true);
|
||||
|
||||
final String whisperPingKey = users.getString("whisperpingkey");
|
||||
final Float whisperPingVolume = users.getFloat("whisperpingvolume");
|
||||
final Float whisperPingPitch = users.getFloat("whisperpingpitch");
|
||||
final String whisperPingKey = users.get("whisperpingkey");
|
||||
final Float whisperPingVolume = users.get("whisperpingvolume");
|
||||
final Float whisperPingPitch = users.get("whisperpingpitch");
|
||||
|
||||
final Sound whisperSound;
|
||||
|
||||
@@ -213,9 +213,9 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
||||
whisperSound = null;
|
||||
}
|
||||
|
||||
final String channelPingKey = users.getString("channelpingkey");
|
||||
final Float channelPingVolume = users.getFloat("channelpingvolume");
|
||||
final Float channelPingPitch = users.getFloat("channelpingpitch");
|
||||
final String channelPingKey = users.get("channelpingkey");
|
||||
final Float channelPingVolume = users.get("channelpingvolume");
|
||||
final Float channelPingPitch = users.get("channelpingpitch");
|
||||
|
||||
final Sound channelSound;
|
||||
|
||||
@@ -228,7 +228,7 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
||||
user.pingOptions(new PlayerUser.PingOptions(whisperSound, channelSound));
|
||||
|
||||
for (final DbRow channelSetting : channelSettings) {
|
||||
final ChatChannel chatChannel = this.carbonChat.channelRegistry().get(channelSetting.getString("channel"));
|
||||
final ChatChannel chatChannel = this.carbonChat.channelRegistry().get(channelSetting.get("channel"));
|
||||
|
||||
if (chatChannel != null) {
|
||||
final UserChannelSettings settings = user.channelSettings(chatChannel);
|
||||
@@ -236,7 +236,7 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
||||
settings.spying(channelSetting.<Boolean>get("spying"), true);
|
||||
settings.ignoring(channelSetting.<Boolean>get("ignored"), true);
|
||||
|
||||
final String color = channelSetting.getString("color");
|
||||
final String color = channelSetting.get("color");
|
||||
|
||||
if (color != null) {
|
||||
settings.color(TextColor.fromHexString(color), true);
|
||||
@@ -245,7 +245,7 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
||||
}
|
||||
|
||||
for (final DbRow ignoredUser : ignoredUsers) {
|
||||
user.ignoringUser(UUID.fromString(ignoredUser.getString("user")), true, true);
|
||||
user.ignoringUser(UUID.fromString(ignoredUser.get("user")), true, true);
|
||||
}
|
||||
} catch (final SQLException exception) {
|
||||
exception.printStackTrace();
|
||||
|
||||
Reference in new issue
Block a user