RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
PestPointCurrency.java
1package com.osroyale.content.store.currency.impl;
2
3import com.osroyale.content.store.currency.Currency;
4import com.osroyale.game.world.entity.mob.player.Player;
5import com.osroyale.net.packet.out.SendMessage;
6
29
30public final class PestPointCurrency implements Currency {
31
32 @Override
33 public boolean tangible() {
34 return false;
35 }
36
37 @Override
38 public boolean takeCurrency(Player player, int amount) {
39 if (player.pestPoints >= amount) {
40 player.pestPoints -= amount;
41 return true;
42 } else {
43 player.send(new SendMessage("You do not have enough pest control points."));
44 return false;
45 }
46 }
47
48 @Override
49 public void recieveCurrency(Player player, int amount) {
50 player.pestPoints += amount;
51 }
52
53 @Override
54 public int currencyAmount(Player player) {
55 return player.pestPoints;
56 }
57
58 @Override
59 public boolean canRecieveCurrency(Player player) {
60 return true;
61 }
62}