From 664a7017b60633d08f072bf6ff618841bea41cc5 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 29 Jun 2019 06:28:14 +1000 Subject: [PATCH] Add NotNull annotation to adapter --- .../java/com/sk89q/worldedit/bukkit/BukkitAdapter.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java index d3a2747f4..b85ec5341 100644 --- a/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java +++ b/worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java @@ -51,6 +51,7 @@ import org.bukkit.block.Biome; import org.bukkit.block.data.BlockData; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; /** * Adapts between Bukkit and WorldEdit equivalent objects. @@ -199,7 +200,7 @@ public enum BukkitAdapter { * @param blockType The WorldEdit BlockType * @return The Bukkit Material */ - public static Material adapt(BlockType blockType) { + public static Material adapt(@NotNull BlockType blockType) { return getAdapter().adapt(blockType); } @@ -248,7 +249,7 @@ public enum BukkitAdapter { * @param material The material * @return The blocktype */ - public static BlockType asBlockType(Material material) { + public static BlockType asBlockType(@NotNull Material material) { return getAdapter().asBlockType(material); } @@ -270,7 +271,7 @@ public enum BukkitAdapter { * @param blockData The Bukkit BlockData * @return The WorldEdit BlockState */ - public static BlockState adapt(BlockData blockData) { + public static BlockState adapt(@NotNull BlockData blockData) { return getAdapter().adapt(blockData); } @@ -284,7 +285,7 @@ public enum BukkitAdapter { * @param block The WorldEdit BlockStateHolder * @return The Bukkit BlockData */ - public static BlockData adapt(BlockStateHolder block) { + public static BlockData adapt(@NotNull BlockStateHolder block) { return getAdapter().adapt(block); }