DosMike's Plugins

This topic will be used to announce updates and progress on my plugins.
Feel free to share your opinions on my plugins (are the necessary, how could they be improved, name conflicts, etc)
And I know this is quite a list, but I’m not planning to code them all at one weekend (maybe 2… jk ;D) so it will probably take a long time until they’re done

LaguageSwitch ~~ 60 % |In Progress|
This plugin will be an open API that provides convenient methods to get a translated String
It has a sendMessage(stringID, player) method that sends the message unsing the language a player selected
Implementing the API is just as easy. Create a new PluginTranslation(File default) Instance to automatically load the default file as default language using the system default locale and all languages found (e.g. loading “/strings/translation.txt” will automatically load “/strings/translation-LL.txt” as well where LL is the language tag)
If the plugin instance does not find a translated and default string, it will throw a NoDefaultTranslationException as runtime exception, so you don’t need to catch it.
All my plugins will use this API and it would be really nice if it was added to Sponge

VillagerShop ~~ 0 % |Waiting|
This will be a complete re-code of my Bukkit plugin VillagerShop
It allows you to spawn Villagers that sell up to 8 items using an economy (via Vault) instead of trading. It supports all valid meta tags but was a bit buggy.
This project might become open source, so you can help me with fixing bugs.

EventSounds ~~ 0 % |Waiting|
A plugin providing an API to use custom sounds loaded via a custom ResourcePack.
Some components are included in the plugin: JoinSounds, SaySounds, Admin-SaySounds and QuakeSounds
Note: Due to legal reasons no actual sounds are included, it’s only the plugin providing support for custom sounds
Also this plugin will require that the sponge API is able to send sound event by string, not by enum

MikesAdminPlugin ~~ 0 % |Waiting|
This is a collection of Administrative tools like: Server Polls (Fun, Kick, Timeban), Sign-Editor, Fun Commands (explosion, launch projectile, slapper, etc), MAP-Script (Thought to clean up playerdata, but it didn’t really work :S)

This plugins were planned just before the takedown, so no fix plans on them yet:

A Quest Plugin ~~ 0 % |Delayed|
This is supposed to add event trigger, area and block based
With simple checks e.g. if the player is holding a certain item, has a minimum level and commands like teleport, message, playsound, spawn enemies, …
Also It will have some kind of quest-log (maybe a book or something) to display progress and stats

Some really early stuff ~~ 0 % |Unknown|

  • I planned on a complete solution for something like Altis Life (or rather HL2:RP if someone knows) only depending vault with “build-in-apartment” system
  • A PVP plugin called WarCode - something like WarCraft-Mod for CSS/CS:GO
  • JustFirends would be a simple FL that prevents “friendly fire” and a GUI list
  • Lots of smaller fun plugins …

Waiting: waiting for Sponge to release
Delayed: this will primarily be coded for a friendship server and public realese and updates will be delayed 1 month (currently also waiting)

1 Like

I don’t think this is a reason to not start yet. Their are plenty of things you can do already.
First off all: decouple your plugin from any API. Easily said, you write your plugin without the use of any API and unit test every feature you wanna see.

For example in VillagerShop, You could make an abstract villager class that validates the interaction (just an example I know its not that simple).

This is how I am making my plugin. The plugin package does all the processing. So its only up to me to write some adapters that implement an API to fire up the plugin :).


The first three projects mentioned already exist for Bukkit. Porting them to some template classes to port them to Sponge seems like double work.
As for the other projects you are right, I could start them right away

If you need help, just send me a PM or add me on Skype: robin_debaets

I did it with PlotMe and it took about 5 nights.

@RobiRami thanks for the offer, but I’ll mostly port stuff on my own. Once I’m done I think I’ll put VillagerShop on GitHub or something

@ZachBora I think I got enough time - no need to hurry :slight_smile:

I just wrote a package to evaluate strings like “6/5+52*56-5+8.5”.
This might be usefull to maybe make a /calc command for MAP or allow dynamic values in configs:
String lvlup = "2*$Level*$Level+10"; Double value = new Calculation(lvlup.replaceAll("$Level", playerLevel)).solve().getResult();
or something like that
I know i could also use EvalEx or expr but those are too complex for my needs

This mate, is a pattern :smile:. This double work will help you if you want to patch your plugin to another platform than sponge. So imaging the worst happens and sponge breaks, you have some back-up. To be honest I learned this pattern 5 days ago at school ;).

With all the troubles that happened with bukkit I don’t think its a good idea to target only 1 API. Also with most API’s using annotations to define plugin classes. The creation of multi-plugins is possible. Its just a thought but wouldn’t it be awesome that you could use the same jar on a granite or sponge server? Off course I have to watch out that I don’t get pattern fever xDDD.

@thomas15v PlotMe uses Bridge, Wrapper and maybe some more…

1 Like

Yeah I think the wrapper comes more close in what I try to explain. But I think wrapper and strategy are close to each other. Its hard to generalize this in one pattern… .

Yeah adapter is what I use. The bridge is the class I use when the common code needs to ask things to the implementation
For example bridge.getWorld(String name) returns an object IWorld. In the bukkit implementation it returns a BukkitWorld which is an object implements IWorld and is composed of a Bukkit World.

@thomas15v I see you point.
Even though I don’t think I’m going to port my stuff ever again (At some point I wanna be done) I’ll consider using a strategy pattern. Thanks for the hint.

1 Like

So I just began to write my translation plugin that allows every player to get messages in his language once he set it up using a command.
I think every bigger server should have (something like) this, but I’m still think about a way that let’s plugin devs use the API no matter if the plugin will be installed on the server or not - any idea? I guess the easiest solution would be to provide a bridge-class that checks if the plugin exists. If not, it will load the default translation and use only that.

I think a bridge class would make the most sense. Without, every developer has to check if the plugin exists…

An idea for LanguageSwitch: Just make it new PluginTranslation(this) - every player chooses his language (e.g. with an inventory GUI) and it takes the translation file for this language. Folder structure could be /plugins/LanguageSwitch/translation/ExamplePlugin/de.lng so it automatically loads the files for the plugin and displays the text for each player in his language…
(getTranslation(String, Player) and getTranslation(String); latter one takes the default language from the LanguageSwitch config)
You can also not throw a NoDefaultTranslationException and return the string as it is instead - would make working with the API a lot easier…

Disclaimer: I did not really think about those ideas and how good/doable they are, but I’d love to see this kind of feature… :wink: