mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-08 13:33:11 +00:00
commit
This commit is contained in:
parent
dce25ba07a
commit
a39ec22c8c
87 changed files with 785 additions and 752 deletions
|
@ -28,7 +28,7 @@ import com.intellectualcrafters.plot.object.Plot;
|
|||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualsites.commands.CommandDeclaration;
|
||||
import com.intellectualsites.commands.CommandCaller;
|
||||
import com.intellectualcrafters.plot.object.PlotPlayer;
|
||||
|
||||
@CommandDeclaration(
|
||||
command = "home",
|
||||
|
@ -36,7 +36,7 @@ import com.intellectualsites.commands.CommandCaller;
|
|||
description = "Go to your plot",
|
||||
usage = "/plot home [id|alias]",
|
||||
category = CommandCategory.TELEPORT,
|
||||
requiredType = PlotPlayer.class
|
||||
requiredType = RequiredType.PLAYER
|
||||
)
|
||||
public class Home extends SubCommand {
|
||||
|
||||
|
@ -50,8 +50,8 @@ public class Home extends SubCommand {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(final CommandCaller caller, String[] args) {
|
||||
final PlotPlayer plr = (PlotPlayer) caller.getSuperCaller();
|
||||
public boolean onCommand(final PlotPlayer plr, String[] args) {
|
||||
|
||||
final ArrayList<Plot> plots = PS.get().sortPlotsByWorld(PS.get().getPlots(plr));
|
||||
if (plots.size() == 1) {
|
||||
MainUtil.teleportPlayer(plr, plr.getLocation(), plots.get(0));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue