Skip to content

Commit

Permalink
Altered CardCommand.java
Browse files Browse the repository at this point in the history
  • Loading branch information
dmccoystephenson committed Sep 28, 2021
1 parent 4a086c2 commit f76b85c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/java/dansplugins/rpsystem/commands/CardCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,8 @@ public void showCard(CommandSender sender, String[] args) {
Player player = (Player) sender;

if (player.hasPermission("rp.card.show") || player.hasPermission("rp.card.*") || player.hasPermission("rp.default")) {
for (CharacterCard card : PersistentData.getInstance().getCards()) {
if (card.getPlayerUUID() != null) {
if (card.getPlayerUUID().equals(player.getUniqueId())) {
Messenger.getInstance().sendCardInfoToPlayer(card, player);
return;
}
}
}
CharacterCard card = CardLookupService.getInstance().lookup(player.getUniqueId());
Messenger.getInstance().sendCardInfoToPlayer(card, player);
}
else {
player.sendMessage(ColorChecker.getInstance().getNegativeAlertColor() + "Sorry! In order to use this command, you need the following permission: 'rp.card.show'");
Expand Down

0 comments on commit f76b85c

Please sign in to comment.