Skip to content

Instantly share code, notes, and snippets.

View Wolvereness's full-sized avatar

Wesley Wolfe Wolvereness

View GitHub Profile
@Wolvereness
Wolvereness / gist:3711588
Created September 13, 2012 03:11 — forked from pschichtel/gist:2795651
full annotated command
@Alias( // specifies an alias command for this command
names = {"aliasCOmmand", "shorter"}, // the alias names, first is the main name
parentPath = {"root","sub", "subsub"} // optional: the command path under which the alias should be registered (default: root)
)
@Command( // annotates the method as a command and provides all needed information
names = {"mycommand", "myalias"}, // command names, first is the main name
min = 2, // optional: the minimum number of indexed parameters
max = 7, // optional: the maximum number of indexed parameters
permission = true, // optional: whether to check a permission (default: true)
permissionNode = "my.permission.node" // optional: the permission to check, will be generated if not given

Bukkit Vanilla Command Inconsistencies

This is a list of known quirks and inconsistencies in Bukkit and CraftBukkit's handling of "vanilla" commands.

Broken Commands

The following commands simply do not behave properly on Bukkit. This isn't a matter of not being implemented - these commands have been implemented, but do not work properly.

  • spreadplayers - this command actually fails for a large number of reasons. Its most glaring flaw is that it declares 'world = null', and does not attempt to change this because the condition to set 'world' is 'if (world != null)' (surprisingly, Eclipse does not generate an "unreachable code" warning for this). This actually simply prevents the command from doing anything whatsoever. Other issues with this command include mishandling of PlayerSelectors (failing to actually meet any constraints), lacking a failure condition for too many players to m
var room = 37671;
$J.post(
'http://steamcommunity.com/minigame/ajaxleavegame/',
{ 'gameid' : '43089', 'sessionid' : g_sessionID }
);
var trying = false;
function tryJoin() {
if (!trying) {
trying = true;
JoinGameHelper(room);