Tweaks for Spigot 1.8
This commit is contained in:
parent
dad20186d7
commit
62821db815
5 changed files with 37 additions and 13 deletions
|
@ -6,7 +6,12 @@ var blocks = require('blocks'),
|
||||||
if (__plugin.canary){
|
if (__plugin.canary){
|
||||||
bountiful = parseFloat(server.canaryModVersion) > 1.7;
|
bountiful = parseFloat(server.canaryModVersion) > 1.7;
|
||||||
}
|
}
|
||||||
|
if (__plugin.bukkit){
|
||||||
|
/*
|
||||||
|
wph 20150103 - metadata still applies for Craftbukkit 1.8
|
||||||
|
bountiful = parseFloat(server.bukkitVersion) > 1.7;
|
||||||
|
*/
|
||||||
|
}
|
||||||
var lookup = {};
|
var lookup = {};
|
||||||
function initLookup(){
|
function initLookup(){
|
||||||
var Facing = Packages.net.minecraft.util.EnumFacing,
|
var Facing = Packages.net.minecraft.util.EnumFacing,
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
|
'use strict';
|
||||||
|
/*global Packages, require, server, exports*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
wph 20150103 - temporarily commenting out - textcolors was removed.
|
||||||
var textcolors = require('textcolors');
|
var textcolors = require('textcolors');
|
||||||
|
*/
|
||||||
|
var sb;
|
||||||
|
if (__plugin.canary){
|
||||||
var Canary = Packages.net.canarymod.Canary;
|
var Canary = Packages.net.canarymod.Canary;
|
||||||
var sb = Canary.scoreboards().getScoreboard();
|
sb = Canary.scoreboards().getScoreboard();
|
||||||
|
} else {
|
||||||
|
console.warn('Scoreboard not yet supported in CraftBukkit');
|
||||||
|
return;
|
||||||
|
}
|
||||||
function execCommand( command ){
|
function execCommand( command ){
|
||||||
server.executeVanillaCommand(server, command);
|
server.executeVanillaCommand(server, command);
|
||||||
}
|
}
|
||||||
|
@ -20,7 +32,10 @@ function createScoreboard( objectiveName, displayName ){
|
||||||
function addTeamToScoreboard( teamName, color){
|
function addTeamToScoreboard( teamName, color){
|
||||||
execCommand('scoreboard teams add ' + teamName);
|
execCommand('scoreboard teams add ' + teamName);
|
||||||
var team = getTeamByName( teamName );
|
var team = getTeamByName( teamName );
|
||||||
|
/*
|
||||||
|
wph 20150103 - temporarily commenting out - textcolors was removed.
|
||||||
team.prefix = textcolors.colorize(color, '');
|
team.prefix = textcolors.colorize(color, '');
|
||||||
|
*/
|
||||||
//execCommand('scoreboard teams option ' + teamName + ' color ' + color);
|
//execCommand('scoreboard teams option ' + teamName + ' color ' + color);
|
||||||
}
|
}
|
||||||
function removeScoreboard( name ){
|
function removeScoreboard( name ){
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
/*global require, Packages*/
|
/*global require, Packages, __plugin*/
|
||||||
var Drone = require('./drone').Drone,
|
var Drone = require('./drone').Drone,
|
||||||
blocks = require('blocks');
|
blocks = require('blocks');
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
@ -44,8 +44,10 @@ function bed(){
|
||||||
.set('facing',this.dir)
|
.set('facing',this.dir)
|
||||||
.set('part', BedHalf.HEAD);
|
.set('part', BedHalf.HEAD);
|
||||||
}
|
}
|
||||||
|
if (__plugin.canary){
|
||||||
foot.update();
|
foot.update();
|
||||||
head.update();
|
head.update();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ Create double iron doors
|
||||||
|
|
||||||
var Drone = require('./drone').Drone,
|
var Drone = require('./drone').Drone,
|
||||||
blocks = require('blocks');
|
blocks = require('blocks');
|
||||||
/*global require, Packages*/
|
/*global require, Packages, __plugin*/
|
||||||
function door( doorMaterial, hinge) {
|
function door( doorMaterial, hinge) {
|
||||||
if ( typeof doorMaterial == 'undefined' ) {
|
if ( typeof doorMaterial == 'undefined' ) {
|
||||||
doorMaterial = blocks.door_wood; // wood
|
doorMaterial = blocks.door_wood; // wood
|
||||||
|
@ -71,8 +71,10 @@ function door( doorMaterial, hinge) {
|
||||||
.set('hinge', hinge == 'left' ? HingePosition.LEFT: HingePosition.RIGHT)
|
.set('hinge', hinge == 'left' ? HingePosition.LEFT: HingePosition.RIGHT)
|
||||||
.set('half', DoorHalf.UPPER);
|
.set('half', DoorHalf.UPPER);
|
||||||
}
|
}
|
||||||
|
if (__plugin.canary){
|
||||||
lower.update();
|
lower.update();
|
||||||
upper.update();
|
upper.update();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Drone.extend( door );
|
Drone.extend( door );
|
||||||
|
|
|
@ -41,8 +41,8 @@ your own mini-game...
|
||||||
|
|
||||||
***/
|
***/
|
||||||
|
|
||||||
if (__plugin.canary){
|
if (__plugin.canary || __plugin.bukkit){
|
||||||
console.warn('cow-clicker minigame is not yet supported in CanaryMod');
|
console.warn('cow-clicker minigame is not yet supported in CanaryMod and Craftbukkit');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var store = {},
|
var store = {},
|
||||||
|
|
Reference in a new issue