From effbed02d167cf385812a114067d97a6d149186d Mon Sep 17 00:00:00 2001 From: yaohunya <31456652@qq.com> Date: Sat, 13 Jul 2024 20:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 27 +++++--------- .../com/io/yaohun/worldbosshurt/BossUtil.java | 36 +++++++++++++++++++ .../com/io/yaohun/worldbosshurt/Main.java | 16 +++++++++ .../worldbosshurt/command/BossSpawnerCmd.java | 27 ++++++++++++++ .../com/io/yaohun/worldbosshurt/main.java | 18 ---------- 5 files changed, 88 insertions(+), 36 deletions(-) create mode 100644 src/main/java/com/io/yaohun/worldbosshurt/BossUtil.java create mode 100644 src/main/java/com/io/yaohun/worldbosshurt/Main.java create mode 100644 src/main/java/com/io/yaohun/worldbosshurt/command/BossSpawnerCmd.java delete mode 100644 src/main/java/com/io/yaohun/worldbosshurt/main.java diff --git a/pom.xml b/pom.xml index f412f2d..933813f 100644 --- a/pom.xml +++ b/pom.xml @@ -14,36 +14,27 @@ - - spigotmc-repo - https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - - sonatype - https://oss.sonatype.org/content/groups/public/ - public-rpg https://repo.aurora-pixels.com/repository/public-rpg/ - - public - https://repo.aurora-pixels.com/repository/public/ - org.spigotmc spigot-api - 1.12.2-R0.1-SNAPSHOT - provided + 1.12.2 - com.fastasyncworldedit.bukkit - FastAsyncWorldEdit - 2.9.1 - 660 + me.Demon.DemonPlugin + DemonAPI + 1.2.0 + + + me.Demon.DemonBank + DemonBank + 1.4 diff --git a/src/main/java/com/io/yaohun/worldbosshurt/BossUtil.java b/src/main/java/com/io/yaohun/worldbosshurt/BossUtil.java new file mode 100644 index 0000000..8351985 --- /dev/null +++ b/src/main/java/com/io/yaohun/worldbosshurt/BossUtil.java @@ -0,0 +1,36 @@ +package com.io.yaohun.worldbosshurt; + +import me.Demon.DemonPlugin.DemonAPI; +import org.bukkit.configuration.file.FileConfiguration; + +public class BossUtil { + + /* + * 获取每月数据刷新时间 + * */ + public static String getTimeMonthly(){ + FileConfiguration yml = Main.plugin.getConfig(); + if(yml.getString("Timemonth") != null){ + return yml.getString("Timemonth"); + } + return "2022/04"; + } + + /* + * 判断本月数据是否刷新 + * */ + public static boolean isTimeMonthly(){ + FileConfiguration yml = Main.plugin.getConfig(); + if(!getTimeMonthly().equalsIgnoreCase(DemonAPI.getTime("yyyy/MM"))){ + return true; + } + return false; + } + + /* + * 结算上月累积击杀十万年次数排行 + * */ + public static void settlementRankingRewards(){ + + } +} diff --git a/src/main/java/com/io/yaohun/worldbosshurt/Main.java b/src/main/java/com/io/yaohun/worldbosshurt/Main.java new file mode 100644 index 0000000..a25e693 --- /dev/null +++ b/src/main/java/com/io/yaohun/worldbosshurt/Main.java @@ -0,0 +1,16 @@ +package com.io.yaohun.worldbosshurt; + +import org.bukkit.plugin.java.JavaPlugin; + +public class Main extends JavaPlugin { + + public static Main plugin; + + @Override + public void onEnable() { + plugin = this; + getCommand("bossspawner").setExecutor(new BossSpawnerCMD()); + } + + +} diff --git a/src/main/java/com/io/yaohun/worldbosshurt/command/BossSpawnerCmd.java b/src/main/java/com/io/yaohun/worldbosshurt/command/BossSpawnerCmd.java new file mode 100644 index 0000000..b6c22d7 --- /dev/null +++ b/src/main/java/com/io/yaohun/worldbosshurt/command/BossSpawnerCmd.java @@ -0,0 +1,27 @@ +package com.io.yaohun.worldbosshurt.command; + +import com.io.yaohun.worldbosshurt.BossUtil; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.TabCompleter; + +import java.util.ArrayList; +import java.util.List; + +public class BossSpawnerCmd implements CommandExecutor , TabCompleter { + + @Override + public boolean onCommand(CommandSender sender, Command command, String label, String[] arge) { + if(BossUtil.isTimeMonthly()){ + + } + return false; + } + + @Override + public List onTabComplete(CommandSender sender, Command command, String label, String[] arge) { + List stringList = new ArrayList<>(); + return null; + } +} diff --git a/src/main/java/com/io/yaohun/worldbosshurt/main.java b/src/main/java/com/io/yaohun/worldbosshurt/main.java deleted file mode 100644 index b27a384..0000000 --- a/src/main/java/com/io/yaohun/worldbosshurt/main.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.io.yaohun.worldbosshurt; - -import org.bukkit.plugin.java.JavaPlugin; - -public class main extends JavaPlugin { - - private static main instance; - - @Override - public void onEnable() { - instance = this; - } - - public static main getInstance() { - return instance; - } - -}