-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathViewPoints.java
More file actions
21 lines (19 loc) · 908 Bytes
/
ViewPoints.java
File metadata and controls
21 lines (19 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package parallelmc.parallelutils.modules.points.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import parallelmc.parallelutils.modules.parallelchat.ParallelChat;
import parallelmc.parallelutils.modules.points.Points;
public class ViewPoints implements CommandExecutor {
@Override
public boolean onCommand(@NotNull CommandSender commandSender, @NotNull Command command, @NotNull String label, @NotNull String[] args) {
if (commandSender instanceof Player player) {
int points = Points.get().getPlayerPoints(player);
ParallelChat.sendParallelMessageTo(player,
"You currently have " + points + " advancement " + ((points == 1) ? "point!" : "points!"));
}
return true;
}
}