Skip to content

Commit

Permalink
Fix issue #261
Browse files Browse the repository at this point in the history
  • Loading branch information
walterhiggins committed Aug 1, 2015
1 parent 78ddb5f commit 62ff903
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scriptcraft-version=3.1.8
scriptcraft-version=3.1.9
8 changes: 8 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@


<target name="get-canary" depends="init" description="Downloads canarymod jar" unless="canary.present">
<mkdir dir="target/lib/"/>
<get src="http://scriptcraftjs.org/download/latest/CanaryMod-1.8.0-1.2.1-SNAPSHOT-shaded.jar"
maxtime="60"
dest="target/lib/canarymod.jar"
verbose="true"/>
<!--
wph 20150801 - CanaryMod is no longer being developed. Get the latest version from scriptcraftjs.org instead.
<get src="https://ci.visualillusionsent.net/job/CanaryMod/lastStableBuild/artifact/*zip*/archive.zip"
maxtime="60"
dest="target/canarymod.zip"
Expand All @@ -65,6 +72,7 @@
dest="target/lib">
<mapper type="glob" from="*.jar" to="canarymod.jar"/>
</unzip>
-->
</target>

<target name="compile-plugins" depends="init,get-canary" description="compile canary plugin source">
Expand Down
5 changes: 5 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
RELEASE NOTES
=============
3.1.9 Release (2015 08 01)
--------------------------
Bug fix: minigames/scoreboard.js module's updatePlayerScore() function did not work with latest version of CanaryMod.
Using /scoreboard command instead. See https://github.com/walterhiggins/ScriptCraft/issues/261

3.1.8 Release (2015 06 07)
--------------------------
Bug fix: Fixes drone on Spigot 1.8.7 with JDK 7 see
Expand Down
9 changes: 7 additions & 2 deletions src/main/js/modules/minigames/scoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ function addPlayerToTeam( objectiveName, teamName, playerName ){
}

function updatePlayerScore( objectiveName, playerName, score ){
var sc = sb['getScore(String, ScoreObjective)']( playerName, sb.getScoreObjective( objectiveName) );
sc.score = score;
/*
wph 20150801 - this fails with CanaryMod 1.8.2 so use command instead - messy for ops but non-ops won't see messages
var sc = sb['getScore(String, ScoreObjective)']( playerName, sb.getScoreObjective( objectiveName) );
sc.score = score;
*/
execCommand('scoreboard players set ' + playerName + ' ' + objectiveName + score);
}

function removeTeamFromScoreboard( teamName ){
Expand Down

0 comments on commit 62ff903

Please sign in to comment.