Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
may fix something
Browse files Browse the repository at this point in the history
  • Loading branch information
Librazy committed Mar 27, 2019
1 parent 205b2f5 commit 19703e1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ void onInventoryClick(InventoryClickEvent event) {
if (!player.equals(opener)) {
player.closeInventory();
event.setCancelled(true);
tainted.set(false);
return;
}
if (!player.equals(opened.get(owner))){
player.closeInventory();
event.setCancelled(true);
tainted.set(false);
new Message(I18n.format("user.backpack.error_closed")).send(player);
return;
}
Inventory inventory = event.getInventory();
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/en_US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ user:
disabled: Current backpack is disabled
n_lines: 'Backpack of %s set to %d lines'
no_required_blocks: 'There are no {block} in %d blocks'
error_closed: 'Your backpack is already closed!'
manual:
help:
description: Show help message
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/zh_CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ user:
disabled: 当前背包已被禁用
n_lines: '%s 的背包设为 %d 行'
no_required_blocks: '%d格范围内没有{block}'
error_closed: '你已经关上了背包!'
manual:
help:
description: 显示帮助信息
Expand Down

1 comment on commit 19703e1

@RecursiveG
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do tests and make sure that it does fix something.
If you don't know whether the problem is fixed, don't commit the code.

Please sign in to comment.