Search in sources :

Example 1 with PlotAPI

use of com.plotsquared.core.PlotAPI in project GSit by Gecolay.

the class PlSqLink method canCreateSeat.

public boolean canCreateSeat(org.bukkit.Location L, Player P) {
    PlotAPI plapi = new PlotAPI();
    Plot plot = plapi.wrapPlayer(P.getUniqueId()).getCurrentPlot();
    if (plot != null) {
        boolean c = GPM.getSpawnUtil().checkLocation(L);
        if ((plot.getArea() == null || !plot.getArea().isSpawnCustom()) && !c)
            return false;
        return (!GPM.getCManager().REST_TEAM_PLOTS_ONLY || plot.isAdded(P.getUniqueId())) && c;
    }
    return !GPM.getCManager().REST_TEAM_PLOTS_ONLY && GPM.getSpawnUtil().checkLocation(L);
}
Also used : PlotAPI(com.plotsquared.core.PlotAPI) Plot(com.plotsquared.core.plot.Plot)

Example 2 with PlotAPI

use of com.plotsquared.core.PlotAPI in project HoloPlots by IntellectualSites.

the class HoloPlotsPlugin method onEnable.

@Override
public void onEnable() {
    HoloPlotsPlugin.THIS = this;
    Configuration.load(new File(getDataFolder(), "settings.yml"), Configuration.class);
    Configuration.save(new File(getDataFolder(), "settings.yml"), Configuration.class);
    new PacketListener();
    HOLO = new PSHoloUtil();
    // Enable metrics
    new Metrics(this, BSTATS_ID);
    new PlotAPI().registerListener(HOLO);
}
Also used : Metrics(org.bstats.bukkit.Metrics) PlotAPI(com.plotsquared.core.PlotAPI) File(java.io.File)

Aggregations

PlotAPI (com.plotsquared.core.PlotAPI)2 Plot (com.plotsquared.core.plot.Plot)1 File (java.io.File)1 Metrics (org.bstats.bukkit.Metrics)1