From 14ab61d154067651eda8f02ad6a4c67a4ae77804 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Mon, 25 Mar 2019 00:02:20 +0100 Subject: [PATCH] Remove PlotMe support --- favs/src/main/resources/plugin.yml | 2 +- worldedit-bukkit/build.gradle | 1 - .../com/boydti/fawe/bukkit/FaweBukkit.java | 9 --- .../fawe/bukkit/regions/PlotMeFeature.java | 56 ------------------- .../src/main/resources/plugin.yml | 4 +- 5 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/PlotMeFeature.java diff --git a/favs/src/main/resources/plugin.yml b/favs/src/main/resources/plugin.yml index f021c1e57..6c5f76cd9 100644 --- a/favs/src/main/resources/plugin.yml +++ b/favs/src/main/resources/plugin.yml @@ -7,7 +7,7 @@ load: STARTUP database: false depend: [WorldEdit] api-version: 1.13 -#softdepend: [WorldGuard, PlotSquared, MCore, Factions, GriefPrevention, Residence, Towny, PlotMe, PreciousStones] +#softdepend: [WorldGuard, PlotSquared, MCore, Factions, GriefPrevention, Residence, Towny, PreciousStones] commands: '/p': description: VoxelSniper perform command diff --git a/worldedit-bukkit/build.gradle b/worldedit-bukkit/build.gradle index d7e6d0acd..43077f21e 100644 --- a/worldedit-bukkit/build.gradle +++ b/worldedit-bukkit/build.gradle @@ -22,7 +22,6 @@ dependencies { compile 'net.jzx7:regios:5.9.9' compile 'com.bekvon.bukkit.residence:Residence:4.5._13.1' 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.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT' compile 'com.wasteofplastic:askyblock:3.0.8.2' diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java index 1699471d7..88e819630 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/FaweBukkit.java @@ -480,15 +480,6 @@ public class FaweBukkit implements IFawe, Listener { 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"); if ((townyPlugin != null) && townyPlugin.isEnabled()) { try { diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/PlotMeFeature.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/PlotMeFeature.java deleted file mode 100644 index ee57961a9..000000000 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/regions/PlotMeFeature.java +++ /dev/null @@ -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 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; - } -} diff --git a/worldedit-bukkit/src/main/resources/plugin.yml b/worldedit-bukkit/src/main/resources/plugin.yml index 44b488bdc..e7a760fbf 100644 --- a/worldedit-bukkit/src/main/resources/plugin.yml +++ b/worldedit-bukkit/src/main/resources/plugin.yml @@ -6,14 +6,12 @@ description: Fast Async WorldEdit plugin authors: [Empire92] loadbefore: [PlotSquared, AsyncWorldEdit, AsyncWorldEditInjector] database: false -softdepend: [WorldGuard, MCore, Factions, GriefPrevention, Residence, Towny, PlotMe, PreciousStones] +softdepend: [WorldGuard, MCore, Factions, GriefPrevention, Residence, Towny, PreciousStones] permissions: fawe.plotsquared: default: true children: fawe.plotsquared.trusted: true - fawe.plotme: - default: true fawe.bypass.regions: default: false fawe.bypass: