mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-10-25 21:40:05 +00:00
Add more documentation to validator plugins (#146)
This commit is contained in:
1 parent
1126518121
commit
de09261461
3 files changed
+12
No files matched your search
@@ -106,6 +106,10 @@ public class RTPPlayer {
|
|||||||
getPl().getpInfo().getRtping().put(p, false);
|
getPl().getpInfo().getRtping().put(p, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param loc Location to check
|
||||||
|
* @return True if the location is valid
|
||||||
|
*/
|
||||||
public static boolean checkDepends(Location loc) {
|
public static boolean checkDepends(Location loc) {
|
||||||
return RTPPluginValidation.checkLocation(loc);
|
return RTPPluginValidation.checkLocation(loc);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,10 @@ import org.bukkit.Location;
|
|||||||
|
|
||||||
public class RTPPluginValidation {
|
public class RTPPluginValidation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param loc Location to check
|
||||||
|
* @return True if valid location
|
||||||
|
*/
|
||||||
public static boolean checkLocation(Location loc) {
|
public static boolean checkLocation(Location loc) {
|
||||||
for (REGIONPLUGINS validators : REGIONPLUGINS.values())
|
for (REGIONPLUGINS validators : REGIONPLUGINS.values())
|
||||||
if (!validators.getValidator().check(loc))
|
if (!validators.getValidator().check(loc))
|
||||||
|
|||||||
+4
@@ -4,6 +4,10 @@ import org.bukkit.Location;
|
|||||||
|
|
||||||
public interface RegionPluginCheck {
|
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);
|
boolean check(Location loc);
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user