We need more example plugins! Ideas?

I got a couple of private messages related to the example mail plugin I made. It seems like simple plugins like that are the best learning resource.

There are a few example plugins in the Sponge Cookbook project, but I think that those are too complex or not really useful.

I want to make more example plugins. If anyone else is interested, we can create a GitHub organization for it to bundle the projects in one place.

Ideas I have so far:

  • Smite plugin
  • Auto messeger
  • Welcome message
  • /lastseen command
  • Bukkit example plugins
    • Moon world generator
    • /home plugin

Do you have other ideas? It would be great if we could cover every part of the API.

I rather think PRs with the project to the Cookbook would be a more sensible solution.

2 Likes

I don’t like the cookbook for 2 reasons:

First, it is too hidden and the subproject layout I difficult to understand. It is easier to download and modify a standalone project.

Also, I tend to make small changes (API updates etc.). I don’t want to create a PR for every little change.

I’m not against adding the final plugins to the Cookbook. A separate organization will also not hurt anyone, but just increase the view count :wink:

Could you make a simple configurable inventory menu? The inventory API seems powerful, but I have no idea how to use it to create GUI’s without accidentally letting the players get the items that are used as icons.

Something using persistent metadata for entities / players / blocks.

An example of how to use selectors efficiently and powerfully.

Spawning pretty particle effects.

Per player effects, stuff that only a single player can see / vanish / fake blocks

Manipulating the new action bar, wither boss bar, item name bar, and whatever other UI elements that can be abused.

Create a recipe, delete a recipe, modify a recipe.

Something to do with permissions maybe?

Resource pack forcing (This is super easy, I LOVE IT!)

Making certain blocks do stuff (Standing on Redstone gives you speed)

Something to do with detecting Redstone. One-Block gates?

2 Likes

perhaps ->

  • /setspawn and /spawn
  • teleport /tp
  • /mute and /unmute
1 Like

something utilizing portals or teleports would be nice.
I’m thinking of custom portals or setting teleport destinations via chat/commands.

2 Likes

The obvious answer: unittest.jar, a Unit Test plugin for Sponge! I believe every single program in any language should have one! It simply tests every feature of a program or library. This is especially helpful for diagnostics, but then again you could just make a unit test with jUnit.

1 Like

Just FYI re. testing plugins, see this discussion.