Giter Club home page Giter Club logo

cookbook's Introduction

Cookbook

SpongeAPI munchy crunchy delicious recipes

This is the repository for the collection of Sponge recipes.

Code modules, fully functional that demonstrate working are placed here one directory per Project.

Intent is that each project is a stand-alone "Plugin" that can be compiled via gradle/mvn and imported into the IDE.

If you want a brief introduction to Sponge by code, you can check out the plugins in a specific order which will describe how stuff works.

  • SimpleFireball - Basics of Sponge, events, text, data and other
  • Flardians - Stacks, and data
  • ConfigDatabase - How to use configs
  • MyHomes (Incomplete) - How to use custom data

In addition you can check out some of the more complex

  • HelloFromKotlin - How to use Kotlin with Sponge
  • ScalaFireball - How to use Scala with Sponge

cookbook's People

Contributors

aaron1011 avatar bloodmc avatar ddos avatar deamon5550 avatar eternalcode0 avatar ferusgrim avatar gabizou avatar kashike avatar katrix avatar kenneaal avatar meronat avatar parlough avatar phroa avatar simon816 avatar stephan-gh avatar zephirenz avatar zidane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookbook's Issues

Custom Data Plugin

Now that the Data API is reasonably stable, and the data abstractions from common have made it into the main api, a plugin should be written that shows usage of custom data. I know this kind of example would be very useful to me., and I'm sure many others would benefit as well. I think that, in general, the example should include:

  • Single data (both primitive, and string-convertible)
  • Multi-Data
  • Everything required to make the data "work" and be serialized/peristent

(I would write it myself, but I would need some sort of example plugin to follow before I got the hang of it)

Add a README to each example project.

It will give a short explanation to what the project does and anything it implements (Usage of commands in WorldTest, using schedulers in SchedulerTest, etc.)

Simple permission plugin

There should be a simple reference plugin that provides the permission service.

  • Store permissions in hocon config
  • Reload command (no ingame permission modification)
  • Basic group support?
  • Dimension and World context (or combination of both)

API + Implementation Gradle Multiproject

It would be great to have a "boilerplate" for plugins with a separate API.
The plugin should contain a simple service interface and an implementation. This way we can also show how to register and use custom services.

Structure:

  • Project: notification
    • Subproject: notification-api
      • Interface: NotificationService
    • Subproject: notification-sponge
      • Class: NotificationPlugin
      • Class: SimpleNotificationService

The plugin displays a notification to players when they login.

They can mark the notification as read with /notification clear.
Admins can set the notification with /notification set <msg> or delete it with /notification delete.
The command uses the SimpleDispatcher class for subcommands.

Other plugins can get the NotificationService from the service manager and modify the notification. Plugins can also set an expiration date for the notification.

For simplicity, the notification is not persistent when the server restarts.

Right now I don't have the time to work on this, that's why I created this issue as a reminder. If you want to work on this, go ahead...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.