From 9897ee314f0d364c659bdde584fa6b23e0630391 Mon Sep 17 00:00:00 2001 From: irgendwer / Jonas Date: Sun, 19 Mar 2017 19:59:30 +0100 Subject: [PATCH 1/4] this should fix the issue flyth mentioned not tested though ^^ --- sinusbot/SinusForMinecraft.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sinusbot/SinusForMinecraft.js b/sinusbot/SinusForMinecraft.js index 74abd57..72fdc5a 100644 --- a/sinusbot/SinusForMinecraft.js +++ b/sinusbot/SinusForMinecraft.js @@ -13,6 +13,11 @@ registerPlugin({ var conn = net.connect({ host: '127.0.0.1', port: 1234 }, function(err) { if (err) engine.log(err); }); - if (conn) conn.write('{"title":"' + trackEvent.title() + '", "artist":"' + trackEvent.artist() + '", "duration":' + trackEvent.duration() + '}'); + + if (conn) conn.write(JSON.stringify({ + title: trackEvent.title(), + artist: trackEvent.artist(), + duration: trackEvent.duration() + }); }); -}); \ No newline at end of file +}); From 61ed6fec83f9c59d80f090ac732dacc31ab9b9ef Mon Sep 17 00:00:00 2001 From: irgendwer / Jonas Date: Sun, 19 Mar 2017 20:36:56 +0100 Subject: [PATCH 2/4] fixed typo --- sinusbot/SinusForMinecraft.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sinusbot/SinusForMinecraft.js b/sinusbot/SinusForMinecraft.js index 72fdc5a..fc40d96 100644 --- a/sinusbot/SinusForMinecraft.js +++ b/sinusbot/SinusForMinecraft.js @@ -18,6 +18,6 @@ registerPlugin({ title: trackEvent.title(), artist: trackEvent.artist(), duration: trackEvent.duration() - }); + })); }); }); From 43240de47288b5795040f388fff2adb187fc83ee Mon Sep 17 00:00:00 2001 From: Alw3ys Date: Mon, 27 Mar 2017 16:21:29 +0200 Subject: [PATCH 3/4] more readable code --- sinusbot/SinusForMinecraft.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sinusbot/SinusForMinecraft.js b/sinusbot/SinusForMinecraft.js index fc40d96..a5311fe 100644 --- a/sinusbot/SinusForMinecraft.js +++ b/sinusbot/SinusForMinecraft.js @@ -14,10 +14,9 @@ registerPlugin({ if (err) engine.log(err); }); - if (conn) conn.write(JSON.stringify({ - title: trackEvent.title(), - artist: trackEvent.artist(), - duration: trackEvent.duration() - })); + if (conn) { + var trackInfo = { title:trackEvent.title(), artist:trackEvent.artist(), duration:trackEvent.duration() }; + conn.write(JSON.stringify(trackInfo)); + } }); }); From ad678353341e19e40f38e9b7a87cadd2346452a7 Mon Sep 17 00:00:00 2001 From: Alw3ys Date: Mon, 27 Mar 2017 16:38:10 +0200 Subject: [PATCH 4/4] 1.1-SNAPSHOT --- bukkit/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bukkit/pom.xml b/bukkit/pom.xml index d68c963..1269586 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -4,7 +4,7 @@ com.alw3ys SinusForMinecraft - 1.0-SNAPSHOT + 1.1-SNAPSHOT SinusForMinecraft Connect Sinusbot with a BungeeCord or Bukkit Server