diff --git a/BlueMapBukkit/build.gradle b/BlueMapBukkit/build.gradle new file mode 100644 index 00000000..1dff7203 --- /dev/null +++ b/BlueMapBukkit/build.gradle @@ -0,0 +1,17 @@ +repositories { + maven { + url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' + + // As of Gradle 5.1, you can limit this to only those + // dependencies you expect from it + content { + includeGroup 'org.bukkit' + } + } +} + +dependencies { + shadow "org.bukkit:bukkit:1.14.4-R0.1-SNAPSHOT" + //compile group: 'org.bstats', name: 'bstats-sponge-lite', version: '1.5' + compile project(':BlueMapCore') +} diff --git a/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java new file mode 100644 index 00000000..725931e8 --- /dev/null +++ b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/BukkitPlugin.java @@ -0,0 +1,23 @@ +package de.bluecolored.bluemap.bukkit; + +import org.bukkit.plugin.java.JavaPlugin; + +public class BukkitPlugin extends JavaPlugin { + + private static BukkitPlugin instance; + + @Override + public void onEnable() { + + } + + @Override + public void onDisable() { + + } + + public static BukkitPlugin getInstance() { + return instance; + } + +} diff --git a/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/JavaLogger.java b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/JavaLogger.java new file mode 100644 index 00000000..433bf667 --- /dev/null +++ b/BlueMapBukkit/src/main/java/de/bluecolored/bluemap/bukkit/JavaLogger.java @@ -0,0 +1,70 @@ +/* + * This file is part of BlueMapSponge, licensed under the MIT License (MIT). + * + * Copyright (c) Blue (Lukas Rieger) + * Copyright (c) contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package de.bluecolored.bluemap.bukkit; + +import java.util.logging.Level; +import java.util.logging.Logger; + +import de.bluecolored.bluemap.core.logger.AbstractLogger; + +public class JavaLogger extends AbstractLogger { + + private Logger out; + + public JavaLogger(Logger out) { + this.out = out; + } + + @Override + public void logError(String message, Throwable throwable) { + out.log(Level.SEVERE, message, throwable); + } + + @Override + public void logWarning(String message) { + out.log(Level.WARNING, message); + } + + @Override + public void logInfo(String message) { + out.log(Level.INFO, message); + } + + @Override + public void logDebug(String message) { + if (out.isLoggable(Level.FINE)) out.log(Level.FINE, message); + } + + @Override + public void noFloodDebug(String message) { + if (out.isLoggable(Level.FINE)) super.noFloodDebug(message); + } + + @Override + public void noFloodDebug(String key, String message) { + if (out.isLoggable(Level.FINE)) super.noFloodDebug(key, message); + } + +} diff --git a/BlueMapBukkit/src/main/resources/plugin.yml b/BlueMapBukkit/src/main/resources/plugin.yml new file mode 100644 index 00000000..7a3565e9 --- /dev/null +++ b/BlueMapBukkit/src/main/resources/plugin.yml @@ -0,0 +1,7 @@ +name: BlueMap +main: de.bluecolored.bluemap.bukkit.BukkitPlugin +version: 0.1.0 +author: Blue (TBlueF / Lukas Rieger) +authors: [Blue (TBlueF / Lukas Rieger)] +website: "https://github.com/BlueMap-Minecraft" +commands: diff --git a/settings.gradle b/settings.gradle index 1a85cd28..3c519531 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,7 +2,9 @@ rootProject.name = 'BlueMap' include ':BlueMapCore' include ':BlueMapCLI' include ':BlueMapSponge' +include ':BlueMapBukkit' project(':BlueMapCore').projectDir = "$rootDir/BlueMapCore" as File project(':BlueMapCLI').projectDir = "$rootDir/BlueMapCLI" as File -project(':BlueMapSponge').projectDir = "$rootDir/BlueMapSponge" as File \ No newline at end of file +project(':BlueMapSponge').projectDir = "$rootDir/BlueMapSponge" as File +project(':BlueMapBukkit').projectDir = "$rootDir/BlueMapBukkit" as File \ No newline at end of file diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index a572a988..63cdb779 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -4,7 +4,7 @@ "name": "BlueMap", "version": "0.1.0", "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "url": "https://ore.spongepowered.org/Blue/BlueMap", + "url": "https://github.com/BlueMap-Minecraft", "authorList": [ "Blue (TBlueF, Lukas Rieger)" ],