mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
Optimize code
Former-commit-id: a804f43920436cbce88f170af37ed77a3a71f3ef [formerly 544bb3795e922e2129440dc47e752e2b03693116] Former-commit-id: 2e3013ec7039c7a6ca26e4a2764bf6bc27646cf9
This commit is contained in:
1 parent
0e4e46d9d7
commit
7096eb92f7
1 file changed
+7
-5
@@ -22,8 +22,9 @@ public class ShopModerator {
|
||||
Gson gson = new Gson();
|
||||
return gson.toJson(shopModerator); //Use Gson serialize this class
|
||||
}
|
||||
private UUID owner;
|
||||
private ArrayList<UUID> staffs;
|
||||
|
||||
@NonNull private UUID owner;
|
||||
@NonNull private ArrayList<UUID> staffs;
|
||||
|
||||
private ShopModerator(@NotNull ShopModerator shopModerator) {
|
||||
this.owner = shopModerator.owner;
|
||||
@@ -37,7 +38,7 @@ public class ShopModerator {
|
||||
*/
|
||||
public ShopModerator(@NotNull UUID owner) {
|
||||
this.owner = owner;
|
||||
this.staffs = new ArrayList<UUID>();
|
||||
this.staffs = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,7 +48,7 @@ public class ShopModerator {
|
||||
*/
|
||||
public ShopModerator(@NotNull UUID owner, @NotNull ArrayList<UUID> staffs) {
|
||||
this.owner = owner;
|
||||
this.staffs = new ArrayList<UUID>();
|
||||
this.staffs = new ArrayList<>();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,8 +70,9 @@ public class ShopModerator {
|
||||
staffs.clear();
|
||||
}
|
||||
|
||||
@SuppressWarnings("MethodDoesntCallSuperMethod")
|
||||
public ShopModerator clone() {
|
||||
return new ShopModerator(this);
|
||||
return new ShopModerator(this.owner, this.staffs);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user