1
mirror of https://github.com/CarmJos/UltraDepository.git synced 2024-09-19 19:55:45 +00:00

[v1.1.8] [U] 添加安静模式下不收到提示。

This commit is contained in:
Carm Jos 2022-01-05 23:54:28 +08:00
parent 27ad14c7ab
commit fcdda893f1
3 changed files with 13 additions and 5 deletions

View File

@ -176,6 +176,9 @@
# UltraDepository.use # UltraDepository.use
- 超级仓库的基本使用权限 (默认所有人都有) - 超级仓库的基本使用权限 (默认所有人都有)
# UltraDepository.silent
- 拥有该权限将不再接收到放入背包的提示。
# UltraDepository.Command.Sell # UltraDepository.Command.Sell
- 玩家使用Sell指令的权限 - 玩家使用Sell指令的权限

View File

@ -165,11 +165,13 @@ public class DepositoryManager {
int finalAmount = collectItemEvent.getItemAmount(); int finalAmount = collectItemEvent.getItemAmount();
collectItemEvent.getUserData().addItemAmount(depository.getIdentifier(), typeID, finalAmount); collectItemEvent.getUserData().addItemAmount(depository.getIdentifier(), typeID, finalAmount);
PluginMessages.COLLECTED.send(player, new Object[]{ if (!player.hasPermission("UltraDepository.silent")) {
depository.getItems().get(typeID).getName(), PluginMessages.COLLECTED.send(player, new Object[]{
finalAmount, depository.getName() depository.getItems().get(typeID).getName(),
}); finalAmount, depository.getName()
PluginConfig.Sounds.COLLECT.play(player); });
PluginConfig.Sounds.COLLECT.play(player);
}
UltraDepository.getInstance().debug("Item collected successfully."); UltraDepository.getInstance().debug("Item collected successfully.");
return true; return true;
} }

View File

@ -30,6 +30,9 @@ permissions:
description: "超级仓库的基本使用权限" description: "超级仓库的基本使用权限"
default: true default: true
"UltraDepository.silent":
description: "超级仓库的安静模式权限,拥有该权限将不再接收到放入背包的提示。"
"UltraDepository.auto": "UltraDepository.auto":
description: "超级仓库的自动收集权限" description: "超级仓库的自动收集权限"
default: op default: op