1.1
This commit is contained in:
parent
e20a708e89
commit
63eb5d6572
|
@ -15,7 +15,6 @@ import com.io.yutian.thewardungeon.papi.DungeonPAPI;
|
|||
import com.io.yutian.thewarskyblocklib.gui.GuiListener;
|
||||
import com.io.yutian.thewarskyblocklib.manager.CommandManager;
|
||||
import com.io.yutian.thewarskyblocklib.util.FileUtil;
|
||||
import me.clip.placeholderapi.PlaceholderAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ public class DungeonInstance {
|
|||
|
||||
private int time;
|
||||
|
||||
protected int totalCountdown = -1;
|
||||
protected int countdown = -1;
|
||||
|
||||
private List<ActiveMob> activeMobs = new ArrayList<>();
|
||||
|
@ -415,4 +416,16 @@ public class DungeonInstance {
|
|||
return Objects.hash(uuid);
|
||||
}
|
||||
|
||||
public int getTotalCountdown() {
|
||||
return totalCountdown;
|
||||
}
|
||||
|
||||
public void setTotalCountdown(int totalCountdown) {
|
||||
this.totalCountdown = totalCountdown;
|
||||
}
|
||||
|
||||
public void setCountdown(int countdown) {
|
||||
this.countdown = countdown;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,8 +12,6 @@ public class DungeonOption {
|
|||
|
||||
private int lobbyWaitTime;
|
||||
|
||||
private int countdown;
|
||||
|
||||
private GameMode gameMode;
|
||||
|
||||
private boolean revive;
|
||||
|
@ -33,7 +31,6 @@ public class DungeonOption {
|
|||
min = configurationSection.getInt("min", 1);
|
||||
max = configurationSection.getInt("max", 8);
|
||||
lobbyWaitTime = configurationSection.getInt("lobbyWaitTime", 60);
|
||||
countdown = configurationSection.getInt("countdown", -1);
|
||||
gameMode = GameMode.valueOf(configurationSection.getString("gamemode", GameMode.ADVENTURE.toString()));
|
||||
revive = configurationSection.getBoolean("revive", true);
|
||||
reviveAmount = configurationSection.getInt("reviveAmount", -1);
|
||||
|
@ -55,10 +52,6 @@ public class DungeonOption {
|
|||
return max;
|
||||
}
|
||||
|
||||
public int getCountdown() {
|
||||
return countdown;
|
||||
}
|
||||
|
||||
public int getLobbyWaitTime() {
|
||||
return lobbyWaitTime;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package com.io.yutian.thewardungeon.gui;
|
|||
|
||||
import com.io.yutian.thewardungeon.dungeon.Dungeon;
|
||||
import com.io.yutian.thewardungeon.dungeon.DungeonInstance;
|
||||
import com.io.yutian.thewardungeon.manager.DungeonManager;
|
||||
import com.io.yutian.thewarskyblocklib.gui.Gui;
|
||||
import com.io.yutian.thewarskyblocklib.gui.button.Button;
|
||||
import com.io.yutian.thewarskyblocklib.gui.button.ClickType;
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
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 SetTotalCountdownScript extends Script {
|
||||
|
||||
private int countdown;
|
||||
|
||||
public SetTotalCountdownScript(LineMetadata metadata) {
|
||||
super(metadata);
|
||||
this.countdown = metadata.getInt("countdown");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(DungeonInstance dungeonInstance) {
|
||||
dungeonInstance.setTotalCountdown(countdown);
|
||||
}
|
||||
|
||||
}
|
|
@ -3,6 +3,7 @@ options:
|
|||
min: 1
|
||||
max: 8
|
||||
lobbyWaitTime: 60
|
||||
countdown: 10
|
||||
gamemode: ADVENTURE
|
||||
revive: true
|
||||
reviveAmount: -1
|
||||
|
|
Loading…
Reference in New Issue
Block a user