mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-02-16 19:51:27 +01:00
Small internal code change for CustomCrops compatibility
This commit is contained in:
parent
cc27a5744c
commit
a75a4eae2d
@ -255,18 +255,22 @@ public class Island {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The IslandRole of a player
|
||||
* @return The IslandRole of a player or Visitor if not found
|
||||
*/
|
||||
public IslandRole getRole(OfflinePlayer player) {
|
||||
Preconditions.checkArgument(player != null, "Cannot get role for null player");
|
||||
|
||||
if (isCoopPlayer(player.getUniqueId())) {
|
||||
return IslandRole.COOP;
|
||||
}
|
||||
|
||||
for (com.craftaro.skyblock.island.IslandRole role : com.craftaro.skyblock.island.IslandRole.values()) {
|
||||
if (this.handle.hasRole(role, player.getUniqueId())) {
|
||||
return APIUtil.fromImplementation(role);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return IslandRole.VISITOR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user