Fix teleport issues.
This commit is contained in:
parent
60b158cede
commit
bfeb976e89
@ -1572,7 +1572,7 @@ public String convertToItemName(String val) {
|
|||||||
is_in_vehicle=true;
|
is_in_vehicle=true;
|
||||||
vehicle = p.getVehicle();
|
vehicle = p.getVehicle();
|
||||||
}
|
}
|
||||||
if (target.getName() == this.plugin.getAccountsConfig().getString(p.getName().toLowerCase().toLowerCase() + ".teleplayer")) {
|
if (target.getName().equalsIgnoreCase(this.plugin.getAccountsConfig().getString(p.getName().toLowerCase() + ".teleplayer"))) {
|
||||||
//Determine distance of player to other player.
|
//Determine distance of player to other player.
|
||||||
double otherx = target.getLocation().getX();
|
double otherx = target.getLocation().getX();
|
||||||
double othery = target.getLocation().getY();
|
double othery = target.getLocation().getY();
|
||||||
@ -1631,7 +1631,7 @@ public String convertToItemName(String val) {
|
|||||||
//Allow teleport to occur.
|
//Allow teleport to occur.
|
||||||
p.sendMessage("Teleporting to "+ChatColor.GREEN+target.getName().toLowerCase()+ChatColor.WHITE+" costs $"+ChatColor.YELLOW+df.format(finalcost)+". Type the command again to teleport.");
|
p.sendMessage("Teleporting to "+ChatColor.GREEN+target.getName().toLowerCase()+ChatColor.WHITE+" costs $"+ChatColor.YELLOW+df.format(finalcost)+". Type the command again to teleport.");
|
||||||
this.plugin.getAccountsConfig().set(p.getName().toLowerCase().toLowerCase() + ".teletime", Double.valueOf(p.getPlayerTime()));
|
this.plugin.getAccountsConfig().set(p.getName().toLowerCase().toLowerCase() + ".teletime", Double.valueOf(p.getPlayerTime()));
|
||||||
this.plugin.getAccountsConfig().set(p.getName().toLowerCase().toLowerCase() + ".teleplayer", String.valueOf(target.getName().toLowerCase()));
|
this.plugin.getAccountsConfig().set(p.getName().toLowerCase().toLowerCase() + ".teleplayer", String.valueOf(target.getName()));
|
||||||
} else {
|
} else {
|
||||||
p.sendMessage("Teleporting to "+ChatColor.GREEN+target.getName().toLowerCase()+ChatColor.WHITE+" costs $"+ChatColor.YELLOW+df.format(finalcost)+". You do not have enough in the bank for that.");
|
p.sendMessage("Teleporting to "+ChatColor.GREEN+target.getName().toLowerCase()+ChatColor.WHITE+" costs $"+ChatColor.YELLOW+df.format(finalcost)+". You do not have enough in the bank for that.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user