mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-23 05:36: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.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;
|
||||||
|
@ -96,4 +96,10 @@ public class BukkitPlayer implements PlotPlayer {
|
|||||||
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()));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,6 @@ public interface PlotPlayer {
|
|||||||
public boolean isOnline();
|
public boolean isOnline();
|
||||||
|
|
||||||
public String getName();
|
public String getName();
|
||||||
|
|
||||||
|
public void setCompassTarget(Location loc);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user