Add more documentation to validator plugins (#146)

This commit is contained in:
TechnicallyCoded
2023-06-12 15:05:10 +02:00
committed by GitHub
parent 1126518121
commit de09261461
3 changed files with 12 additions and 0 deletions

View File

@@ -106,6 +106,10 @@ public class RTPPlayer {
getPl().getpInfo().getRtping().put(p, false);
}
/**
* @param loc Location to check
* @return True if the location is valid
*/
public static boolean checkDepends(Location loc) {
return RTPPluginValidation.checkLocation(loc);
}

View File

@@ -5,6 +5,10 @@ import org.bukkit.Location;
public class RTPPluginValidation {
/**
* @param loc Location to check
* @return True if valid location
*/
public static boolean checkLocation(Location loc) {
for (REGIONPLUGINS validators : REGIONPLUGINS.values())
if (!validators.getValidator().check(loc))

View File

@@ -4,6 +4,10 @@ import org.bukkit.Location;
public interface RegionPluginCheck {
/**
* @param loc Location to check
* @return True if valid teleport location, false if the location is claimed and invalid
*/
boolean check(Location loc);
}