give players a clock
This commit is contained in:
parent
7d534bb73a
commit
c6346e9c88
2 changed files with 9 additions and 1 deletions
|
@ -15,7 +15,7 @@ import gent.zeus.mc13dtl.MC13DTL;
|
||||||
|
|
||||||
public class EventRunner implements Runnable {
|
public class EventRunner implements Runnable {
|
||||||
static List<Event> currentEvents = new ArrayList<>();
|
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);
|
private final List<Integer> dayScores = List.of(10, 20, 50, 100, 150, 250, 400, 600, 850, 1150, 1500, 2000, 3000);
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,12 @@ import gent.zeus.mc13dtl.MC13DTL;
|
||||||
import io.papermc.paper.command.brigadier.BasicCommand;
|
import io.papermc.paper.command.brigadier.BasicCommand;
|
||||||
import io.papermc.paper.command.brigadier.CommandSourceStack;
|
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.Bukkit;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.scoreboard.Team;
|
import org.bukkit.scoreboard.Team;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@ -20,6 +24,10 @@ public class GroupAddCommand implements BasicCommand {
|
||||||
Integer index = Integer.parseInt(args[1]);
|
Integer index = Integer.parseInt(args[1]);
|
||||||
Team team = MC13DTL.board.getTeam(index);
|
Team team = MC13DTL.board.getTeam(index);
|
||||||
MC13DTL.board.addToTeam(player, team);
|
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 {
|
} else {
|
||||||
commandSourceStack.getSender().sendMessage("Player " + args[0] + " does not exist.");
|
commandSourceStack.getSender().sendMessage("Player " + args[0] + " does not exist.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue