mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Small documentation fixes
This commit is contained in:
parent
dc0358957e
commit
4d61a345c6
@ -164,7 +164,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean hasPermission(final String permission) {
|
@Override public boolean hasPermission(@NotNull final String permission) {
|
||||||
if (this.offline && EconHandler.getEconHandler() != null) {
|
if (this.offline && EconHandler.getEconHandler() != null) {
|
||||||
return EconHandler.getEconHandler().hasPermission(getName(), permission);
|
return EconHandler.getEconHandler().hasPermission(getName(), permission);
|
||||||
}
|
}
|
||||||
@ -231,7 +231,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean isPermissionSet(final String permission) {
|
@Override public boolean isPermissionSet(@NotNull final String permission) {
|
||||||
return this.player.isPermissionSet(permission);
|
return this.player.isPermissionSet(permission);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,6 +29,10 @@ import com.plotsquared.core.configuration.Caption;
|
|||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Any entity that is able to execute commands, receive messages & and have
|
||||||
|
* permission nodes
|
||||||
|
*/
|
||||||
public interface CommandCaller {
|
public interface CommandCaller {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -44,9 +48,22 @@ public interface CommandCaller {
|
|||||||
*
|
*
|
||||||
* @param permission the name of the permission
|
* @param permission the name of the permission
|
||||||
*/
|
*/
|
||||||
boolean hasPermission(String permission);
|
boolean hasPermission(@NotNull String permission);
|
||||||
|
|
||||||
boolean isPermissionSet(String permission);
|
/**
|
||||||
|
* Checks if this object contains an override for the specified
|
||||||
|
* permission, by fully qualified name
|
||||||
|
*
|
||||||
|
* @param permission Name of the permission
|
||||||
|
* @return true if the permission is set, otherwise false
|
||||||
|
*/
|
||||||
|
boolean isPermissionSet(@NotNull String permission);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the type of the caller
|
||||||
|
*
|
||||||
|
* @return Caller type
|
||||||
|
*/
|
||||||
|
@NotNull RequiredType getSuperCaller();
|
||||||
|
|
||||||
RequiredType getSuperCaller();
|
|
||||||
}
|
}
|
||||||
|
@ -99,11 +99,11 @@ public class ConsolePlayer extends PlotPlayer<Actor> {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean hasPermission(String permission) {
|
@Override public boolean hasPermission(@NotNull String permission) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public boolean isPermissionSet(String permission) {
|
@Override public boolean isPermissionSet(@NotNull String permission) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +137,7 @@ public class ConsolePlayer extends PlotPlayer<Actor> {
|
|||||||
@Override public void removeAttribute(String key) {
|
@Override public void removeAttribute(String key) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public RequiredType getSuperCaller() {
|
@Override @NotNull public RequiredType getSuperCaller() {
|
||||||
return RequiredType.CONSOLE;
|
return RequiredType.CONSOLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer,
|
|||||||
return PlotSquared.get().getApplicablePlotArea(getLocation());
|
return PlotSquared.get().getApplicablePlotArea(getLocation());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public RequiredType getSuperCaller() {
|
@Override @NotNull public RequiredType getSuperCaller() {
|
||||||
return RequiredType.PLAYER;
|
return RequiredType.PLAYER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user