Removing junk

This commit is contained in:
Isaac committed 2023-04-24 23:48:23 +01:00
1 parent 421c6ac9a1
commit 49e4600d1b
2 files changed
+4 -27

No files matched your search

@@ -197,10 +197,6 @@ public class AdminCommands implements CommandExecutor {
return fail(p, args, "syntax");
}
private static boolean exclude(Player p, String[] args) {
return true;
}
/**
* //force end a war/event, can declare winner side, or no winner
* -force end war [name] (side/victor)
@@ -368,10 +364,7 @@ public class AdminCommands implements CommandExecutor {
args[5],
args[3]
};
//find the player
Player target = p;
if (Bukkit.getPlayer(args[3]) != null) {
target = Bukkit.getPlayer(args[3]);
} else {
p.sendMessage(Helper.color("c") + args[3] + " does not exist!");
p.sendMessage(Helper.color("&cUsage: /alathrawaradmin force join war [player] [war] [side]"));
@@ -1617,12 +1610,6 @@ public class AdminCommands implements CommandExecutor {
return true;
}
private static boolean rule(Player p, String[] args) {
return true;
}
private static boolean awa(Player p, String[] args) {
p.chat("awa awa! ^.^ UwU");
return true;
@@ -13,22 +13,11 @@ import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import javax.annotation.Nonnull;
import java.io.File;
import java.io.FilenameFilter;
import java.util.*;
public class RaidData {
// Static Raid list for all active raids
private static ArrayList<Raid> raids = new ArrayList<Raid>();
private final static String dataFolderPath = "plugins" + File.separator + "AlathraWar" + File.separator + "data";
// Filter for only accessing yml files
private static FilenameFilter ymlFilter = new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.endsWith(".yml");
}
};
public static ArrayList<Raid> getRaids() {
return raids;
@@ -220,9 +209,10 @@ public class RaidData {
* @return
* @Isaac this is for getting when the last raid was on a town
*/
@SuppressWarnings("rawtypes")
public static long whenTownLastRaided(Town town) {
if (town.hasMeta("lastRaided")) {
CustomDataField field = town.getMetadata("lastRaided");
if (town.hasMeta("AlathraWar-lastRaided")) {
CustomDataField field = town.getMetadata("AlathraWar-lastRaided");
if (field != null) {
if (field instanceof LongDataField) {
return ((LongDataField) field).getValue();
@@ -230,7 +220,7 @@ public class RaidData {
}
return -1L;
} else {
town.addMetaData(new LongDataField("lastRaided", 0L));
town.addMetaData(new LongDataField("AlathraWar-lastRaided", 0L));
}
return -1L;
}