修复在没有dynmap下无法加载的问题。
All checks were successful
Java CI-CD with Maven / build (push) Successful in 10m7s
All checks were successful
Java CI-CD with Maven / build (push) Successful in 10m7s
This commit is contained in:
parent
4d1325a126
commit
1297f0cb34
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.38.0-beta</version>
|
||||
<version>1.38.1-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -5,7 +5,6 @@ import cn.lunadeer.dominion.events.PlayerEvents;
|
||||
import cn.lunadeer.dominion.events.SelectPointEvents;
|
||||
import cn.lunadeer.dominion.managers.ConfigManager;
|
||||
import cn.lunadeer.dominion.managers.DatabaseTables;
|
||||
import cn.lunadeer.dominion.utils.BlueMapConnect;
|
||||
import cn.lunadeer.dominion.utils.DynmapConnect;
|
||||
import cn.lunadeer.dominion.utils.MapRender;
|
||||
import cn.lunadeer.minecraftpluginutils.*;
|
||||
@ -15,7 +14,6 @@ import cn.lunadeer.minecraftpluginutils.scui.CuiManager;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.dynmap.DynmapCommonAPIListener;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@ -75,7 +73,7 @@ public final class Dominion extends JavaPlugin {
|
||||
XLogger.info(" |_____/ \\___/|_| |_| |_|_|_| |_|_|\\___/|_| |_|");
|
||||
XLogger.info(" ");
|
||||
|
||||
if (config.getDynmap()) DynmapCommonAPIListener.register(new DynmapConnect()); // 注册 Dynmap API
|
||||
if (config.getDynmap()) new DynmapConnect(); // 注册 Dynmap API
|
||||
Scheduler.runTaskLaterAsync(MapRender::render, 40 * 20);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package cn.lunadeer.dominion.utils;
|
||||
|
||||
import cn.lunadeer.dominion.Cache;
|
||||
import cn.lunadeer.dominion.Dominion;
|
||||
import cn.lunadeer.dominion.dtos.DominionDTO;
|
||||
import cn.lunadeer.minecraftpluginutils.Scheduler;
|
||||
import cn.lunadeer.minecraftpluginutils.XLogger;
|
||||
|
@ -16,10 +16,11 @@ public class DynmapConnect extends DynmapCommonAPIListener {
|
||||
|
||||
public static DynmapConnect instance;
|
||||
|
||||
private MarkerSet markerSet_dominion;
|
||||
private MarkerSet markerSet_mca;
|
||||
private MarkerSet markerSet_dominion = null;
|
||||
private MarkerSet markerSet_mca = null;
|
||||
|
||||
public DynmapConnect() {
|
||||
DynmapCommonAPIListener.register(this);
|
||||
instance = this;
|
||||
}
|
||||
|
||||
@ -30,9 +31,11 @@ public class DynmapConnect extends DynmapCommonAPIListener {
|
||||
if (this.markerSet_dominion == null) {
|
||||
this.markerSet_dominion = markerAPI.createMarkerSet("dominion", "Dominion领地", null, false);
|
||||
}
|
||||
this.markerSet_mca = markerAPI.getMarkerSet("mca");
|
||||
if (this.markerSet_mca == null) {
|
||||
this.markerSet_mca = markerAPI.createMarkerSet("mca", "MCA文件", null, false);
|
||||
}
|
||||
XLogger.info("Dynmap 成功注册");
|
||||
}
|
||||
|
||||
private void setDominionMarker(DominionDTO dominion) {
|
||||
|
Reference in New Issue
Block a user