Add Utilities-OG API
This commit is contained in:
1 parent
6ca1283c63
commit
39909a94ef
7 files changed
+20
-30
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
[submodule "libs/Utilities-OG"]
|
||||
path = libs/Utilities-OG
|
||||
url = https://github.com/true-og/Utilities-OG
|
||||
url = https://github.com/true-og/Utilities-OG/
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
# Fetch all submodule content.
|
||||
git submodule update --force --recursive --init
|
||||
+1
-3
@@ -68,10 +68,9 @@ repositories {
|
||||
/* ---------------------- Java project deps ---------------------------- */
|
||||
dependencies {
|
||||
compileOnly("org.purpurmc.purpur:purpur-api:1.19.4-R0.1-SNAPSHOT") // Declare Purpur API version to be packaged.
|
||||
compileOnly("io.github.miniplaceholders:miniplaceholders-api:2.2.3") // Import MiniPlaceholders API.
|
||||
compileOnlyApi(project(":libs:Utilities-OG")) // Import TrueOG Network Utilities-OG Java API (from source).
|
||||
compileOnly(files("libs/ProtocolLib-5.0.jar")) // Import Legacy ProtocolLib API.
|
||||
compileOnly("com.mojang:brigadier:1.0.18")
|
||||
implementation("org.bstats:bstats-bukkit:3.1.0")
|
||||
compileOnly("net.luckperms:api:5.5")
|
||||
compileOnly("com.github.ElgarL:groupmanager:3.2")
|
||||
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.0-SNAPSHOT") // Import WorldEdit API.
|
||||
@@ -101,7 +100,6 @@ tasks.shadowJar {
|
||||
exclude("LICENSE")
|
||||
archiveClassifier.set("") // Use empty string instead of null.
|
||||
archiveBaseName.set("yamipa")
|
||||
relocate("org.bstats", "${project.group}.bstats")
|
||||
}
|
||||
|
||||
tasks.jar {
|
||||
|
||||
Submodule
+1
Submodule libs/Utilities-OG added at 3705eafbc3.
@@ -1 +1,13 @@
|
||||
rootProject.name = "yamipa"
|
||||
|
||||
ProcessBuilder("sh", "bootstrap.sh").directory(rootDir).inheritIO().start().let {
|
||||
if (it.waitFor() != 0) throw GradleException("bootstrap.sh failed")
|
||||
}
|
||||
|
||||
file("libs")
|
||||
.listFiles()
|
||||
?.filter { it.isDirectory && !it.name.startsWith(".") }
|
||||
?.forEach { dir ->
|
||||
include(":libs:${dir.name}")
|
||||
project(":libs:${dir.name}").projectDir = dir
|
||||
}
|
||||
@@ -3,8 +3,6 @@ package io.josemmo.bukkit.plugin;
|
||||
import io.josemmo.bukkit.plugin.commands.ImageCommandBridge;
|
||||
import io.josemmo.bukkit.plugin.renderer.*;
|
||||
import io.josemmo.bukkit.plugin.storage.ImageStorage;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@@ -14,7 +12,6 @@ import java.awt.Color;
|
||||
import java.nio.file.Path;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class YamipaPlugin extends JavaPlugin {
|
||||
@@ -135,28 +132,6 @@ public class YamipaPlugin extends JavaPlugin {
|
||||
fine("Triggered map color cache warm-up");
|
||||
FakeMap.pixelToIndex(Color.RED.getRGB()); // Ask for a color index to force cache generation
|
||||
|
||||
// Initialize bStats
|
||||
Function<Integer, String> toStats = number -> {
|
||||
|
||||
if (number >= 1000)
|
||||
return "1000+";
|
||||
if (number >= 500)
|
||||
return "500-999";
|
||||
if (number >= 100)
|
||||
return "100-499";
|
||||
if (number >= 50)
|
||||
return "50-99";
|
||||
if (number >= 10)
|
||||
return "10-49";
|
||||
return "0-9";
|
||||
|
||||
};
|
||||
Metrics metrics = new Metrics(this, BSTATS_PLUGIN_ID);
|
||||
metrics.addCustomChart(
|
||||
new SimplePie("animate_images", () -> FakeImage.isAnimationEnabled() ? "true" : "false"));
|
||||
metrics.addCustomChart(new SimplePie("number_of_image_files", () -> toStats.apply(storage.size())));
|
||||
metrics.addCustomChart(new SimplePie("number_of_placed_images", () -> toStats.apply(renderer.size())));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: yamipa
|
||||
version: version: '${version}'
|
||||
version: '${version}'
|
||||
main: io.josemmo.bukkit.plugin.YamipaPlugin
|
||||
api-version: '${apiVersion}'
|
||||
depend: [ProtocolLib]
|
||||
|
||||
Reference in new issue
Block a user