Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-02 17:40:09 +01:00
Remove ASkyBlock
ASkyBlock does only exist up to 1.12 and won't be continued to higher versions.
Dieser Commit ist enthalten in:
Ursprung
a44800659e
Commit
1b2710f823
@ -65,7 +65,6 @@ dependencies {
|
|||||||
"implementation"("com.palmergames.bukkit:towny:0.84.0.9") { isTransitive = false }
|
"implementation"("com.palmergames.bukkit:towny:0.84.0.9") { isTransitive = false }
|
||||||
"implementation"("com.thevoxelbox.voxelsniper:voxelsniper:5.171.0") { isTransitive = false }
|
"implementation"("com.thevoxelbox.voxelsniper:voxelsniper:5.171.0") { isTransitive = false }
|
||||||
"implementation"("com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT") { isTransitive = false }
|
"implementation"("com.comphenix.protocol:ProtocolLib-API:4.4.0-SNAPSHOT") { isTransitive = false }
|
||||||
"implementation"("com.wasteofplastic:askyblock:3.0.8.2") { isTransitive = false }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Copy>("processResources") {
|
tasks.named<Copy>("processResources") {
|
||||||
|
@ -12,7 +12,6 @@ import com.boydti.fawe.bukkit.listener.CFIPacketListener;
|
|||||||
import com.boydti.fawe.bukkit.listener.ChunkListener_8;
|
import com.boydti.fawe.bukkit.listener.ChunkListener_8;
|
||||||
import com.boydti.fawe.bukkit.listener.ChunkListener_9;
|
import com.boydti.fawe.bukkit.listener.ChunkListener_9;
|
||||||
import com.boydti.fawe.bukkit.listener.RenderListener;
|
import com.boydti.fawe.bukkit.listener.RenderListener;
|
||||||
import com.boydti.fawe.bukkit.regions.ASkyBlockHook;
|
|
||||||
import com.boydti.fawe.bukkit.regions.FactionsFeature;
|
import com.boydti.fawe.bukkit.regions.FactionsFeature;
|
||||||
import com.boydti.fawe.bukkit.regions.FactionsUUIDFeature;
|
import com.boydti.fawe.bukkit.regions.FactionsUUIDFeature;
|
||||||
import com.boydti.fawe.bukkit.regions.FreeBuildRegion;
|
import com.boydti.fawe.bukkit.regions.FreeBuildRegion;
|
||||||
@ -296,15 +295,6 @@ public class FaweBukkit implements IFawe, Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final Plugin aSkyBlock = Bukkit.getServer().getPluginManager().getPlugin("ASkyBlock");
|
|
||||||
if (aSkyBlock != null && aSkyBlock.isEnabled()) {
|
|
||||||
try {
|
|
||||||
managers.add(new ASkyBlockHook(aSkyBlock));
|
|
||||||
log.debug("Attempting to use plugin 'ASkyBlock' found. Using it now.");
|
|
||||||
} catch (Throwable e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Settings.IMP.EXPERIMENTAL.FREEBUILD) {
|
if (Settings.IMP.EXPERIMENTAL.FREEBUILD) {
|
||||||
try {
|
try {
|
||||||
managers.add(new FreeBuildRegion());
|
managers.add(new FreeBuildRegion());
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
package com.boydti.fawe.bukkit.regions;
|
|
||||||
|
|
||||||
import com.boydti.fawe.regions.FaweMask;
|
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
|
||||||
import com.sk89q.worldedit.math.MutableBlockVector3;
|
|
||||||
import com.wasteofplastic.askyblock.ASkyBlockAPI;
|
|
||||||
import com.wasteofplastic.askyblock.Island;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
|
|
||||||
public class ASkyBlockHook extends BukkitMaskManager implements Listener {
|
|
||||||
|
|
||||||
public ASkyBlockHook(final Plugin aSkyBlock) {
|
|
||||||
super(aSkyBlock.getName());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAllowed(Player player, Island island, MaskType type) {
|
|
||||||
return island != null && (player.getUniqueId().equals(island.getOwner()) || (type == MaskType.MEMBER && island.getMembers().contains(player.getUniqueId()) && hasMemberPermission(player)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FaweMask getMask(final com.sk89q.worldedit.entity.Player player, MaskType type) {
|
|
||||||
final Location location = BukkitAdapter.adapt(player).getLocation();
|
|
||||||
|
|
||||||
Island island = ASkyBlockAPI.getInstance().getIslandAt(location);
|
|
||||||
if (island != null && isAllowed(BukkitAdapter.adapt(player), island, type)) {
|
|
||||||
|
|
||||||
Location center1 = island.getCenter();
|
|
||||||
MutableBlockVector3 center = MutableBlockVector3.at(center1.getX(), center1.getY(), center1.getZ());
|
|
||||||
BlockVector3 pos1 = BlockVector3.at(island.getMinProtectedX(), 0, island.getMinProtectedZ());
|
|
||||||
MutableBlockVector3 pos2 = center.add(center.subtract(pos1)).mutY(255);
|
|
||||||
|
|
||||||
return new FaweMask(pos1, pos2) {
|
|
||||||
@Override
|
|
||||||
public boolean isValid(com.sk89q.worldedit.entity.Player player, MaskType type) {
|
|
||||||
return isAllowed(BukkitAdapter.adapt(player), island, type);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren