Skip to content

Commit 9ef07aa

Browse files
tastybentoclaude
andcommitted
Fix compilation error in PhManager.getLatestTransaction
A prior automated edit inlined the fully-qualified name world.bentobox.bentobox.util.Util.getWorld(world), but the method parameter `world` shadowed the package root, so the compiler parsed `world.bentobox` as field access on the World variable and failed with "cannot find symbol variable bentobox". Revert to the original direct island lookup via getIsland(world, user), which is what the getLatestTransaction tests expect. This fixes the Jenkins compile failure and the 4 PhManagerTest errors (and their cascading "Already mocking" failures) the broken Util call caused. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 472a8e0 commit 9ef07aa

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/main/java/world/bentobox/bank/PhManager.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,8 @@ String getVisitedIslandBalance(GameModeAddon gm, User user, boolean formatted, b
125125
* @return formatted latest transaction string, e.g., "tastybento Deposited $500.0", or empty string if none
126126
*/
127127
String getLatestTransaction(User user, World world) {
128-
if (user == null || !user.isPlayer()) return "";
129-
World actualWorld = world == null ? null : world.bentobox.bentobox.util.Util.getWorld(world);
130-
if (actualWorld == null) return "";
131-
Island island = addon.getIslands().getIsland(actualWorld, user);
128+
if (user == null || !user.isPlayer() || world == null) return "";
129+
Island island = addon.getIslands().getIsland(world, user);
132130
if (island == null) return "";
133131
return formatTransaction(bankManager.getLatestHistory(island));
134132
}

0 commit comments

Comments
 (0)