Fixed brightness 0 issues
This commit is contained in:
parent
86217acca6
commit
90bb05a4c5
1 changed files with 3 additions and 3 deletions
|
@ -79,7 +79,7 @@ public class MCTPAudioCmd implements CommandExecutor {
|
|||
return true;
|
||||
}
|
||||
|
||||
int brightness = 0;
|
||||
Integer brightness = null;
|
||||
if (args.length == 7) {
|
||||
try {
|
||||
brightness = Integer.parseInt(args[6]);
|
||||
|
@ -88,7 +88,7 @@ public class MCTPAudioCmd implements CommandExecutor {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (brightness < 0 || brightness > 255) {
|
||||
if (brightness < 0 || brightness > 254) {
|
||||
sender.sendMessage(prefix + args[6] + " is geen correcte brightness.");
|
||||
return true;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class MCTPAudioCmd implements CommandExecutor {
|
|||
data.put("task", "HUE");
|
||||
data.put("rgb", r + ":" + g + ":" + b);
|
||||
data.put("type", type.name());
|
||||
if (brightness != 0) data.put("brightness", brightness);
|
||||
if (brightness != null) data.put("brightness", brightness);
|
||||
data.put("uuid", p.getUniqueId().toString().replace("-", ""));
|
||||
Main.getClient().sendData(data);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue