java:
public class GGameCycle extends BukkitRunnable{
private GMain main;
private int timer = 60;
public GGameCycle(GMain main) {
this.main = main;
}
@Override
public void run() {
if(timer == 30 || timer == 15 || timer == 10 || timer == 5 || timer == 4 || timer == 3 || timer == 2 || timer == 1)
{
Bukkit.broadcastMessage("§ePvp activé dans " + timer + "s");
}
if(timer == 0)
{
cancel();
Bukkit.broadcastMessage("§1Pvp actif");
}
timer --;
}
}
j'ai ça comme game cycle
public class GGameCycle extends BukkitRunnable{
private GMain main;
private int timer = 60;
public GGameCycle(GMain main) {
this.main = main;
}
@Override
public void run() {
if(timer == 30 || timer == 15 || timer == 10 || timer == 5 || timer == 4 || timer == 3 || timer == 2 || timer == 1)
{
Bukkit.broadcastMessage("§ePvp activé dans " + timer + "s");
}
if(timer == 0)
{
cancel();
Bukkit.broadcastMessage("§1Pvp actif");
}
timer --;
}
}
j'ai ça comme game cycle
Dernière édition: