-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maintain all not synchronized ranks when the ranks get updated
based on Safiro's comment https://www.spigotmc.org/resources/ranksync.61393/reviews#review-269706-89164
- Loading branch information
1 parent
1fc90cc
commit 5a7bf1f
Showing
6 changed files
with
106 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
api/src/main/java/com/gmail/chickenpowerrr/ranksync/api/rank/RankHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.gmail.chickenpowerrr.ranksync.api.rank; | ||
|
||
import com.gmail.chickenpowerrr.ranksync.api.bot.Bot; | ||
|
||
/** | ||
* This interface contains the methods needed to validate all given ranks | ||
* | ||
* @author Chickenpowerrr | ||
* @since 1.2.1 | ||
*/ | ||
public interface RankHelper { | ||
|
||
/** | ||
* Returns if the given rank has been synchronized over the platforms | ||
* | ||
* @param bot the bot that could synchronize the rank | ||
* @param rank the rank that could be synchronized | ||
* @return if the given rank has been synchronized over the platforms | ||
*/ | ||
boolean isSynchronized(Bot bot, Rank rank); | ||
|
||
/** | ||
* Returns a Rank based on the Bot that is able to give to users and the name of the service's | ||
* Rank | ||
* | ||
* @param bot the running Bot | ||
* @param serviceGroupName the name of the Minecraft Rank | ||
* @return a Rank based on the Bot that is able to give to users and the name of the Rank | ||
*/ | ||
Rank getRank(Bot bot, String serviceGroupName); | ||
|
||
/** | ||
* Validates all cached ranks and if they don't exist in the given Bot or service, a message will | ||
* be send to the console | ||
*/ | ||
void validateRanks(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters