mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
target
This commit is contained in:
parent
b3a5f0aff2
commit
81f3e6ef24
@ -22,6 +22,7 @@ package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotSquared;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
@ -44,7 +45,7 @@ public class Target extends SubCommand {
|
||||
MainUtil.sendMessage(plr, C.NOT_VALID_PLOT_ID);
|
||||
return false;
|
||||
}
|
||||
final Location loc = MainUtil.getPlotHome(loc.getWorld(), id);
|
||||
final Location loc = MainUtil.getPlotHome(ploc.getWorld(), id);
|
||||
plr.setCompassTarget(loc);
|
||||
MainUtil.sendMessage(plr, C.COMPASS_TARGET);
|
||||
return true;
|
||||
|
@ -95,5 +95,11 @@ public class BukkitPlayer implements PlotPlayer {
|
||||
public boolean 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()));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,4 +23,6 @@ public interface PlotPlayer {
|
||||
public boolean isOnline();
|
||||
|
||||
public String getName();
|
||||
|
||||
public void setCompassTarget(Location loc);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user