Implement missing methods in tests

This commit is contained in:
dordsor21 2022-02-12 13:38:04 +00:00
parent 646a683f22
commit de4f73997e
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
2 changed files with 36 additions and 0 deletions

View File

@ -33,6 +33,7 @@ import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.entity.SpawnCategory;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.help.HelpMap;
@ -262,6 +263,11 @@ public class StubServer implements Server {
return 0;
}
@Override
public int getTicksPerSpawns(@NotNull final SpawnCategory spawnCategory) {
return 0;
}
@Override
public @Nullable
Player getPlayer(@NotNull String s) {
@ -557,6 +563,24 @@ public class StubServer implements Server {
return null;
}
@Override
public org.bukkit.profile.@NotNull PlayerProfile createPlayerProfile(
@Nullable final UUID uniqueId,
@Nullable final String name
) {
return null;
}
@Override
public org.bukkit.profile.@NotNull PlayerProfile createPlayerProfile(@NotNull final UUID uniqueId) {
return null;
}
@Override
public org.bukkit.profile.@NotNull PlayerProfile createPlayerProfile(@NotNull final String name) {
return null;
}
@Override
public @NotNull
Set<String> getIPBans() {
@ -744,6 +768,11 @@ public class StubServer implements Server {
return 0;
}
@Override
public int getSpawnLimit(@NotNull final SpawnCategory spawnCategory) {
return 0;
}
@Override
public boolean isPrimaryThread() {
return false;

View File

@ -30,6 +30,8 @@ import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
import org.bukkit.permissions.PermissionAttachmentInfo;
import org.bukkit.plugin.Plugin;
import org.bukkit.profile.PlayerProfile;
import org.jetbrains.annotations.NotNull;
import javax.annotation.Nonnull;
import java.util.HashMap;
@ -146,6 +148,11 @@ public class TestOfflinePermissible implements OfflinePlayer, Permissible {
return randomUuid;
}
@Override
public @NotNull PlayerProfile getPlayerProfile() {
return null;
}
@Override
public boolean isBanned() {
throw new UnsupportedOperationException("Not supported yet.");