Skip to content

Instantly share code, notes, and snippets.

View maxov's full-sized avatar

Max Ovsiankin maxov

View GitHub Profile

Commands use-cases

So in thinking through the use-cases of commands w.r.t. Sponge I came uo with an algorithm for dealing with /command word conflicts.

I'm going to gloss over a few details that prepare the data structures in Sponge that hold information about the mapping of "command" to "plugin" off for a moment. I have another idea there... but for the problem scope limited to just de-conflicting:

Imagine each plugin is a node in a BST (binary search tree).

public interface Sender {
String getName()
void say(Message message);
}
public interface Reciever {
@maxov
maxov / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console