https://github.com/spookly-network/spookly-core
Spookly-Core-API is a comprehensive Minecraft API for managing players, teams, game phases, events, and database interactions.
https://github.com/spookly-network/spookly-core
minecraft minecraft-plugin paper-plugin papermc
Last synced: 6 months ago
JSON representation
Spookly-Core-API is a comprehensive Minecraft API for managing players, teams, game phases, events, and database interactions.
- Host: GitHub
- URL: https://github.com/spookly-network/spookly-core
- Owner: Spookly-Network
- License: mit
- Created: 2024-04-09T16:57:44.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T22:48:14.000Z (almost 2 years ago)
- Last Synced: 2025-02-11T13:38:10.121Z (over 1 year ago)
- Topics: minecraft, minecraft-plugin, paper-plugin, papermc
- Language: Java
- Homepage: https://spookly.net
- Size: 220 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spookly Core API
[](LICENSE)

[](https://discord.gg/9bpxXyszCb)
SpooklyCoreAPI is a comprehensive API for managing various aspects of the Spookly system, including players, teams, game phases, events, and more. This API provides interfaces and their implementations for creating and managing complex game systems in a Minecraft environment.
## Features
- Player management (online and offline)
- Team management and display customization
- Game phase management
- Placeholder handling
- Event handling and subscription
- Database connection and operations
## Installation
To use SpooklyCoreAPI in your project, add the following repository and dependency to your pom.xml:
```xml
spookly-repository
Spookly Repository
https://mvn.spookly.net/(releases|snapshots)
de.spookly
SpooklyCoreAPI
1.1.0-SNAPSHOT
```
## Usage
The API provides various interfaces to interact with different components of the Spookly system. Here are some examples of how to use the API:
### Player Management
```java
SpooklyServer server = Spookly.getServer();
UUID playerUUID = // player's UUID
server.getOfflinePlayer(playerUUID, offlinePlayer -> {
// Perform operations with the offline player
});
SpooklyPlayer player = server.getPlayer(playerUUID);
// Perform operations with the online player
```
### Team Management
```java
TeamManager teamManager = server.getTeamManager();
Team team = teamManager.team(playerUUID);
if (team != null) {
team.registerPlayer(player);
}
```
### Event Handling
```java
EventExecuter eventExecuter = server.getEventExecuter();
eventExecuter.register(SomeEvent.class, event -> {
// Handle the event
});
```
### Placeholder
```java
// Adding a placeholder
Placeholder placeholder = new Placeholder("<3", context -> {
Player player = context.getPlayer();
return Component.text("❤ ")
.color(NamedTextColor.RED)
.append(player.displayName());
}, PlaceholderContext.PlaceholderType.CHAT);
server.getPlaceholderManager().registerPlaceholder(placeholder);
// Resolving placeholders
Component shouldResolveIn = Component.text("<3");
PlaceholderContext context = new PlaceholderContext(source, PlaceholderContext.PlaceholderType.CHAT);
server.getPlaceholderManager().replacePlaceholder(shouldResolveIn, context);
```
## Contributing
We welcome contributions to SpooklyCoreAPI! Here's how you can contribute:
1. Fork the repository.
2. Create a new branch for your feature or bugfix (git checkout -b feature-name).
3. Make your changes and commit them (git commit -m 'Add new feature').
4. Push your changes to your fork (git push origin feature-name).
5. Create a pull request with a description of your changes.
### Code Style
Please follow the existing code style and conventions when contributing. Ensure your code is properly documented with Javadoc comments.
### Reporting Issues
If you encounter any issues or bugs, please report them on the GitHub issues page. Provide as much detail as possible, including steps to reproduce the issue and any relevant code snippets.
## License
SpooklyCoreAPI is licensed under the MIT License. See the LICENSE file for more information.
Made with ❤️ by the Spookly Network team.