Removal of many prefixes and deprecation of FaweLocation

- Removed some prefixes to help make upstream merging a bit easier.
- Replaced reflection code for titles with the regular bukkit api.
- Removed FAWELocation and FAWEPlayer where it wasn't needed.
- Deprecated FaweLocation since having it in the first place is very stupid.
- FAWEPlayer should also be deprecated soon because the majority of that code is redundant.
This commit is contained in:
MattBDev
2019-06-05 21:17:34 -04:00
parent bf5d2c2788
commit b42553116c
21 changed files with 161 additions and 507 deletions

View File

@ -90,7 +90,7 @@ public class WEManager {
return new Region[]{RegionWrapper.GLOBAL()};
}
FaweLocation loc = player.getLocation();
String world = loc.world;
String world = player.getWorld().getName();
if (!world.equals(player.getMeta("lastMaskWorld"))) {
player.deleteMeta("lastMaskWorld");
player.deleteMeta("lastMask");
@ -112,7 +112,7 @@ public class WEManager {
FaweMask mask = iter.next();
if (mask.isValid(player, type)) {
Region region = mask.getRegion();
if (region.contains(loc.x, loc.y, loc.z)) {
if (region.contains(loc.vector)) {
regions.add(region);
} else {
removed = true;
@ -144,12 +144,7 @@ public class WEManager {
}
}
}
if (!tmpMasks.isEmpty()) {
masks = tmpMasks;
regions = masks.stream().map(FaweMask::getRegion).collect(Collectors.toSet());
} else {
regions.addAll(backupRegions);
}
regions.addAll(backupRegions);
if (!masks.isEmpty()) {
player.setMeta("lastMask", masks);
} else {