give players a clock

This commit is contained in:
Xander 2024-09-23 10:02:51 +02:00
parent 7d534bb73a
commit c6346e9c88
No known key found for this signature in database
GPG key ID: 79979C7BA303E003
2 changed files with 9 additions and 1 deletions

View file

@ -15,7 +15,7 @@ import gent.zeus.mc13dtl.MC13DTL;
public class EventRunner implements Runnable {
static List<Event> currentEvents = new ArrayList<>();
public static List<Integer> startTimes = List.of(4000, 13000, 4000, 5000, 14000, 100, 1000, 500, 10000, 5000, 13000, 13000, 5000);
public static List<Integer> startTimes = List.of(3000, 13000, 6000, 5000, 14000, 100, 1000, 500, 10000, 5000, 13000, 13000, 5000);
private final List<Integer> dayScores = List.of(10, 20, 50, 100, 150, 250, 400, 600, 850, 1150, 1500, 2000, 3000);

View file

@ -4,8 +4,12 @@ import gent.zeus.mc13dtl.MC13DTL;
import io.papermc.paper.command.brigadier.BasicCommand;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextDecoration;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.scoreboard.Team;
import org.jetbrains.annotations.NotNull;
@ -20,6 +24,10 @@ public class GroupAddCommand implements BasicCommand {
Integer index = Integer.parseInt(args[1]);
Team team = MC13DTL.board.getTeam(index);
MC13DTL.board.addToTeam(player, team);
if (!player.getInventory().contains(ItemStack.of(Material.CLOCK))) {
player.getInventory().addItem(ItemStack.of(Material.CLOCK,1));
player.sendMessage(Component.text("Clock received").decorate(TextDecoration.ITALIC));
}
} else {
commandSourceStack.getSender().sendMessage("Player " + args[0] + " does not exist.");
}