Skip to content

Commit

Permalink
reload player regions
Browse files Browse the repository at this point in the history
  • Loading branch information
nomadjimbob committed Jul 4, 2024
1 parent edd6508 commit 118c3ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/com/stemcraft/SMRegion.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,15 @@ public static boolean updatePlayerRegions(Player player) {
return updatePlayerRegions(player, player.getLocation());
}

/**
* Reload the regions players are inside. This will adjust any flags
*/
public static void reloadPlayerRegions() {
for(Player player : Bukkit.getOnlinePlayers()) {
playerRegionList.put(player, findRegions(player.getLocation()));
}
}

/**
* Sort the passed list by priority
* @param list The list to sort
Expand Down

0 comments on commit 118c3ff

Please sign in to comment.