mirror of
https://github.com/zeshan321/ActionHealth.git
synced 2025-03-10 13:49:07 +01:00
WG 7 support
Removes WG 6 support.
This commit is contained in:
parent
178e163595
commit
2b54013808
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
name: ActionHealth
|
||||
main: com.zeshanaslam.actionhealth.Main
|
||||
version: 3.2.6
|
||||
softdepend: [PlaceholderAPI, MVdWPlaceholderAPI]
|
||||
version: 3.2.7
|
||||
softdepend: [PlaceholderAPI, MVdWPlaceholderAPI, WorldGuard]
|
||||
commands:
|
||||
Actionhealth:
|
||||
description: Actionhealth main command.
|
@ -1,7 +1,10 @@
|
||||
package com.zeshanaslam.actionhealth;
|
||||
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||
import com.sk89q.worldguard.protection.regions.RegionContainer;
|
||||
import com.sk89q.worldguard.protection.regions.RegionQuery;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@ -223,8 +226,11 @@ public class HealthUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
ApplicableRegionSet applicableRegions = plugin.worldGuardPlugin.getRegionManager(location.getWorld()).getApplicableRegions(location);
|
||||
RegionContainer regionContainer = com.sk89q.worldguard.WorldGuard.getInstance().getPlatform().getRegionContainer();
|
||||
RegionQuery regionQuery = regionContainer.createQuery();
|
||||
ApplicableRegionSet applicableRegions = regionQuery.getApplicableRegions(BukkitAdapter.adapt(location));
|
||||
for (ProtectedRegion region : applicableRegions) {
|
||||
System.out.println(region.getId());
|
||||
if (plugin.settingsManager.regions.contains(region.getId())) {
|
||||
return true;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ public class TargetHelper {
|
||||
Location temp = loc1.clone();
|
||||
for (int i = 0; i < steps; i++) {
|
||||
temp.add(slope);
|
||||
if (temp.getBlock().getType().isSolid() && temp.getBlock().getType() != Material.IRON_FENCE && !temp.getBlock().getType().toString().contains("GLASS")) {
|
||||
if (temp.getBlock().getType().isSolid() && temp.getBlock().getType() != Material.LEGACY_IRON_FENCE && !temp.getBlock().getType().toString().contains("GLASS")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -304,7 +304,7 @@ public class TargetHelper {
|
||||
BlockIterator itr = new BlockIterator(from, 0, distance);
|
||||
while (itr.hasNext()) {
|
||||
Block block = itr.next();
|
||||
int id = block.getTypeId();
|
||||
int id = block.getType().getId();
|
||||
if (transparentTypeIds == null) {
|
||||
if (id == 0) continue;
|
||||
} else if (transparentTypeIds.contains((byte) id)) {
|
||||
|
Loading…
Reference in New Issue
Block a user