This commit is contained in:
boy0001 2015-02-22 23:46:47 +11:00
parent b3a5f0aff2
commit 81f3e6ef24
3 changed files with 10 additions and 1 deletions

View File

@ -22,6 +22,7 @@ package com.intellectualcrafters.plot.commands;
import com.intellectualcrafters.plot.PlotSquared; import com.intellectualcrafters.plot.PlotSquared;
import com.intellectualcrafters.plot.config.C; import com.intellectualcrafters.plot.config.C;
import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.PlotId; import com.intellectualcrafters.plot.object.PlotId;
import com.intellectualcrafters.plot.object.PlotPlayer; import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.MainUtil; import com.intellectualcrafters.plot.util.MainUtil;
@ -44,7 +45,7 @@ public class Target extends SubCommand {
MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_ID); MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_ID);
return false; return false;
} }
final Location loc = MainUtil.getPlotHome(loc.getWorld(), id); final Location loc = MainUtil.getPlotHome(ploc.getWorld(), id);
plr.setCompassTarget(loc); plr.setCompassTarget(loc);
MainUtil.sendMessage(plr, C.COMPASS_TARGET); MainUtil.sendMessage(plr, C.COMPASS_TARGET);
return true; return true;

View File

@ -95,5 +95,11 @@ public class BukkitPlayer implements PlotPlayer {
public boolean isOnline() { public boolean isOnline() {
return this.player.isOnline(); return this.player.isOnline();
} }
@Override
public void setCompassTarget(Location loc) {
player.setCompassTarget(new org.bukkit.Location(BukkitUtil.getWorld(loc.getWorld()), loc.getX(), loc.getY(), loc.getZ()));
}
} }

View File

@ -23,4 +23,6 @@ public interface PlotPlayer {
public boolean isOnline(); public boolean isOnline();
public String getName(); public String getName();
public void setCompassTarget(Location loc);
} }