SSM Hunger Fix
This commit is contained in:
parent
07d9610bf7
commit
630281c663
|
@ -342,7 +342,7 @@ public class SuperSmash extends SoloGame
|
|||
if (!IsLive())
|
||||
return;
|
||||
|
||||
hungerTick = (hungerTick + 1)%8;
|
||||
hungerTick = (hungerTick + 1)%10;
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
|
@ -363,10 +363,11 @@ public class SuperSmash extends SoloGame
|
|||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
public void HungerRestore(CustomDamageEvent event)
|
||||
{
|
||||
|
||||
if (event.IsCancelled())
|
||||
return;
|
||||
|
||||
if (event.GetDamagerPlayer(true) != null)
|
||||
if (event.GetDamagerPlayer(true) == null)
|
||||
return;
|
||||
|
||||
Player damager = event.GetDamagerPlayer(true);
|
||||
|
@ -379,5 +380,4 @@ public class SuperSmash extends SoloGame
|
|||
int amount = Math.max(1, (int)(event.GetDamage()/2));
|
||||
UtilPlayer.hunger(damager, amount);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue