SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package org.bukkit.map;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.Image;
|
||||
|
||||
/**
|
||||
@@ -14,6 +16,7 @@ public interface MapCanvas {
|
||||
*
|
||||
* @return The MapView this canvas is attached to.
|
||||
*/
|
||||
@NotNull
|
||||
public MapView getMapView();
|
||||
|
||||
/**
|
||||
@@ -21,6 +24,7 @@ public interface MapCanvas {
|
||||
*
|
||||
* @return The MapCursorCollection associated with this canvas.
|
||||
*/
|
||||
@NotNull
|
||||
public MapCursorCollection getCursors();
|
||||
|
||||
/**
|
||||
@@ -30,7 +34,7 @@ public interface MapCanvas {
|
||||
*
|
||||
* @param cursors The MapCursorCollection to associate with this canvas.
|
||||
*/
|
||||
public void setCursors(MapCursorCollection cursors);
|
||||
public void setCursors(@NotNull MapCursorCollection cursors);
|
||||
|
||||
/**
|
||||
* Draw a pixel to the canvas.
|
||||
@@ -66,7 +70,7 @@ public interface MapCanvas {
|
||||
* @param y The y coordinate of the image.
|
||||
* @param image The Image to draw.
|
||||
*/
|
||||
public void drawImage(int x, int y, Image image);
|
||||
public void drawImage(int x, int y, @NotNull Image image);
|
||||
|
||||
/**
|
||||
* Render text to the map using fancy formatting. Newline (\n) characters
|
||||
@@ -79,6 +83,6 @@ public interface MapCanvas {
|
||||
* @param font The font to use.
|
||||
* @param text The formatted text to render.
|
||||
*/
|
||||
public void drawText(int x, int y, MapFont font, String text);
|
||||
public void drawText(int x, int y, @NotNull MapFont font, @NotNull String text);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user