mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 14:38:55 +00:00
Merge branch 'main' into aubri-test-raiding
This commit is contained in:
8 files changed
+20
-8
No files matched your search
@@ -28,7 +28,6 @@ import net.milkbowl.vault.economy.Economy;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin {
|
||||
|
||||
public static Main instance;
|
||||
public static Economy econ;
|
||||
public static AlathraWarLogger warLogger;
|
||||
@@ -97,7 +96,7 @@ public class Main extends JavaPlugin {
|
||||
new RaidCommands(this);
|
||||
getCommand("war").setTabCompleter(new WarTabCompletion());
|
||||
getCommand("siege").setTabCompleter(new SiegeTabCompletion());
|
||||
getCommand("raid").setTabCompleter(new RaidTabCompletion());
|
||||
//getCommand("raid").setTabCompleter(new RaidTabCompletion());
|
||||
getServer().getPluginManager().registerEvents((Listener) new KillsListener(), (Plugin) this);
|
||||
getServer().getPluginManager().registerEvents((Listener) new CommandsListener(), (Plugin) this);
|
||||
getServer().getPluginManager().registerEvents((Listener) new JoinListener(), (Plugin) this);
|
||||
@@ -105,7 +104,6 @@ public class Main extends JavaPlugin {
|
||||
initData();
|
||||
initAPIs();
|
||||
setupEconomy();
|
||||
initLogs();
|
||||
}
|
||||
|
||||
public void onDisable() {
|
||||
|
||||
@@ -202,6 +202,7 @@ public class Raid {
|
||||
Raid.this.defenderPlayers = Raid.this.war.getSide1Players();
|
||||
}
|
||||
if (Raid.this.raidTicks >= RaidPhase.END.startTick) {
|
||||
|
||||
Bukkit.getServer().getScheduler().cancelTask(Raid.this.bukkitId[0]);
|
||||
Raid.this.phase = RaidPhase.END;
|
||||
//TODO: fix raid scoring
|
||||
|
||||
@@ -24,7 +24,6 @@ public class War {
|
||||
private ArrayList<Raid> raids = new ArrayList<Raid>();
|
||||
private Long lastRaidTime;
|
||||
|
||||
|
||||
/**
|
||||
* War Constructor
|
||||
* @param name - Name of war
|
||||
@@ -206,7 +205,6 @@ public class War {
|
||||
return returnList;
|
||||
}
|
||||
|
||||
|
||||
public void setLastRaidTime(Long lastRaidTime) {
|
||||
this.lastRaidTime = lastRaidTime;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,15 @@ import org.bukkit.entity.Player;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class RaidCommands implements CommandExecutor {
|
||||
public static ArrayList<Town> towns;
|
||||
public static ArrayList<Raid> raids;
|
||||
public static int maxID;
|
||||
|
||||
static {
|
||||
RaidCommands.towns = new ArrayList<Town>();
|
||||
RaidCommands.raids = new ArrayList<Raid>();
|
||||
}
|
||||
|
||||
public RaidCommands(final Main plugin) {
|
||||
//plugin.getCommand("raid").setExecutor((CommandExecutor)this);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ public class RaidTabCompletion implements TabCompleter {
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
List<String> completions = new ArrayList<>();
|
||||
Player p = (Player)sender;
|
||||
/*
|
||||
if (args.length == 1) {
|
||||
if (p.hasPermission("AlathraWar.admin")) {
|
||||
completions.add("stop");
|
||||
@@ -100,6 +101,7 @@ public class RaidTabCompletion implements TabCompleter {
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
@@ -241,4 +241,7 @@ public class RaidData {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public static Object getRaidMap(War war) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,8 @@ public class SiegeData
|
||||
|
||||
/**
|
||||
* Saves the war into files.
|
||||
* @param siege - War to be saved.
|
||||
|
||||
* @param siege - Siege to be saved.
|
||||
*/
|
||||
public static void saveSiege(Siege siege) {
|
||||
War war = siege.getWar();
|
||||
|
||||
Reference in new issue
Block a user