From 4985e67e8d2f0e5b8dbc2eca37272214f052c61c Mon Sep 17 00:00:00 2001 From: Arisa9006 <57523862+Arisa9006@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:35:56 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=A4=E3=81=91=E5=BF=98=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=9Fownerplugin=E8=BF=BD=E5=8A=A0=E3=81=A8=E3=81=8A?= =?UTF-8?q?=E9=87=91=E3=82=92double=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/dev/felnull/Data/GroupData.java | 9 ++++++--- src/main/java/dev/felnull/Data/StorageData.java | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main/java/dev/felnull/Data/GroupData.java b/src/main/java/dev/felnull/Data/GroupData.java index 339ca23..85759ab 100644 --- a/src/main/java/dev/felnull/Data/GroupData.java +++ b/src/main/java/dev/felnull/Data/GroupData.java @@ -14,8 +14,9 @@ public class GroupData { public Map playerPermission; //プレイヤーが保持している役職 public boolean isPrivate; //個人用グループか否か public StorageData storageData; //グループ保有のストレージデータ null許容 + public String ownerPlugin; - public GroupData (@NotNull String groupName,@NotNull Set playerList,@NotNull Map playerPermission, boolean isPrivate, StorageData storageData) { + public GroupData (@NotNull String groupName,@NotNull Set playerList,@NotNull Map playerPermission, boolean isPrivate, StorageData storageData, String ownerPlugin) { this.groupName = groupName; this.playerList = playerList; this.playerPermission = playerPermission; @@ -23,11 +24,12 @@ public GroupData (@NotNull String groupName,@NotNull Set playerList,@Not 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<>(); @@ -40,6 +42,7 @@ public GroupData (@NotNull Player player, StorageData storageData) { storageData.groupName = groupName; storageData.groupData = this; this.storageData = storageData; + this.ownerPlugin = ownerPlugin; } } diff --git a/src/main/java/dev/felnull/Data/StorageData.java b/src/main/java/dev/felnull/Data/StorageData.java index e1bd17a..a6f5e64 100644 --- a/src/main/java/dev/felnull/Data/StorageData.java +++ b/src/main/java/dev/felnull/Data/StorageData.java @@ -10,11 +10,11 @@ public class StorageData { public String groupName;//グループ名(個人プレイヤーもグループ扱い) public GroupData groupData;//ストレージの所属グループ public final Set requireBankPermission;//ストレージ直下の金庫の要求パーミッション(BukkitPermではない) - public int bankMoney;//ストレージ付属金庫の値 + public double bankMoney;//ストレージ付属金庫の値 @NotNull public Map storageInventory;//ストレージに含まれているインベントリデータ キーのStringはページ名 - public StorageData(@NotNull Set requireBankPermission, Map storageInventory, int bankMoney) { + public StorageData(@NotNull Set requireBankPermission, Map storageInventory, double bankMoney) { this.requireBankPermission = requireBankPermission; if(storageInventory == null){ storageInventory = new HashMap<>();