Skip to content

Commit 3e13985

Browse files
authored
Added tick option for updateTagTask
By default, this is setted to 20, which is 1 second. This may be complicated if you don’t know how ticks work. It’s recommended to set the tick option to 20, but it is your choice. This option allows you to edit how many ticks in seconds it’ll update the faction tag.
1 parent 626c4c7 commit 3e13985

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/FactionsPro/FactionMain.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public function onEnable(): void {
6868
"PowerGainedPerAlly" => 100,
6969
"AllyLimitPerFaction" => 5,
7070
"enable-faction-tag" => true,
71+
"updateTag-tick" => 20,
7172
"faction-tag" => "§3{player} §5| §3{faction}",
7273
"tag-type" => "scoretag", //Options: scoretag, or nametag!
7374
"TheDefaultPowerEveryFactionStartsWith" => 0,
@@ -98,7 +99,7 @@ public function onEnable(): void {
9899
],
99100
));
100101
if($this->prefs->get("enable-faction-tag") == "true"){
101-
$this->getScheduler()->scheduleRepeatingTask(new updateTagTask($this), 20);
102+
$this->getScheduler()->scheduleRepeatingTask(new updateTagTask($this), $this->prefs->get("updateTag-tick"));
102103
$this->tagCheck();
103104
$this->prefix = $this->prefs->get("prefix", $this->prefix);
104105
$this->db = new \SQLite3($this->getDataFolder() . "FactionsPro.db");

0 commit comments

Comments
 (0)