Medicine revival&Login white screen (#1883)

* Update InventorySystem.java

-:[fix] Medicine revival

* Update GameMainQuest.java

-:[fix] Login white screen
This commit is contained in:
jacky14
2022-10-22 14:21:33 +08:00
committed by GitHub
parent c51f7610b2
commit ccf182d692
2 changed files with 2 additions and 2 deletions

View File

@@ -778,7 +778,7 @@ public class InventorySystem extends BaseGameSystem {
}
int[] satiationParams = itemData.getSatiationParams();
if (satiationParams != null && target.isPresent()) {
if (satiationParams != null && satiationParams.length > 0 && target.isPresent()) {
// Invoke and call player use food event.
var event = new PlayerUseFoodEvent(params.player, itemData, params.targetAvatar.getAsEntity()); event.call();
if (event.isCanceled()) return false;