Skip to content

Commit e7c9e24

Browse files
authored
Merge pull request #3 from Alw3ys/irgendwr-patch-1
Prevent invalid simbols
2 parents fe3cf03 + ad67835 commit e7c9e24

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

bukkit/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.alw3ys</groupId>
66
<artifactId>SinusForMinecraft</artifactId>
7-
<version>1.0-SNAPSHOT</version>
7+
<version>1.1-SNAPSHOT</version>
88
<name>SinusForMinecraft</name>
99
<description>Connect Sinusbot with a BungeeCord or Bukkit Server</description>
1010

sinusbot/SinusForMinecraft.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ registerPlugin({
1313
var conn = net.connect({ host: '127.0.0.1', port: 1234 }, function(err) {
1414
if (err) engine.log(err);
1515
});
16-
if (conn) conn.write('{"title":"' + trackEvent.title() + '", "artist":"' + trackEvent.artist() + '", "duration":' + trackEvent.duration() + '}');
16+
17+
if (conn) {
18+
var trackInfo = { title:trackEvent.title(), artist:trackEvent.artist(), duration:trackEvent.duration() };
19+
conn.write(JSON.stringify(trackInfo));
20+
}
1721
});
18-
});
22+
});

0 commit comments

Comments
 (0)