mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Send some extra data to the editor data object
This commit is contained in:
parent
8faa4d137b
commit
bf7a708440
@ -85,8 +85,11 @@ public class HolderEditor<T extends PermissionHolder> extends SubCommand<T> {
|
|||||||
|
|
||||||
JsonObject data = new JsonObject();
|
JsonObject data = new JsonObject();
|
||||||
Set<NodeModel> nodes = holder.getEnduringNodes().values().stream().map(NodeModel::fromNode).collect(Collectors.toCollection(LinkedHashSet::new));
|
Set<NodeModel> nodes = holder.getEnduringNodes().values().stream().map(NodeModel::fromNode).collect(Collectors.toCollection(LinkedHashSet::new));
|
||||||
data.add("nodes", serializePermissions(nodes));
|
|
||||||
data.addProperty("who", id(holder));
|
data.addProperty("who", id(holder));
|
||||||
|
data.addProperty("cmdAlias", label);
|
||||||
|
data.addProperty("uploadedBy", sender.getName());
|
||||||
|
data.addProperty("time", System.currentTimeMillis());
|
||||||
|
data.add("nodes", serializePermissions(nodes));
|
||||||
|
|
||||||
String dataUrl = paste(new GsonBuilder().setPrettyPrinting().create().toJson(data));
|
String dataUrl = paste(new GsonBuilder().setPrettyPrinting().create().toJson(data));
|
||||||
if (dataUrl == null) {
|
if (dataUrl == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user