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