mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-14 19:34:43 +02:00
Fixed a heckload of warnings
This commit is contained in:
@ -42,11 +42,14 @@ import java.util.Set;
|
||||
@SuppressWarnings({"unused", "javadoc"})
|
||||
public class PlotAPI {
|
||||
|
||||
/**
|
||||
* Admin Permission
|
||||
*/
|
||||
public static final String ADMIN_PERMISSION = "plots.admin";
|
||||
private static PlotHelper plotHelper;
|
||||
private static PlayerFunctions playerFunctions;
|
||||
private static FlagManager flagManager;
|
||||
private static SchematicHandler schematicHandler;
|
||||
private static C c;
|
||||
|
||||
// Methods/fields in PlotMain class
|
||||
|
||||
@ -63,15 +66,21 @@ public class PlotAPI {
|
||||
// PlotMain.removePlot(world, id, callEvent)
|
||||
// PlotMain.teleportPlayer(player, from, plot)
|
||||
// PlotMain.updatePlot(plot);
|
||||
private static C c;
|
||||
|
||||
// Reference
|
||||
// To access plotMain stuff.
|
||||
private final PlotMain plotMain;
|
||||
|
||||
// Reference
|
||||
/**
|
||||
* Admin Permission
|
||||
* Constructor. Insert any Plugin.
|
||||
* (Optimally the plugin that is accessing the method)
|
||||
*
|
||||
* @param plugin Plugin used to access this method
|
||||
*/
|
||||
public static final String ADMIN_PERMISSION = "plots.admin";
|
||||
public PlotAPI(final JavaPlugin plugin) {
|
||||
this.plotMain = JavaPlugin.getPlugin(PlotMain.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all plots
|
||||
@ -122,16 +131,6 @@ public class PlotAPI {
|
||||
return PlotMain.storage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor. Insert any Plugin.
|
||||
* (Optimally the plugin that is accessing the method)
|
||||
*
|
||||
* @param plugin Plugin used to access this method
|
||||
*/
|
||||
public PlotAPI(final JavaPlugin plugin) {
|
||||
this.plotMain = JavaPlugin.getPlugin(PlotMain.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the main class for this plugin <br>
|
||||
* - Contains a lot of fields and methods - not very well organized <br>
|
||||
@ -288,7 +287,7 @@ public class PlotAPI {
|
||||
* @return array of Flag[]
|
||||
*/
|
||||
public AbstractFlag[] getFlags() {
|
||||
return FlagManager.getFlags().toArray(new AbstractFlag[0]);
|
||||
return FlagManager.getFlags().toArray(new AbstractFlag[FlagManager.getFlags().size()]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user