From 3ce89bf51aefd1bade792c925c1c0d1529974a0f Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Mon, 20 Apr 2020 12:42:24 +0200 Subject: [PATCH] Remove mistakenly commited test-code (oops) --- .../bluemap/sponge/BlueMapIntegration.java | 90 ------------------- .../bluemap/sponge/SpongePlugin.java | 3 - 2 files changed, 93 deletions(-) delete mode 100644 BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/BlueMapIntegration.java diff --git a/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/BlueMapIntegration.java b/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/BlueMapIntegration.java deleted file mode 100644 index 08a21329..00000000 --- a/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/BlueMapIntegration.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of BlueMap, 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.sponge; - -import java.awt.Color; -import java.awt.Graphics; -import java.awt.image.BufferedImage; -import java.io.IOException; - -import com.flowpowered.math.vector.Vector3d; - -import de.bluecolored.bluemap.api.BlueMapAPI; -import de.bluecolored.bluemap.api.BlueMapAPIListener; -import de.bluecolored.bluemap.api.marker.MarkerAPI; -import de.bluecolored.bluemap.api.marker.MarkerSet; -import de.bluecolored.bluemap.api.marker.POIMarker; -import de.bluecolored.bluemap.api.marker.Shape; - -public class BlueMapIntegration implements BlueMapAPIListener { - - @Override - public void onEnable(BlueMapAPI blueMapApi) { - - BufferedImage testIcon = new BufferedImage(50, 50, BufferedImage.TYPE_INT_ARGB); - Graphics g = testIcon.getGraphics(); - g.setColor(Color.GREEN); - g.fillOval(10, 15, 5, 10); - - String icon = ""; - try { - icon = blueMapApi.createImage(testIcon, "test/icon"); - } catch (IOException e) { - e.printStackTrace(); - } - - try { - - MarkerAPI markerApi = blueMapApi.getMarkerAPI(); - - MarkerSet set = markerApi.createMarkerSet("testmarker"); - set.setLabel("Testmarker"); - set.setDefaultHidden(true); - - markerApi.save(); - markerApi.load(); - - set.createShapeMarker("shape1", blueMapApi.getMap("world").get(), Vector3d.from(0, 70.023487, -5.23432542), Shape.createCircle(0, -5, 100, 20), 70); - - MarkerAPI markerApi2 = blueMapApi.getMarkerAPI(); - - markerApi.save(); - - markerApi2.createMarkerSet("testmarker").createPOIMarker("poi1", blueMapApi.getMap("world").get(), Vector3d.from(10, 70.023487, -5.234322)); - markerApi2.save(); - - markerApi.load(); - ((POIMarker) markerApi.getMarkerSet("testmarker").get().getMarker("poi1").get()).setIcon(icon, 10, 15); - - markerApi.save(); - - } catch (IOException e) { - e.printStackTrace(); - } - - - } - -} diff --git a/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java b/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java index 95a54da1..7cce4a0f 100644 --- a/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java +++ b/BlueMapSponge/src/main/java/de/bluecolored/bluemap/sponge/SpongePlugin.java @@ -41,7 +41,6 @@ import org.spongepowered.api.scheduler.SpongeExecutorService; import org.spongepowered.api.world.storage.WorldProperties; -import de.bluecolored.bluemap.api.BlueMapAPI; import de.bluecolored.bluemap.common.plugin.Plugin; import de.bluecolored.bluemap.common.plugin.serverinterface.ServerEventListener; import de.bluecolored.bluemap.common.plugin.serverinterface.ServerInterface; @@ -73,8 +72,6 @@ public class SpongePlugin implements ServerInterface { public SpongePlugin(org.slf4j.Logger logger) { Logger.global = new Slf4jLogger(logger); - BlueMapAPI.registerListener(new BlueMapIntegration()); - this.bluemap = new Plugin("sponge", this); }