Skip to content

Commit

Permalink
Fix WorldGuard hook again. This is starting to get annoying...
Browse files Browse the repository at this point in the history
  • Loading branch information
bensku committed Nov 27, 2018
1 parent 2448043 commit 9dfd99f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
import ch.njol.yggdrasil.Fields;
import ch.njol.yggdrasil.YggdrasilID;

import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.bukkit.BukkitAdapter;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldguard.WorldGuard;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.internal.platform.WorldGuardPlatform;
Expand All @@ -63,7 +63,7 @@ protected boolean init() {
if (!Skript.classExists("com.sk89q.worldguard.WorldGuard")) {
Skript.error("Skript does not support WorldGuard 6. WorldGuard region support has been disabled!");
return false;
} else if (!Skript.classExists("com.sk89q.worldedit.math.BlockVector")) {
} else if (!Skript.classExists("com.sk89q.worldedit.math.BlockVector3")) {
Skript.error("WorldEdit you're using is not compatible with Skript. Disabling WorldGuard support!");
return false;
}
Expand Down Expand Up @@ -139,7 +139,7 @@ public Collection<OfflinePlayer> getOwners() {

@Override
public Iterator<Block> getBlocks() {
final BlockVector min = region.getMinimumPoint(), max = region.getMaximumPoint();
final BlockVector3 min = region.getMinimumPoint(), max = region.getMaximumPoint();
return new AABB(world, new Vector(min.getBlockX(), min.getBlockY(), min.getBlockZ()),
new Vector(max.getBlockX() + 1, max.getBlockY() + 1, max.getBlockZ() + 1)).iterator();
}
Expand Down Expand Up @@ -205,7 +205,7 @@ public Collection<? extends Region> getRegionsAt_i(@Nullable final Location l) {
RegionManager manager = platform.getRegionContainer().get(BukkitAdapter.adapt(l.getWorld()));
if (manager == null)
return r;
ApplicableRegionSet applicable = manager.getApplicableRegions(BukkitAdapter.asVector(l));
ApplicableRegionSet applicable = manager.getApplicableRegions(BukkitAdapter.asBlockVector(l));
if (applicable == null)
return r;
for (ProtectedRegion region : applicable)
Expand Down

0 comments on commit 9dfd99f

Please sign in to comment.