Added blocktype drone extension for creating words from blocks
This commit is contained in:
parent
74fbe24f8d
commit
42b1ac2b74
4 changed files with 329 additions and 320 deletions
|
@ -108,8 +108,9 @@ ready(function()
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
projectile.remove();
|
projectile.remove();
|
||||||
|
var teleportCause =org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||||
shooter.teleport(projectile.location,
|
shooter.teleport(projectile.location,
|
||||||
org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.ENDER_PEARL);
|
teleportCause.PLUGIN);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
projectile.remove();
|
projectile.remove();
|
||||||
|
|
|
@ -291,6 +291,8 @@ var Drone = Drone || {
|
||||||
}else{
|
}else{
|
||||||
this.dir = dir%4;
|
this.dir = dir%4;
|
||||||
}
|
}
|
||||||
|
// for debugging
|
||||||
|
//__self.sendMessage("New Drone " + this.toString());
|
||||||
if (usePlayerCoords){
|
if (usePlayerCoords){
|
||||||
this.fwd(3);
|
this.fwd(3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,8 @@ plugin("homes", {
|
||||||
host = guest;
|
host = guest;
|
||||||
guest = getPlayerObject(guest);
|
guest = getPlayerObject(guest);
|
||||||
host = getPlayerObject(host);
|
host = getPlayerObject(host);
|
||||||
var location = this.store.houses[host.name];
|
var loc = this.store.houses[host.name];
|
||||||
if (!location){
|
if (!loc){
|
||||||
guest.sendMessage(host.name + " has no home");
|
guest.sendMessage(host.name + " has no home");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,10 @@ plugin("homes", {
|
||||||
guest.sendMessage("You can't visit " + host.name + "'s home yet");
|
guest.sendMessage("You can't visit " + host.name + "'s home yet");
|
||||||
return;
|
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);
|
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
|
determine whether a guest is allow visit a host's home
|
||||||
|
@ -64,7 +65,12 @@ plugin("homes", {
|
||||||
set: function(player){
|
set: function(player){
|
||||||
player = getPlayerObject(player);
|
player = getPlayerObject(player);
|
||||||
var loc = player.location;
|
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){
|
remove: function(player){
|
||||||
player = getPlayerObject(player);
|
player = getPlayerObject(player);
|
||||||
|
|
Reference in a new issue