mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-02-16 02:21:06 +00:00
Add more documentation to validator plugins (#146)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user