Skip to content

Commit 537f8aa

Browse files
committed
Rename ban methods
1 parent 3cdf000 commit 537f8aa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/org/spongepowered/api/service/ban/Ban.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ static Ban of(GameProfile profile, Component reason) {
8989
* Gets the creation date of the ban.
9090
*
9191
* <p>Note that this {@link Instant} has no effect on whether or not a ban is
92-
* active. Any ban returned by {@link BanService#banFor(GameProfile)}
92+
* active. Any ban returned by {@link BanService#find(GameProfile)}
9393
* will be used (when checking if a player can join, for example),
9494
* regardless of its creation date.</p>
9595
*

src/main/java/org/spongepowered/api/service/ban/BanService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ public interface BanService {
7070
* @param profile The profile
7171
* @return The ban, if available
7272
*/
73-
CompletableFuture<Optional<Ban.Profile>> banFor(GameProfile profile);
73+
CompletableFuture<Optional<Ban.Profile>> find(GameProfile profile);
7474

7575
/**
7676
* Gets the ban for the given address, if available.
7777
*
7878
* @param address The address.
7979
* @return All registered IP bans
8080
*/
81-
CompletableFuture<Optional<Ban.IP>> banFor(InetAddress address);
81+
CompletableFuture<Optional<Ban.IP>> find(InetAddress address);
8282

8383
/**
8484
* Pardons a profile, or removes its ban, if present.
@@ -102,7 +102,7 @@ public interface BanService {
102102
* @param ban The ban
103103
* @return Whether the ban was present in this ban service
104104
*/
105-
CompletableFuture<Boolean> removeBan(Ban ban);
105+
CompletableFuture<Boolean> remove(Ban ban);
106106

107107
/**
108108
* Adds a ban.
@@ -113,6 +113,6 @@ public interface BanService {
113113
* @param ban The ban to add to this ban service
114114
* @return The previous ban, if available
115115
*/
116-
CompletableFuture<Optional<? extends Ban>> addBan(Ban ban);
116+
CompletableFuture<Optional<? extends Ban>> add(Ban ban);
117117

118118
}

0 commit comments

Comments
 (0)