RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
PrestigePointCurrency.java
1
package
com.osroyale.content.store.currency.impl;
2
3
import
com.osroyale.content.store.currency.Currency;
4
import
com.osroyale.game.world.entity.mob.player.Player;
5
import
com.osroyale.net.packet.out.SendMessage;
6
29
30
public
final
class
PrestigePointCurrency
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.prestige.getPrestigePoint() >= amount) {
40
player.prestige.setPrestigePoint(player.prestige.getPrestigePoint() - amount);
41
return
true
;
42
}
else
{
43
player.send(
new
SendMessage
(
"You do not have enough prestige points."
));
44
return
false
;
45
}
46
}
47
48
@Override
49
public
void
recieveCurrency
(
Player
player,
int
amount) {
50
player.prestige.setPrestigePoint(player.prestige.getPrestigePoint() + amount);
51
}
52
53
@Override
54
public
int
currencyAmount
(
Player
player) {
55
return
player.prestige.getPrestigePoint();
56
}
57
58
@Override
59
public
boolean
canRecieveCurrency
(
Player
player) {
60
return
true
;
61
}
62
}
com.osroyale.content.store.currency.impl.PrestigePointCurrency
Definition
PrestigePointCurrency.java:30
com.osroyale.content.store.currency.impl.PrestigePointCurrency.canRecieveCurrency
boolean canRecieveCurrency(Player player)
Definition
PrestigePointCurrency.java:59
com.osroyale.content.store.currency.impl.PrestigePointCurrency.currencyAmount
int currencyAmount(Player player)
Definition
PrestigePointCurrency.java:54
com.osroyale.content.store.currency.impl.PrestigePointCurrency.takeCurrency
boolean takeCurrency(Player player, int amount)
Definition
PrestigePointCurrency.java:38
com.osroyale.content.store.currency.impl.PrestigePointCurrency.recieveCurrency
void recieveCurrency(Player player, int amount)
Definition
PrestigePointCurrency.java:49
com.osroyale.content.store.currency.impl.PrestigePointCurrency.tangible
boolean tangible()
Definition
PrestigePointCurrency.java:33
com.osroyale.game.world.entity.mob.player.Player
Definition
Player.java:162
com.osroyale.net.packet.out.SendMessage
Definition
SendMessage.java:38
com.osroyale.content.store.currency.Currency
Definition
Currency.java:11