Skip to content

Commit

Permalink
Merge pull request #114 from WaterArchery/main
Browse files Browse the repository at this point in the history
Fix for latest Lands version
  • Loading branch information
poyrazinan authored Dec 9, 2024
2 parents 6bccc62 + 22361dc commit b02ed86
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<dependency>
<groupId>com.github.angeschossen</groupId>
<artifactId>LandsAPI</artifactId>
<version>7.1.12</version>
<version>7.10.6</version>
<scope>provided</scope>
</dependency>
<!-- WildStacker -->
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/xyz/geik/farmer/commands/FarmerCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ public void removeCommand(CommandSender sender) {
}
Player player = (Player) sender;
String regionID = getRegionID(player);
if (regionID == null)
if (regionID == null) {
ChatUtils.sendMessage(player, Main.getLangFile().getMessages().getNoRegion());
return;
}

UUID ownerUUID = Main.getIntegration().getOwnerUUID(regionID);
// Custom perm check for remove command
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/xyz/geik/farmer/integrations/lands/Lands.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public Lands() {
@Override
public UUID getOwnerUUID(String regionID) {
ULID ulid = ULID.fromString(regionID);
return api.getLandByULID(ulid).getOwnerUID();
Land land = api.getLandByULID(ulid);
return land == null ? null : land.getOwnerUID();
}

/**
Expand Down

0 comments on commit b02ed86

Please sign in to comment.