- Increase flag respawn time
- Fix flag timer being black
This commit is contained in:
parent
b28419caab
commit
abaf94618c
@ -129,10 +129,10 @@ public class Flag
|
|||||||
{
|
{
|
||||||
//Bukkit.broadcastMessage(System.currentTimeMillis() + ":" + _dropTime + (10 * 60 * 1000));
|
//Bukkit.broadcastMessage(System.currentTimeMillis() + ":" + _dropTime + (10 * 60 * 1000));
|
||||||
Integer r = (int)(System.currentTimeMillis() - _dropTime) / 1000;
|
Integer r = (int)(System.currentTimeMillis() - _dropTime) / 1000;
|
||||||
Integer re = 10 - r;
|
Integer re = 15 - r;
|
||||||
_time.setText(RemainColor(re) + re.toString());
|
_time.setText(RemainColor(re) + re.toString());
|
||||||
|
|
||||||
if (!UtilTime.elapsed(_dropTime, 10000))
|
if (!UtilTime.elapsed(_dropTime, 15000))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_name.stop();
|
_name.stop();
|
||||||
@ -200,8 +200,8 @@ public class Flag
|
|||||||
|
|
||||||
private ChatColor RemainColor(int remain)
|
private ChatColor RemainColor(int remain)
|
||||||
{
|
{
|
||||||
if (remain >= 7) return ChatColor.GREEN;
|
if (remain >= 12) return ChatColor.GREEN;
|
||||||
if ((remain < 7) && (remain >= 4)) return ChatColor.YELLOW;
|
if ((remain < 9) && (remain >= 6)) return ChatColor.YELLOW;
|
||||||
return ChatColor.RED;
|
return ChatColor.RED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,9 +227,9 @@ public class Flag
|
|||||||
_name.setLocation(_flagBlocks[0].getLocation().clone().add(0.5, 3, 0.5));
|
_name.setLocation(_flagBlocks[0].getLocation().clone().add(0.5, 3, 0.5));
|
||||||
_name.start();
|
_name.start();
|
||||||
Integer r = (int)(System.currentTimeMillis() - _dropTime) / 1000;
|
Integer r = (int)(System.currentTimeMillis() - _dropTime) / 1000;
|
||||||
Integer re = 10 - r;
|
Integer re = 15 - r;
|
||||||
_time.setText(RemainColor(re) + re.toString());
|
_time.setText(RemainColor(re) + re.toString());
|
||||||
_time.setLocation(_flagBlocks[0].getLocation().clone().add(0.5, 2, 0.5));
|
_time.setLocation(_flagBlocks[0].getLocation().clone().add(0.5, 2.5, 0.5));
|
||||||
_time.start();
|
_time.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user