This commit is contained in:
YuTian 2024-08-13 11:23:43 +08:00
parent 63eb5d6572
commit a4a544a001
2 changed files with 23 additions and 0 deletions

View File

@ -34,6 +34,8 @@ public class RegistryManager {
scriptRegistry.add("setrespawn", SetRespawnScript.class); scriptRegistry.add("setrespawn", SetRespawnScript.class);
scriptRegistry.add("sound", SoundScript.class); scriptRegistry.add("sound", SoundScript.class);
scriptRegistry.add("title", TitleScript.class); scriptRegistry.add("title", TitleScript.class);
scriptRegistry.add("settotalcountdown", SetTotalCountdownScript.class);
scriptRegistry.add("setcountdown", SetCountdownScript.class);
} }
private static void registerObjective() { private static void registerObjective() {

View File

@ -0,0 +1,21 @@
package com.io.yutian.thewardungeon.script.list;
import com.io.yutian.thewardungeon.data.LineMetadata;
import com.io.yutian.thewardungeon.dungeon.DungeonInstance;
import com.io.yutian.thewardungeon.script.Script;
public class SetCountdownScript extends Script {
private int countdown;
public SetCountdownScript(LineMetadata metadata) {
super(metadata);
countdown = metadata.getInt("countdown");
}
@Override
public void execute(DungeonInstance dungeonInstance) {
dungeonInstance.setCountdown(countdown);
}
}