summaryrefslogtreecommitdiffstats
path: root/Essentials/src/net/ess3/api/IWarps.java
blob: 48bc6cd61d7aca240a4b2f70e9ac027de90eba20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package net.ess3.api;

import java.io.File;
import java.util.Collection;
import org.bukkit.Location;


public interface IWarps extends IReload
{
	/**
	 * Get a warp by name
	 *
	 * @param warp - Warp name
	 * @return - Location the warp is set to
	 * @throws Exception
	 */
	Location getWarp(String warp) throws Exception;

	/**
	 * Gets a list of warps
	 *
	 * @return - A {@link Collection} of warps
	 */
	Collection<String> getList();

	/**
	 * Delete a warp from the warp DB
	 *
	 * @param name - Name of warp
	 * @throws Exception
	 */
	void removeWarp(String name) throws Exception;

	/**
	 * Set a warp
	 *
	 * @param name - Name of warp
	 * @param loc  - Location of warp
	 * @throws Exception
	 */
	void setWarp(String name, Location loc) throws Exception;

	/**
	 * Check to see if the file is empty
	 *
	 * @return
	 */
	public boolean isEmpty();

	/**
	 * Get a warp file
	 *
	 * @param name - name of file
	 * @return - an instance of the file
	 * @throws InvalidNameException - When the file is not found
	 */
	public File getWarpFile(String name) throws InvalidNameException;
}