This error is quite odd. It says " Syntax error on token ";", Expression expected after this token" after World w = p.getWorld(); So I deleted it. Then the variable above this had the same error as before. Which is Server s = p.getServer();
The problem is with [MinecartToolbox] Thats not a valid expression. The '[' and ']' are special characters, you can't use then like that. You could do MinecartToolbox[] if MinecartToolbox was an array (Though you'd still need to precede it with a type).