测试版

This commit is contained in:
yaohunya 2024-07-13 20:30:26 +08:00
parent 976de8779a
commit effbed02d1
5 changed files with 88 additions and 36 deletions

27
pom.xml
View File

@ -14,36 +14,27 @@
</properties>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>public-rpg</id>
<url>https://repo.aurora-pixels.com/repository/public-rpg/</url>
</repository>
<repository>
<id>public</id>
<url>https://repo.aurora-pixels.com/repository/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.12.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<version>1.12.2</version>
</dependency>
<dependency>
<groupId>com.fastasyncworldedit.bukkit</groupId>
<artifactId>FastAsyncWorldEdit</artifactId>
<version>2.9.1</version>
<classifier>660</classifier>
<groupId>me.Demon.DemonPlugin</groupId>
<artifactId>DemonAPI</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>me.Demon.DemonBank</groupId>
<artifactId>DemonBank</artifactId>
<version>1.4</version>
</dependency>
</dependencies>

View File

@ -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(){
}
}

View File

@ -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());
}
}

View File

@ -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<String> onTabComplete(CommandSender sender, Command command, String label, String[] arge) {
List<String> stringList = new ArrayList<>();
return null;
}
}

View File

@ -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;
}
}