Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jul 7, 2022
1 parent 9c62824 commit 91fcf3f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ public void handle(@NotNull PacketSender sender, @NotNull ProxyboundGiveSaraMess
if (user == null || user.getUsername() == null) {
throw new IllegalArgumentException("User " + msg.getPlayer().getUniqueId() + " could not be found in the LuckPerms database.");
}
String groupName = msg.getAmount() + "sara";
String groupName = msg.getAmount() + "yen";
Track track = api.getTrackManager().createAndLoadTrack("sara").join();
if (!track.containsGroup(groupName)) {
throw new IllegalArgumentException("Group is not in a track: " + groupName);
}
String username = user.getUsername();
boolean modified = false;
NodeMap map = user.getData(DataType.NORMAL);
Node nodeSara = LuckPermsUtil.findParentNode(map, msg.getAmount() + "yen", null);
Node nodeSara = LuckPermsUtil.findParentNode(map, groupName, null);
if (nodeSara == null) {
LuckPermsUtil.addGroup(map, msg.getAmount() + "yen", null, -1);
LuckPermsUtil.addGroup(map, groupName, null, -1);
modified = true;
}
if (!modified) {
Expand All @@ -61,7 +61,7 @@ public void handle(@NotNull PacketSender sender, @NotNull ProxyboundGiveSaraMess
.sourceName("AziPluginMessaging@" + api.getServerName())
.target(msg.getPlayer().getUniqueId())
.targetName(username)
.description("Added " + msg.getAmount() + "yen sara to " + username)
.description("Added " + groupName + " sara to " + username)
.build());
}
}

0 comments on commit 91fcf3f

Please sign in to comment.