Mineplex2018-withcommit/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/stats/StatTracker.java

33 lines
582 B
Java
Raw Normal View History

2014-08-18 22:41:16 +02:00
package nautilus.game.arcade.stats;
import org.bukkit.entity.Player;
import org.bukkit.event.Listener;
import nautilus.game.arcade.game.Game;
2014-08-18 22:41:16 +02:00
public class StatTracker<G extends Game> implements Listener
{
private final G game;
public StatTracker(G game)
{
this.game = game;
}
public G getGame()
{
return game;
}
public boolean canAddStats()
{
return getGame().CanAddStats;
}
public void addStat(Player player, String stat, int value, boolean limitTo1, boolean global)
{
if (canAddStats())
getGame().AddStat(player, stat, value, limitTo1, global);
}
2014-08-18 22:41:16 +02:00
}