forked from clone/WorldGuardWrapper
		
	Add documentation
This commit is contained in:
		
							parent
							
								
									c2414fd23e
								
							
						
					
					
						commit
						71eb53c38f
					
				|  | @ -10,15 +10,54 @@ import lombok.NonNull; | ||||||
| 
 | 
 | ||||||
| public interface IWorldGuardImplementation { | public interface IWorldGuardImplementation { | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * Get an instance of the WorldGuardPlugin class | ||||||
|  |      *  | ||||||
|  |      * @return The WorldGuard plugin | ||||||
|  |      */ | ||||||
|     JavaPlugin getWorldGuardPlugin(); |     JavaPlugin getWorldGuardPlugin(); | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * Get the API version of the loaded WorldGuard plugin (e.g. 6 or 7). | ||||||
|  |      *  | ||||||
|  |      * @return The API version | ||||||
|  |      */ | ||||||
|     int getApiVersion(); |     int getApiVersion(); | ||||||
| 
 | 
 | ||||||
|     Optional<Boolean> queryStateFlag(Player player, @NonNull Location location, @NonNull String flagId); |     /** | ||||||
|  |      * Query a StateFlag's value for a given player at a given location. | ||||||
|  |      *  | ||||||
|  |      * @param player   The player | ||||||
|  |      * @param location The location | ||||||
|  |      * @param flag     The flag's name  | ||||||
|  |      * @return The flag's value | ||||||
|  |      */ | ||||||
|  |     Optional<Boolean> queryStateFlag(Player player, @NonNull Location location, @NonNull String flagName); | ||||||
| 
 | 
 | ||||||
|     boolean registerStateFlag(@NonNull String flagId, @NonNull Boolean defaultValue); |     /** | ||||||
|  |      * Register a {@code StateFlag}. | ||||||
|  |      *  | ||||||
|  |      * @param flagName     The name of the flag | ||||||
|  |      * @param defaultValue The flag's default value | ||||||
|  |      * @return Whether the flag has been registered | ||||||
|  |      */ | ||||||
|  |     boolean registerStateFlag(@NonNull String flagName, @NonNull Boolean defaultValue); | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * Query a flag's value for a given player at a given location. | ||||||
|  |      *  | ||||||
|  |      * @param player   The player | ||||||
|  |      * @param location The location | ||||||
|  |      * @param flag     The flag | ||||||
|  |      * @return The flag's value | ||||||
|  |      */ | ||||||
|     <T> Optional<T> queryFlag(Player player, @NonNull Location location, @NonNull AbstractFlag<T> flag); |     <T> Optional<T> queryFlag(Player player, @NonNull Location location, @NonNull AbstractFlag<T> flag); | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * Register a flag to WorldGuard's flag registry. | ||||||
|  |      *  | ||||||
|  |      * @param flag The flag to register | ||||||
|  |      * @return Whether the flag has been registered | ||||||
|  |      */ | ||||||
|     <T> boolean registerFlag(@NonNull AbstractFlag<T> flag); |     <T> boolean registerFlag(@NonNull AbstractFlag<T> flag); | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user