Skip to content

Commit

Permalink
Update PluginPropertyMapping.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AshlyneS committed Nov 21, 2023
1 parent 1770fb1 commit 0dd4677
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/net/foxgenesis/watame/property/PluginPropertyMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ public Role getAsRole() {
return getGuild().getRoleById(getAsLong());
}

public Role[] getAsRoleArray() {
long[] arr = getAsLongArray();
Role[] out = new Role[arr.length];
for (int i = 0; i < arr.length; i++)
out[i] = getGuild().getRoleById(arr[i]);
return out;
}

@Nullable
public GuildMessageChannel getAsMessageChannel() {
return getGuild().getChannelById(GuildMessageChannel.class, getAsLong());
Expand Down

0 comments on commit 0dd4677

Please sign in to comment.