-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
37 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,51 @@ | ||
package com.ryandw11.structure.api; | ||
|
||
import com.ryandw11.structure.CustomStructures; | ||
import com.ryandw11.structure.loottables.LootTablesHandler; | ||
import com.ryandw11.structure.loottables.customitems.CustomItemManager; | ||
import com.ryandw11.structure.structure.StructureHandler; | ||
|
||
public class CustomStructuresAPI { | ||
|
||
private CustomStructures plugin; | ||
public CustomStructuresAPI(){ | ||
this.plugin = CustomStructures.plugin; | ||
} | ||
|
||
|
||
public CustomStructures getMainInstance() { | ||
return CustomStructures.plugin; | ||
return plugin; | ||
} | ||
|
||
/** | ||
* Get the number of structures. | ||
* @return The number of structures. | ||
*/ | ||
public int getNumberOfStructures() { | ||
return CustomStructures.getInstance().getStructureHandler().getStructures().size(); | ||
return getStructureHandler().getStructures().size(); | ||
} | ||
|
||
/** | ||
* Get the structure handler. | ||
* @return The structure handler. | ||
*/ | ||
public StructureHandler getStructureHandler(){ | ||
return plugin.getStructureHandler(); | ||
} | ||
|
||
/** | ||
* Get the loot table handler. | ||
* @return The loot table handler. | ||
*/ | ||
public LootTablesHandler getLootTableHandler(){ | ||
return plugin.getLootTableHandler(); | ||
} | ||
|
||
/** | ||
* Get the custom item manager. | ||
* @return The custom item manager. | ||
*/ | ||
public CustomItemManager getCustomItemManager(){ | ||
return plugin.getCustomItemManager(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters