mirror of
https://github.com/Xiao-MoMi/Custom-Fishing.git
synced 2025-12-29 03:49:07 +00:00
lock improvements
This commit is contained in:
@@ -33,7 +33,7 @@ public interface DataStorageInterface {
|
||||
|
||||
CompletableFuture<Optional<PlayerData>> getPlayerData(UUID uuid, boolean force);
|
||||
|
||||
CompletableFuture<Boolean> setPlayerData(UUID uuid, PlayerData playerData, boolean unlock);
|
||||
CompletableFuture<Boolean> savePlayerData(UUID uuid, PlayerData playerData, boolean unlock);
|
||||
|
||||
void setPlayersData(Collection<OnlineUser> users, boolean unlock);
|
||||
void saveOnlinePlayersData(Collection<OnlineUser> users, boolean unlock);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PlayerData {
|
||||
@SerializedName("trade")
|
||||
protected EarningData earningData;
|
||||
|
||||
public static PlayerData NEVER_PLAYED = empty();
|
||||
public static PlayerData LOCKED = empty();
|
||||
|
||||
public static PlayerData empty() {
|
||||
return new Builder()
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
package net.momirealms.customfishing.api.manager;
|
||||
|
||||
import net.momirealms.customfishing.api.data.user.OfflineUser;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
|
||||
import java.util.UUID;
|
||||
@@ -25,4 +27,6 @@ public interface BagManager {
|
||||
boolean isBagEnabled();
|
||||
|
||||
Inventory getOnlineBagInventory(UUID uuid);
|
||||
|
||||
void editOfflinePlayerBag(Player admin, OfflineUser userData);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,8 @@ public interface StorageManager {
|
||||
*/
|
||||
CompletableFuture<Optional<OfflineUser>> getOfflineUser(UUID uuid, boolean force);
|
||||
|
||||
CompletableFuture<Boolean> saveUserData(OfflineUser offlineUser, boolean unlock);
|
||||
|
||||
/**
|
||||
* Get all the players in servers that connected to the same redis server
|
||||
* @return amount
|
||||
|
||||
Reference in New Issue
Block a user