Skip to content

Commit

Permalink
GroupDataをPlayer形からOfflinePlayerに
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisa9006 committed Dec 11, 2024
1 parent 4985e67 commit da15479
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/dev/felnull/Data/GroupData.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package dev.felnull.Data;

import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

Expand All @@ -10,13 +11,13 @@

public class GroupData {
public final String groupName; //グループ名 プレイヤー個人の場合はプレイヤーUUID
public Set<Player> playerList; //グループ所属のプレイヤーリスト 最低1つは格納されるはず
public Map<Player,String[]> playerPermission; //プレイヤーが保持している役職
public Set<OfflinePlayer> playerList; //グループ所属のプレイヤーリスト 最低1つは格納されるはず
public Map<OfflinePlayer,String[]> playerPermission; //プレイヤーが保持している役職
public boolean isPrivate; //個人用グループか否か
public StorageData storageData; //グループ保有のストレージデータ null許容
public String ownerPlugin;

public GroupData (@NotNull String groupName,@NotNull Set<Player> playerList,@NotNull Map<Player,String[]> playerPermission, boolean isPrivate, StorageData storageData, String ownerPlugin) {
public GroupData (@NotNull String groupName,@NotNull Set<OfflinePlayer> playerList,@NotNull Map<OfflinePlayer,String[]> playerPermission, boolean isPrivate, StorageData storageData, String ownerPlugin) {
this.groupName = groupName;
this.playerList = playerList;
this.playerPermission = playerPermission;
Expand All @@ -27,7 +28,7 @@ public GroupData (@NotNull String groupName,@NotNull Set<Player> playerList,@Not
this.ownerPlugin = ownerPlugin;
}

public GroupData (@NotNull Player player, StorageData storageData, String ownerPlugin) {
public GroupData (@NotNull OfflinePlayer player, StorageData storageData, String ownerPlugin) {

this.groupName = player.getUniqueId().toString();
//引数で得たプレイヤーをメンバに追加してowner権限を付与する
Expand Down

0 comments on commit da15479

Please sign in to comment.