Remove PlotMe support

This commit is contained in:
NotMyFault 2019-03-25 00:02:20 +01:00
parent 68c8950cdc
commit 14ab61d154
5 changed files with 2 additions and 70 deletions

View File

@ -7,7 +7,7 @@ load: STARTUP
database: false database: false
depend: [WorldEdit] depend: [WorldEdit]
api-version: 1.13 api-version: 1.13
#softdepend: [WorldGuard, PlotSquared, MCore, Factions, GriefPrevention, Residence, Towny, PlotMe, PreciousStones] #softdepend: [WorldGuard, PlotSquared, MCore, Factions, GriefPrevention, Residence, Towny, PreciousStones]
commands: commands:
'/p': '/p':
description: VoxelSniper perform command description: VoxelSniper perform command

View File

@ -22,7 +22,6 @@ dependencies {
compile 'net.jzx7:regios:5.9.9' compile 'net.jzx7:regios:5.9.9'
compile 'com.bekvon.bukkit.residence:Residence:4.5._13.1' compile 'com.bekvon.bukkit.residence:Residence:4.5._13.1'
compile 'com.palmergames.bukkit:towny:0.84.0.9' compile 'com.palmergames.bukkit:towny:0.84.0.9'
compile 'com.worldcretornica:plotme_core:0.16.3'
compile 'com.thevoxelbox.voxelsniper:voxelsniper:5.171.0' compile 'com.thevoxelbox.voxelsniper:voxelsniper:5.171.0'
compile 'com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT' compile 'com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT'
compile 'com.wasteofplastic:askyblock:3.0.8.2' compile 'com.wasteofplastic:askyblock:3.0.8.2'

View File

@ -480,15 +480,6 @@ public class FaweBukkit implements IFawe, Listener {
MainUtil.handleError(e); MainUtil.handleError(e);
} }
} }
final Plugin plotmePlugin = Bukkit.getServer().getPluginManager().getPlugin("PlotMe");
if ((plotmePlugin != null) && plotmePlugin.isEnabled()) {
try {
managers.add(new PlotMeFeature(plotmePlugin, this));
Fawe.debug("Plugin 'PlotMe' found. Using it now.");
} catch (final Throwable e) {
MainUtil.handleError(e);
}
}
final Plugin townyPlugin = Bukkit.getServer().getPluginManager().getPlugin("Towny"); final Plugin townyPlugin = Bukkit.getServer().getPluginManager().getPlugin("Towny");
if ((townyPlugin != null) && townyPlugin.isEnabled()) { if ((townyPlugin != null) && townyPlugin.isEnabled()) {
try { try {

View File

@ -1,56 +0,0 @@
package com.boydti.fawe.bukkit.regions;
import com.boydti.fawe.bukkit.FaweBukkit;
import com.boydti.fawe.object.FawePlayer;
import com.worldcretornica.plotme_core.Plot;
import com.worldcretornica.plotme_core.PlotMe_Core;
import com.worldcretornica.plotme_core.bukkit.PlotMe_CorePlugin;
import com.worldcretornica.plotme_core.bukkit.api.BukkitPlayer;
import com.worldcretornica.plotme_core.bukkit.api.BukkitWorld;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import org.bukkit.plugin.Plugin;
public class PlotMeFeature extends BukkitMaskManager implements Listener {
FaweBukkit plugin;
PlotMe_Core plotme;
public PlotMeFeature(final Plugin plotmePlugin, final FaweBukkit p3) {
super(plotmePlugin.getName());
this.plotme = ((PlotMe_CorePlugin) plotmePlugin).getAPI();
this.plugin = p3;
}
public boolean isAllowed(Player player, Plot plot, MaskType type) {
return plot != null && type == MaskType.MEMBER ? plot.isAllowed(player.getUniqueId()) : player.getUniqueId().equals(plot.getOwnerId());
}
@Override
public BukkitMask getMask(final FawePlayer<Player> fp, MaskType type) {
final Player player = fp.parent;
final Location location = player.getLocation();
final Plot plot = this.plotme.getPlotMeCoreManager().getPlotById(new BukkitPlayer(player));
if (plot == null) {
return null;
}
if (isAllowed(player, plot, type)) {
final Location pos1 = new Location(location.getWorld(), this.plotme.getGenManager(player.getWorld().getName()).bottomX(plot.getId(), new BukkitWorld(player.getWorld())), 0, this.plotme
.getGenManager(player.getWorld().getName()).bottomZ(plot.getId(), new BukkitWorld(player.getWorld())));
final Location pos2 = new Location(location.getWorld(), this.plotme.getGenManager(player.getWorld().getName()).topX(plot.getId(), new BukkitWorld(player.getWorld())), 256, this.plotme
.getGenManager(player.getWorld().getName()).topZ(plot.getId(), new BukkitWorld(player.getWorld())));
return new BukkitMask(pos1, pos2) {
@Override
public String getName() {
return plot.getId();
}
@Override
public boolean isValid(FawePlayer player, MaskType type) {
return isAllowed((Player) player.parent, plot, type);
}
};
}
return null;
}
}

View File

@ -6,14 +6,12 @@ description: Fast Async WorldEdit plugin
authors: [Empire92] authors: [Empire92]
loadbefore: [PlotSquared, AsyncWorldEdit, AsyncWorldEditInjector] loadbefore: [PlotSquared, AsyncWorldEdit, AsyncWorldEditInjector]
database: false database: false
softdepend: [WorldGuard, MCore, Factions, GriefPrevention, Residence, Towny, PlotMe, PreciousStones] softdepend: [WorldGuard, MCore, Factions, GriefPrevention, Residence, Towny, PreciousStones]
permissions: permissions:
fawe.plotsquared: fawe.plotsquared:
default: true default: true
children: children:
fawe.plotsquared.trusted: true fawe.plotsquared.trusted: true
fawe.plotme:
default: true
fawe.bypass.regions: fawe.bypass.regions:
default: false default: false
fawe.bypass: fawe.bypass: