Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,10 @@ plugins {

repositories {
mavenCentral()
// Anvilgui + Alps Lib Geo (for geo it can be removed once https://github.com/AlpsBTE/Alps-Lib/pull/17 is merged & version is set to 1.0.0)
maven("https://mvn.alps-bte.com/repository/alps-bte-snapshots/") {
content {
includeGroup("com.alpsbte.alpslib")
includeGroup("net.wesjd")
}
}
maven("https://maven.buildtheearth.net/releases") // BuildTheEarth Projection
maven("https://mvn.alps-bte.com/repository/alps-bte/") // AlpsLib
maven("https://maven.enginehub.org/repo/") // WorldEdit
//maven("https://mvn.wesjd.net/") // Anvilgui - includes 26.1 module which is build with Java 25, what breaks the Plugin Remapper on Paper 1.21.4 see https://github.com/WesJD/AnvilGUI/issues/408
maven("https://mvn.wesjd.net/") // https://github.com/WesJD/AnvilGUI/issues/408
maven("https://repo.bluecolored.de/releases") // BlueMap
maven("https://repo.essentialsx.net/releases/")
maven("https://repo.lushplugins.org/releases") // PluginUpdater
Expand All @@ -43,6 +36,7 @@ dependencies {
exclude(group = "com.github.cryptomorin", module = "XSeries")
}
implementation(libs.alpslib.geo)
implementation(libs.alpslib.web.api)
implementation(libs.alpsbte.canvas)
implementation(libs.xseries)
implementation(libs.anvilgui)
Expand Down
9 changes: 6 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ alpslib-io = "1.2.5"
# https://mvn.alps-bte.com/service/rest/repository/browse/alps-bte/com/alpsbte/alpslib/alpslib-libpsterra/
alpslib-libpsterra = "1.1.4"
# https://mvn.alps-bte.com/service/rest/repository/browse/alps-bte/com/alpsbte/alpslib/alpslib-utils/
alpslib-utils = "1.5.2"
alpslib-utils = "1.6.0"
# https://mvn.alps-bte.com/service/rest/repository/browse/alps-bte/com/alpsbte/alpslib/alpslib-geo/
alpslib-geo = "1.0.0-SNAPSHOT"
alpslib-geo = "1.0.0"
# https://mvn.alps-bte.com/service/rest/repository/browse/alps-bte/com/alpsbte/alpslib/alpslib-web-api/
alpslib-web-api = "1.0.0"
# https://github.com/WesJD/AnvilGUI https://mvn.wesjd.net/
anvilgui = "1.10.14-SNAPSHOT"
anvilgui = "1.10.13-SNAPSHOT"
# @pin Ref: https://github.com/BlueMap-Minecraft/BlueMapAPI - Newer Versions require Java 25
bluemap-api = "2.7.8"
# https://central.sonatype.com/artifact/org.bstats/bstats-bukkit
Expand Down Expand Up @@ -60,6 +62,7 @@ alpsbte-canvas = { module = "com.alpsbte:canvas", version.ref = "alpsbte-canvas"
alpslib-io = { module = "com.alpsbte.alpslib:alpslib-io", version.ref = "alpslib-io" }
alpslib-utils = { module = "com.alpsbte.alpslib:alpslib-utils", version.ref = "alpslib-utils" }
alpslib-geo = { module = "com.alpsbte.alpslib:alpslib-geo", version.ref = "alpslib-geo" }
alpslib-web-api = { module = "com.alpsbte.alpslib:web-api-client", version.ref = "alpslib-web-api" }
anvilgui = { module = "net.wesjd:anvilgui", version.ref = "anvilgui" }
bluemap-api = { module = "de.bluecolored:bluemap-api", version.ref = "bluemap-api" }
bstats-bukkit = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
import net.buildtheearth.buildteamtools.modules.common.CommonModule;
import net.buildtheearth.buildteamtools.modules.common.commands.BttCommandManager;
import net.buildtheearth.buildteamtools.modules.generator.GeneratorModule;
import net.buildtheearth.buildteamtools.modules.map.MapModule;
import net.buildtheearth.buildteamtools.modules.miscellaneous.MiscModule;
import net.buildtheearth.buildteamtools.modules.navigation.NavigationModule;
import net.buildtheearth.buildteamtools.modules.network.NetworkModule;
import net.buildtheearth.buildteamtools.modules.plotsystem.PlotSystemModule;
import net.buildtheearth.buildteamtools.modules.stats.StatsModule;
import net.buildtheearth.buildteamtools.utils.io.ConfigurationLoader;
import net.buildtheearth.buildteamtools.utils.io.GeneratorConfig;
import net.buildtheearth.buildteamtools.utils.io.MapConfig;
import net.buildtheearth.buildteamtools.utils.io.MainConfig;
import net.buildtheearth.buildteamtools.utils.io.NavigationConfig;
import net.buildtheearth.buildteamtools.utils.io.PlotSystemConfig;
Expand All @@ -38,6 +40,7 @@ public class BuildTeamTools extends JavaPlugin {
private ConfigurationLoader<MainConfig> mainConfigLoader;
private ConfigurationLoader<NavigationConfig> navigationConfigLoader;
private ConfigurationLoader<GeneratorConfig> generatorConfigLoader;
private ConfigurationLoader<MapConfig> mapConfigLoader;
private ConfigurationLoader<PlotSystemConfig> plotSystemConfigLoader;
@Getter
private BttCommandManager commandManager;
Expand All @@ -50,11 +53,14 @@ public void onEnable() {
getDataFolder().toPath().resolve("modules/navigation"), getSLF4JLogger());
generatorConfigLoader = new ConfigurationLoader<>(GeneratorConfig.class,
getDataFolder().toPath().resolve("modules/generator"), getSLF4JLogger());
mapConfigLoader = new ConfigurationLoader<>(MapConfig.class,
getDataFolder().toPath().resolve("modules/map"), getSLF4JLogger());
plotSystemConfigLoader = new ConfigurationLoader<>(PlotSystemConfig.class,
getDataFolder().toPath().resolve("modules/plotsystem"), getSLF4JLogger());
MainConfig mainConfig = mainConfigLoader.load();
NavigationConfig navigationConfig = navigationConfigLoader.load();
GeneratorConfig generatorConfig = generatorConfigLoader.load();
MapConfig mapConfig = mapConfigLoader.load();
plotSystemConfigLoader.load();
commandManager = new BttCommandManager(this);

Expand All @@ -63,6 +69,7 @@ public void onEnable() {
new CommonModule(mainConfig),
new NetworkModule(mainConfig),
new GeneratorModule(generatorConfig),
new MapModule(mapConfig),
new NavigationModule(navigationConfig),
MiscModule.getInstance(),
StatsModule.getInstance(),
Expand All @@ -83,6 +90,7 @@ public void reloadConfig() {
mainConfigLoader.reload();
navigationConfigLoader.reload();
generatorConfigLoader.reload();
mapConfigLoader.reload();
plotSystemConfigLoader.reload();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public final class BttCommandManager {

private static final Set<String> COMMAND_NAMES = Set.of(
"btt", "generate", "kml", "geopoints", "geopath", "georing", "geosurface",
"navigator", "buildteam", "btwarps", "address", "warp", "blockpalette",
"navigator", "buildteam", "btwarps", "address", "warp", "map", "blockpalette",
"help", "communicators", "cache", "debug", "checkforupdates", "reload-config", "update"
);
private static final ParserDescriptor<CommandSourceStack, String> ARGUMENT_PARSER =
Expand Down Expand Up @@ -425,6 +425,7 @@ private List<String> configuredAliases(String name) {
case "btwarps" -> labels.btwarps();
case "address" -> labels.address();
case "warp" -> labels.warp();
case "map" -> labels.map();
case "blockpalette" -> labels.blockpalette();
default -> List.of();
};
Expand Down Expand Up @@ -476,6 +477,7 @@ private static RichDescription descriptionFor(String name) {
case "btwarps" -> "Open the warp menu for a build team.";
case "address" -> "Look up the address at your current location.";
case "warp" -> "Warp to a saved location.";
case "map" -> "Create map claims from polygonal WorldEdit selections.";
case "blockpalette" -> "Open the block palette menu.";
default -> "BuildTeamTools command.";
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package net.buildtheearth.buildteamtools.modules.map;

import lombok.Getter;
import net.buildtheearth.buildteamtools.modules.Module;
import net.buildtheearth.buildteamtools.modules.map.commands.MapCreateCommand;
import net.buildtheearth.buildteamtools.utils.WikiLinks;
import net.buildtheearth.buildteamtools.utils.io.MapConfig;

public class MapModule extends Module {

@Getter
private final MapConfig config;

public MapModule(MapConfig config) {
super("Map", WikiLinks.ENTRY);
this.config = config;
}

@Override
public void registerCommands() {
new MapCreateCommand(this).register(this);
}

@Override
public void registerListeners() {
}
}
Loading
Loading