Added extra parenthesis

This commit is contained in:
Norbi Peti 2016-12-25 01:03:05 +01:00
parent bf33c55205
commit 9269e0fb19

View file

@ -21,8 +21,13 @@ public class AutoUpdaterListener implements IListener<MessageReceivedEvent> {
return; return;
String branch = title.substring(title.indexOf(':') + 1, title.indexOf(']')); String branch = title.substring(title.indexOf(':') + 1, title.indexOf(']'));
String project = title.substring(title.indexOf('[') + 1, title.indexOf(':')); String project = title.substring(title.indexOf('[') + 1, title.indexOf(':'));
if (branch.equals("master") || (TBMCCoreAPI.IsTestServer() && branch.equals("dev")) if ((branch.equals("master") || (TBMCCoreAPI.IsTestServer() && branch.equals("dev")))
&& TBMCCoreAPI.UpdatePlugin(project, new DiscordSender(null, TBMCCoreAPI.IsTestServer()?DiscordPlugin.chatchannel:DiscordPlugin.coffeechannel), branch) && TBMCCoreAPI.UpdatePlugin(project,
new DiscordSender(null,
TBMCCoreAPI.IsTestServer() //
? DiscordPlugin.chatchannel //
: DiscordPlugin.coffeechannel),
branch)
&& (!TBMCCoreAPI.IsTestServer() || !branch.equals("master"))) && (!TBMCCoreAPI.IsTestServer() || !branch.equals("master")))
try { try {
event.getMessage().addReaction(DiscordPlugin.DELIVERED_REACTION); event.getMessage().addReaction(DiscordPlugin.DELIVERED_REACTION);