how to check if the server is running paper spigot code example
Example: How to check server version bukkit spigot paper
if (Bukkit.getVersion().contains("1.8.1")) {
//stuff
}
if (Bukkit.getVersion().contains("1.8.1")) {
//stuff
}