RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
VotePointCurrency.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
VotePointCurrency
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.votePoints >= amount) {
40
player.votePoints -= amount;
41
return
true
;
42
}
else
{
43
player.send(
new
SendMessage
(
"You do not have enough vote points."
));
44
return
false
;
45
}
46
}
47
48
@Override
49
public
void
recieveCurrency
(
Player
player,
int
amount) {
50
player.votePoints += amount;
51
}
52
53
@Override
54
public
int
currencyAmount
(
Player
player) {
55
return
player.votePoints;
56
}
57
58
@Override
59
public
boolean
canRecieveCurrency
(
Player
player) {
60
return
true
;
61
}
62
}
com.osroyale.content.store.currency.impl.VotePointCurrency
Definition
VotePointCurrency.java:30
com.osroyale.content.store.currency.impl.VotePointCurrency.currencyAmount
int currencyAmount(Player player)
Definition
VotePointCurrency.java:54
com.osroyale.content.store.currency.impl.VotePointCurrency.takeCurrency
boolean takeCurrency(Player player, int amount)
Definition
VotePointCurrency.java:38
com.osroyale.content.store.currency.impl.VotePointCurrency.recieveCurrency
void recieveCurrency(Player player, int amount)
Definition
VotePointCurrency.java:49
com.osroyale.content.store.currency.impl.VotePointCurrency.tangible
boolean tangible()
Definition
VotePointCurrency.java:33
com.osroyale.content.store.currency.impl.VotePointCurrency.canRecieveCurrency
boolean canRecieveCurrency(Player player)
Definition
VotePointCurrency.java:59
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