Added blocktype drone extension for creating words from blocks

This commit is contained in:
walterhiggins 2013-01-20 21:02:56 +00:00
parent 74fbe24f8d
commit 42b1ac2b74
4 changed files with 329 additions and 320 deletions

View file

@ -108,8 +108,9 @@ ready(function()
break;
case 2:
projectile.remove();
var teleportCause =org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
shooter.teleport(projectile.location,
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.ENDER_PEARL);
teleportCause.PLUGIN);
break;
case 3:
projectile.remove();

View file

@ -291,6 +291,8 @@ var Drone = Drone || {
}else{
this.dir = dir%4;
}
// for debugging
//__self.sendMessage("New Drone " + this.toString());
if (usePlayerCoords){
this.fwd(3);
}

View file

@ -33,8 +33,8 @@ plugin("homes", {
host = guest;
guest = getPlayerObject(guest);
host = getPlayerObject(host);
var location = this.store.houses[host.name];
if (!location){
var loc = this.store.houses[host.name];
if (!loc){
guest.sendMessage(host.name + " has no home");
return;
}
@ -42,9 +42,10 @@ plugin("homes", {
guest.sendMessage("You can't visit " + host.name + "'s home yet");
return;
}
var worldName = location[0], x = location[1], y = location[2], z=location[3], yaw=location[4];
var worldName = loc[0], x = loc[1], y = loc[2], z=loc[3], yaw=loc[4];
var teleportCause = org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
var homeLoc = new org.bukkit.Location(org.bukkit.Bukkit.getWorld(worldName),x,y,z,yaw,0);
guest.teleport(homeLoc);
guest.teleport(homeLoc, teleportCause.PLUGIN);
},
/*
determine whether a guest is allow visit a host's home
@ -64,7 +65,12 @@ plugin("homes", {
set: function(player){
player = getPlayerObject(player);
var loc = player.location;
this.store.houses[player.name] = [""+loc.world.name, Math.floor(loc.x), Math.floor(loc.y), Math.floor(loc.z), Math.floor(loc.yaw), Math.floor(loc.pitch)];
this.store.houses[player.name] = [""+loc.world.name
,Math.floor(loc.x)
,Math.floor(loc.y)
,Math.floor(loc.z)
,Math.floor(loc.yaw)
,Math.floor(loc.pitch)];
},
remove: function(player){
player = getPlayerObject(player);