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);
}
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);
}