Skip to content

Commit

Permalink
Only send data perm message if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
DSH105 committed Dec 4, 2013
1 parent e8fa8af commit e694ac2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ public static boolean hasDataPerm(Player player, boolean sendMessage, PetType pe
String dataPerm = "echopet.pet.type." + petType.toString().toLowerCase() + "." + petData.getConfigOptionString().toLowerCase();
boolean hdp = player.hasPermission(dataPerm) || player.hasPermission("echopet.pet.type." + petType.toString().toLowerCase() + ".*") || player.hasPermission("echopet.pet.*") || player.hasPermission("echopet.*");
if (!hdp) {
Lang.sendTo(player, Lang.NO_PERMISSION.toString().replace("%perm%", dataPerm));
if (sendMessage) {
Lang.sendTo(player, Lang.NO_PERMISSION.toString().replace("%perm%", dataPerm));
}
return false;
}

Expand Down

0 comments on commit e694ac2

Please sign in to comment.