mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-30 01:50:50 +01:00
Merge branch 'patch/moodlight-color-config' into 'dev'
add moodlight color config See merge request morningstar/Arcturus-Community!510
This commit is contained in:
commit
9608d6cec2
@ -80,3 +80,6 @@ ALTER TABLE `permissions` ADD COLUMN `acc_calendar_force` enum('0','1') NULL DEF
|
||||
ALTER TABLE `permissions` ADD `cmd_update_calendar` ENUM('0', '1') NOT NULL DEFAULT '0';
|
||||
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.description.cmd_update_calendar', ':update_calendar'), ('commands.keys.cmd_update_calendar', 'update_calendar');
|
||||
INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.success.cmd_update_calendar', 'Calendar updated successfully!');
|
||||
|
||||
-- add moodlight configuration
|
||||
INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('moodlight.color_check.enabled', '1');
|
@ -30,7 +30,7 @@ public class MoodLightSaveSettingsEvent extends MessageHandler {
|
||||
int brightness = this.packet.readInt();
|
||||
boolean apply = this.packet.readBoolean();
|
||||
|
||||
if (!MOODLIGHT_AVAILABLE_COLORS.contains(color)) {
|
||||
if (Emulator.getConfig().getBoolean("moodlight.color_check.enabled", true) && !MOODLIGHT_AVAILABLE_COLORS.contains(color)) {
|
||||
ScripterManager.scripterDetected(this.client, "User tried to set a moodlight to a non-whitelisted color: " + color);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user