Skip to content

Commit 681500c

Browse files
authored
release 2.0.7.4 (#70)
* bentobox integration bug fixes (#65) * version bump for simpAPI * pom fixes, changed publish release to trigger only * code refactor * updated pom and changelog
1 parent 92fa809 commit 681500c

File tree

5 files changed

+23
-17
lines changed

5 files changed

+23
-17
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Release 2.0.7.4
2+
### Bug fixes
3+
- Fix for /finditem shows only 'searching...' but no GUI (PR #69)
4+
15
## Release 2.0.7.3
26
### Changes
37
- JDK version upgraded from 17 to 21

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Shop Search AddOn For QuickShop
2-
### Version: 2.0.7.3-RELEASE
2+
### Version: 2.0.7.4-RELEASE
33

44
An unofficial add-on for the QuickShop Hikari and Reremake spigot plugin.
55
Adds a `/finditem` command in game for searching through all the shops on the server.

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.myzticbean.finditemaddon</groupId>
88
<artifactId>QSFindItemAddOn</artifactId>
9-
<version>2.0.7.3-RELEASE</version>
9+
<version>2.0.7.4-RELEASE</version>
1010
<packaging>jar</packaging>
1111

1212
<name>QSFindItemAddOn</name>

src/main/java/io/myzticbean/finditemaddon/utils/json/HiddenShopStorageUtil.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ public static void handleShopSearchVisibilityAsync(com.ghostchu.quickshop.api.sh
9292
shopLocation.getY(),
9393
shopLocation.getZ()
9494
)) {
95-
ShopSearchActivityStorageUtil.getGlobalShopsList().get(i).setHiddenFromSearch(hideShop);
95+
ShopSearchActivityStorageUtil.getGlobalShopsList()
96+
.get(i)
97+
.setHiddenFromSearch(hideShop);
9698
break;
9799
}
98100
i++;

src/main/java/io/myzticbean/finditemaddon/utils/warp/PlayerWarpsUtil.java

+14-14
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public class PlayerWarpsUtil {
4343

4444
@Nullable
4545
public static Warp findNearestWarp(Location shopLocation, UUID shopOwner) {
46+
Logger.logDebugInfo("Find nearest warp for shop location " + shopLocation);
4647
List<Warp> playersWarps = PlayerWarpsPlugin.getAllWarps().stream()
4748
.filter(warp -> warp.getWarpLocation().getWorld() != null)
4849
.filter(warp -> warp.getWarpLocation().getWorld().equals(shopLocation.getWorld().getName()))
@@ -54,20 +55,19 @@ public static Warp findNearestWarp(Location shopLocation, UUID shopOwner) {
5455
}
5556
if (!playersWarps.isEmpty()) {
5657
Map<Double, Warp> warpDistanceMap = new TreeMap<>();
57-
playersWarps.forEach(warp ->
58-
warpDistanceMap.put(CommonUtils.calculateDistance3D(
59-
shopLocation.getX(),
60-
shopLocation.getY(),
61-
shopLocation.getZ(),
62-
warp.getWarpLocation().getX(),
63-
warp.getWarpLocation().getY(),
64-
warp.getWarpLocation().getZ()
65-
), warp));
66-
if(FindItemAddOn.getConfigProvider().DEBUG_MODE) {
67-
for(Map.Entry<Double, Warp> entry : warpDistanceMap.entrySet()) {
68-
Logger.logDebugInfo("Warp Distance: " + entry.getKey() + " Warp Name: " + entry.getValue().getWarpName());
69-
}
70-
}
58+
playersWarps.forEach(warp ->{
59+
var distance3D = CommonUtils.calculateDistance3D(
60+
shopLocation.getX(),
61+
shopLocation.getY(),
62+
shopLocation.getZ(),
63+
warp.getWarpLocation().getX(),
64+
warp.getWarpLocation().getY(),
65+
warp.getWarpLocation().getZ()
66+
);
67+
warpDistanceMap.put(distance3D, warp);
68+
Logger.logDebugInfo("Warp Distance: " + distance3D + " Warp Name: " + warp.getWarpName() + ", Warp World: " + warp.getWarpLocation().getWorld());
69+
}
70+
);
7171
for (Map.Entry<Double, Warp> doubleWarpEntry : warpDistanceMap.entrySet()) {
7272
Double distance3D = doubleWarpEntry.getKey();
7373
Warp warp = doubleWarpEntry.getValue();

0 commit comments

Comments
 (0)