annotate Platform methods with nullability and contract

This commit is contained in:
dfsek
2021-12-01 08:26:30 -07:00
parent 5749af4bb2
commit 65d8dc803d
5 changed files with 47 additions and 20 deletions
@@ -17,6 +17,7 @@
package com.dfsek.terra.sponge;
import org.jetbrains.annotations.NotNull;
import org.spongepowered.api.Sponge;
import java.io.File;
@@ -43,22 +44,22 @@ public class PlatformImpl extends AbstractPlatform {
}
@Override
public String platformName() {
public @NotNull String platformName() {
return "Sponge";
}
@Override
public WorldHandle getWorldHandle() {
public @NotNull WorldHandle getWorldHandle() {
return worldHandle;
}
@Override
public File getDataFolder() {
public @NotNull File getDataFolder() {
return Sponge.configManager().pluginConfig(plugin.getPluginContainer()).directory().toFile();
}
@Override
public ItemHandle getItemHandle() {
public @NotNull ItemHandle getItemHandle() {
return null;
}
}