Start implementing new Flag system.

This commit is contained in:
MattBDev
2016-04-19 16:59:10 -04:00
parent d3dd88eb8d
commit aaf9511673
65 changed files with 1679 additions and 1322 deletions

View File

@ -385,18 +385,6 @@ public class PlotAPI {
FlagManager.addFlag(flag);
}
/**
* get all the currently registered flags.
*
* @return array of Flag[]
*
* @see FlagManager#getFlags()
* @see AbstractFlag
*/
public AbstractFlag[] getFlags() {
return FlagManager.getFlags().toArray(new AbstractFlag[FlagManager.getFlags().size()]);
}
/**
* Get a plot based on the ID.
*
@ -663,7 +651,7 @@ public class PlotAPI {
if (world == null) {
return new HashSet<>();
}
return BukkitUtil.getPlayer(player).getPlots(world.getName());
return PlotPlayer.wrap(player).getPlots(world.getName());
}
/**
@ -675,7 +663,7 @@ public class PlotAPI {
*
*/
public int getAllowedPlots(Player player) {
PlotPlayer pp = BukkitUtil.getPlayer(player);
PlotPlayer pp = PlotPlayer.wrap(player);
return pp.getAllowedPlots();
}