Fix BanList API

This commit is contained in:
Jake Potrebic
2023-07-04 11:27:18 -07:00
parent 3a91b864bb
commit 1ce71b513e
4 changed files with 51 additions and 11 deletions

View File

@@ -147,7 +147,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* (updated) previous ban
*/
@Nullable
public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Date expires, @Nullable String source);
public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Date expires, @Nullable String source); // Paper - fix ban list API
/**
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
@@ -161,7 +161,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* (updated) previous ban
*/
@Nullable
public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source);
public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Instant expires, @Nullable String source); // Paper - fix ban list API
/**
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
@@ -175,7 +175,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
* (updated) previous ban
*/
@Nullable
public BanEntry<PlayerProfile> ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source);
public <E extends BanEntry<? super com.destroystokyo.paper.profile.PlayerProfile>> E ban(@Nullable String reason, @Nullable Duration duration, @Nullable String source); // Paper - fix ban list API
/**
* Checks if this player is whitelisted or not