This repository was archived by the owner on Feb 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/mstiles92/plugins/bookrules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,6 +278,9 @@ public void edit(Arguments args) {
278278
279279 if (book == null ) {
280280 args .getSender ().sendMessage (Strings .PLUGIN_TAG + ChatColor .RED + Localization .getString (Strings .BOOK_NOT_FOUND ));
281+ } else if (!book .checkPermission (args .getPlayer ())) {
282+ //TODO: refactor into localization system
283+ args .getSender ().sendMessage (Strings .PLUGIN_TAG + ChatColor .RED + "You do not have permission to edit this book!" );
281284 } else {
282285 book .giveToPlayer (args .getPlayer (), true );
283286 //TODO: refactor into localization system
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public void onPlayerEditBook(PlayerEditBookEvent event) {
9898
9999 if (!event .getPlayer ().hasPermission ("bookrules.edit.book" )) {
100100 //TODO: refactor into localization system
101- event .getPlayer ().sendMessage (Strings .PLUGIN_TAG + ChatColor .RED + "You do not have permission to edit this book!" );;
101+ event .getPlayer ().sendMessage (Strings .PLUGIN_TAG + ChatColor .RED + "You do not have permission to edit this book!" );
102102 return ;
103103 }
104104
You can’t perform that action at this time.
0 commit comments