Implemented optional specification of teleport causes

This should have backwards-compatibility for any users of the API but would require an update from anything reimplementing (for whatever reason) the interfaces amended by this commit.
This commit is contained in:
zombachu
2020-01-02 18:29:12 -10:00
parent 0f39df0e0b
commit 3aa554c52b
18 changed files with 81 additions and 28 deletions

View File

@ -5,6 +5,7 @@ import com.github.intellectualsites.plotsquared.plot.PlotSquared;
import com.github.intellectualsites.plotsquared.plot.commands.RequiredType;
import com.github.intellectualsites.plotsquared.plot.object.Location;
import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import com.github.intellectualsites.plotsquared.plot.object.TeleportCause;
import com.github.intellectualsites.plotsquared.plot.util.PlotGameMode;
import com.github.intellectualsites.plotsquared.plot.util.PlotWeather;
import com.github.intellectualsites.plotsquared.plot.util.StringMan;
@ -85,7 +86,7 @@ public class SpongePlayer extends PlotPlayer {
}
}
@Override public void teleport(Location location) {
@Override public void teleport(Location location, TeleportCause cause) {
if ((Math.abs(location.getX()) >= 30000000) || (Math.abs(location.getZ()) >= 30000000)) {
return;
}