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.configuration;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Various settings for controlling the input and output of a {@link
|
||||
* Configuration}
|
||||
@@ -9,7 +11,7 @@ public class ConfigurationOptions {
|
||||
private boolean copyDefaults = false;
|
||||
private final Configuration configuration;
|
||||
|
||||
protected ConfigurationOptions(Configuration configuration) {
|
||||
protected ConfigurationOptions(@NotNull Configuration configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
@@ -18,6 +20,7 @@ public class ConfigurationOptions {
|
||||
*
|
||||
* @return Parent configuration
|
||||
*/
|
||||
@NotNull
|
||||
public Configuration configuration() {
|
||||
return configuration;
|
||||
}
|
||||
@@ -45,6 +48,7 @@ public class ConfigurationOptions {
|
||||
* @param value Path separator
|
||||
* @return This object, for chaining
|
||||
*/
|
||||
@NotNull
|
||||
public ConfigurationOptions pathSeparator(char value) {
|
||||
this.pathSeparator = value;
|
||||
return this;
|
||||
@@ -83,6 +87,7 @@ public class ConfigurationOptions {
|
||||
* @param value Whether or not defaults are directly copied
|
||||
* @return This object, for chaining
|
||||
*/
|
||||
@NotNull
|
||||
public ConfigurationOptions copyDefaults(boolean value) {
|
||||
this.copyDefaults = value;
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user