Skip to content

Commit

Permalink
Merge pull request #2 from AzisabaNetwork/master
Browse files Browse the repository at this point in the history
つけ忘れてたownerplugin追加とお金をdoubleに
  • Loading branch information
aburaagetarou authored Dec 10, 2024
2 parents 826241a + 4985e67 commit a2329bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/main/java/dev/felnull/Data/GroupData.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ public class GroupData {
public Map<Player,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) {
public GroupData (@NotNull String groupName,@NotNull Set<Player> playerList,@NotNull Map<Player,String[]> playerPermission, boolean isPrivate, StorageData storageData, String ownerPlugin) {
this.groupName = groupName;
this.playerList = playerList;
this.playerPermission = playerPermission;
this.isPrivate = isPrivate;
storageData.groupName = groupName;
storageData.groupData = this;
this.storageData = storageData;
this.ownerPlugin = ownerPlugin;
}

public GroupData (@NotNull Player player, StorageData storageData) {
this.groupName = player.getUniqueId().toString();
public GroupData (@NotNull Player player, StorageData storageData, String ownerPlugin) {

this.groupName = player.getUniqueId().toString();
//引数で得たプレイヤーをメンバに追加してowner権限を付与する
playerList = new HashSet<>();
playerPermission = new HashMap<>();
Expand All @@ -40,6 +42,7 @@ public GroupData (@NotNull Player player, StorageData storageData) {
storageData.groupName = groupName;
storageData.groupData = this;
this.storageData = storageData;
this.ownerPlugin = ownerPlugin;
}

}
4 changes: 2 additions & 2 deletions src/main/java/dev/felnull/Data/StorageData.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ public class StorageData {
public String groupName;//グループ名(個人プレイヤーもグループ扱い)
public GroupData groupData;//ストレージの所属グループ
public final Set<String> requireBankPermission;//ストレージ直下の金庫の要求パーミッション(BukkitPermではない)
public int bankMoney;//ストレージ付属金庫の値
public double bankMoney;//ストレージ付属金庫の値
@NotNull
public Map<String,InventoryData> storageInventory;//ストレージに含まれているインベントリデータ キーのStringはページ名

public StorageData(@NotNull Set<String> requireBankPermission, Map<String,InventoryData> storageInventory, int bankMoney) {
public StorageData(@NotNull Set<String> requireBankPermission, Map<String,InventoryData> storageInventory, double bankMoney) {
this.requireBankPermission = requireBankPermission;
if(storageInventory == null){
storageInventory = new HashMap<>();
Expand Down

0 comments on commit a2329bc

Please sign in to comment.