diff --git a/pom.xml b/pom.xml index 2d86681..26948dd 100644 --- a/pom.xml +++ b/pom.xml @@ -149,6 +149,8 @@ **/com/bergerkiller/bukkit/common/map/*.java **/com/bergerkiller/bukkit/common/map/color/*.java **/tech/sbdevelopment/mapreflectionapi/*.java + **/tech/sbdevelopment/mapreflectionapi/cmd/*.java + **/tech/sbdevelopment/mapreflectionapi/managers/*.java **/tech/sbdevelopment/mapreflectionapi/utils/*.java **/tech/sbdevelopment/mapreflectionapi/listeners/*.java diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..3047218 --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,5 @@ +/** + * This API helps developer with viewing images on maps or in inventories. + */ +module MapReflectionAPI { +} \ No newline at end of file diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/AbstractMapWrapper.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/AbstractMapWrapper.java index b5ba6a6..6867b4e 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/AbstractMapWrapper.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/AbstractMapWrapper.java @@ -23,6 +23,9 @@ package tech.sbdevelopment.mapreflectionapi.api; +/** + * The abstract class of a wrapped map. + */ public abstract class AbstractMapWrapper { /** * Get the controller of this wrapper diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/ArrayImage.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/ArrayImage.java index 6ae3b61..8151b4a 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/ArrayImage.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/ArrayImage.java @@ -32,7 +32,7 @@ import java.awt.*; import java.awt.image.BufferedImage; /** - * This class contains an image converted to a Minecraft byte array + * An {@link ArrayImage} contains an image converted to a Minecraft byte array. */ @RequiredArgsConstructor @EqualsAndHashCode diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/IMapController.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/IMapController.java index f1f9394..da677df 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/IMapController.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/IMapController.java @@ -28,6 +28,9 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import tech.sbdevelopment.mapreflectionapi.api.exceptions.MapLimitExceededException; +/** + * This interface contains the methods for both the {@link MapController} and the {@link MultiMapController}. + */ public interface IMapController { /** * Add a viewer diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapController.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapController.java index 2179cd8..62261d8 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapController.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapController.java @@ -28,6 +28,9 @@ import org.bukkit.World; import org.bukkit.entity.ItemFrame; import org.bukkit.entity.Player; +/** + * A {@link MapController} controls one {@link MapWrapper}. + */ public interface MapController extends IMapController { /** * @deprecated Please use {@link MapWrapper#getContent()} diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapManager.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapManager.java index bb1bdf9..7312cd9 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapManager.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapManager.java @@ -35,6 +35,9 @@ import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; +/** + * The {@link MapManager} manages all the maps. It also contains functions for wrapping. + */ public class MapManager { protected final Set occupiedIds = new HashSet<>(); protected final List managedMaps = new CopyOnWriteArrayList<>(); diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapSender.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapSender.java index d6d1eda..1c6b5b6 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapSender.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapSender.java @@ -32,6 +32,9 @@ import tech.sbdevelopment.mapreflectionapi.utils.ReflectionUtil; import java.util.ArrayList; import java.util.List; +/** + * The {@link MapSender} sends the Map packets to players. + */ public class MapSender { private static final List sendQueue = new ArrayList<>(); private static int senderID = -1; diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapWrapper.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapWrapper.java index 6b851a8..e603ef2 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapWrapper.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MapWrapper.java @@ -38,6 +38,9 @@ import tech.sbdevelopment.mapreflectionapi.utils.ReflectionUtil; import java.util.*; +/** + * A {@link MapWrapper} wraps one image. + */ public class MapWrapper extends AbstractMapWrapper { private static final String REFERENCE_METADATA = "MAP_WRAPPER_REF"; protected ArrayImage content; diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapController.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapController.java index a30e166..0eeee37 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapController.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapController.java @@ -29,6 +29,9 @@ import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; import tech.sbdevelopment.mapreflectionapi.api.exceptions.MapLimitExceededException; +/** + * A {@link MultiMapController} controls multiple {@link MapWrapper}s (a.k.a. the {@link MultiMapWrapper}). + */ public interface MultiMapController extends IMapController { /** * Add a viewer diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapWrapper.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapWrapper.java index e83e732..5134507 100644 --- a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapWrapper.java +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/MultiMapWrapper.java @@ -36,6 +36,9 @@ import java.util.HashSet; import java.util.Set; import java.util.UUID; +/** + * A {@link MultiMapWrapper} wraps one image split in pieces. + */ public class MultiMapWrapper extends AbstractMapWrapper { private final MapWrapper[][] wrapperMatrix; diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/events/package-info.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/events/package-info.java new file mode 100644 index 0000000..69d2d22 --- /dev/null +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/events/package-info.java @@ -0,0 +1,27 @@ +/* + * This file is part of MapReflectionAPI. + * Copyright (c) 2022 inventivetalent / SBDevelopment - All Rights Reserved + * + * 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. + */ + +/** + * The Events package contains all the custom events the API fires. + */ +package tech.sbdevelopment.mapreflectionapi.api.events; \ No newline at end of file diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/exceptions/package-info.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/exceptions/package-info.java new file mode 100644 index 0000000..6f39eb4 --- /dev/null +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/exceptions/package-info.java @@ -0,0 +1,27 @@ +/* + * This file is part of MapReflectionAPI. + * Copyright (c) 2022 inventivetalent / SBDevelopment - All Rights Reserved + * + * 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. + */ + +/** + * The Exceptions package contains all the custom exceptions the API may throw. + */ +package tech.sbdevelopment.mapreflectionapi.api.exceptions; \ No newline at end of file diff --git a/src/main/java/tech/sbdevelopment/mapreflectionapi/api/package-info.java b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/package-info.java new file mode 100644 index 0000000..948c784 --- /dev/null +++ b/src/main/java/tech/sbdevelopment/mapreflectionapi/api/package-info.java @@ -0,0 +1,27 @@ +/* + * This file is part of MapReflectionAPI. + * Copyright (c) 2022 inventivetalent / SBDevelopment - All Rights Reserved + * + * 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. + */ + +/** + * The API package contains all the API you can interact with. + */ +package tech.sbdevelopment.mapreflectionapi.api; \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 9418e75..358fc74 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -3,7 +3,7 @@ version: '${project.version}' main: tech.sbdevelopment.mapreflectionapi.MapReflectionAPI api-version: 1.13 authors: [ inventivetalent, SBDeveloper ] -description: This API helps developer with viewing images on maps. +description: This API helps developer with viewing images on maps or in inventories. website: https://sbdevelopment.tech softdepend: [ ProtocolLib ] commands: