public class EngineConfiguration extends Object implements com.github.shynixn.petblocks.api.persistence.controller.EngineController
Do not remove this header!
Version 1.0
MIT License
Copyright (c) 2017
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Constructor and Description |
|---|
EngineConfiguration(org.bukkit.plugin.Plugin plugin)
Initializes a new engine repository
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this resource, relinquishing any underlying resources.
|
List<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer> |
getAll()
Returns all items from the repository as unmodifiableList
|
List<com.github.shynixn.petblocks.api.business.entity.GUIItemContainer> |
getAllGUIItems()
Returns all gui items
|
com.github.shynixn.petblocks.api.persistence.entity.EngineContainer |
getById(int id)
Returns the engineContainer with the given id
|
void |
reload()
Reloads the content from the fileSystem
|
void |
remove(com.github.shynixn.petblocks.api.persistence.entity.EngineContainer item)
Removes an item from the repository
|
int |
size()
Returns the amount of items in the repository
|
void |
store(com.github.shynixn.petblocks.api.persistence.entity.EngineContainer item)
Stores a new a item in the repository
|
public EngineConfiguration(org.bukkit.plugin.Plugin plugin)
plugin - pluginpublic void store(com.github.shynixn.petblocks.api.persistence.entity.EngineContainer item)
store in interface com.github.shynixn.petblocks.api.persistence.controller.IController<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer>item - itempublic void remove(com.github.shynixn.petblocks.api.persistence.entity.EngineContainer item)
remove in interface com.github.shynixn.petblocks.api.persistence.controller.IController<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer>item - itempublic int size()
size in interface com.github.shynixn.petblocks.api.persistence.controller.IController<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer>public List<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer> getAll()
getAll in interface com.github.shynixn.petblocks.api.persistence.controller.IController<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer>public com.github.shynixn.petblocks.api.persistence.entity.EngineContainer getById(int id)
getById in interface com.github.shynixn.petblocks.api.persistence.controller.EngineControllerid - idpublic List<com.github.shynixn.petblocks.api.business.entity.GUIItemContainer> getAllGUIItems()
getAllGUIItems in interface com.github.shynixn.petblocks.api.persistence.controller.EngineControllerpublic void reload()
reload in interface com.github.shynixn.petblocks.api.persistence.controller.IFileController<com.github.shynixn.petblocks.api.persistence.entity.EngineContainer>public void close()
throws Exception
try-with-resources statement.
However, implementers of this interface are strongly encouraged
to make their close methods idempotent.close in interface AutoCloseableException - if this resource cannot be closedCopyright © 2017. All rights reserved.