Package org.mctourney.autoreferee

Examples of org.mctourney.autoreferee.AutoReferee


  }

  @Override
  public boolean onCommand(CommandSender sender, Command command, String label, String[] args)
  {
    AutoReferee plugin = AutoReferee.getInstance();

    World world = plugin.getSenderWorld(sender);
    AutoRefMatch match = plugin.getMatch(world);

    // reparse the args properly using the string tokenizer from org.apache.commons
    args = new StrTokenizer(StringUtils.join(args, ' '), StrMatcher.splitMatcher(),
      StrMatcher.quoteMatcher()).setTrimmerMatcher(StrMatcher.trimMatcher()).getTokenArray();
View Full Code Here


{
  private static final String ENCODING = "UTF-8";

  public static String getUserAgent()
  {
    AutoReferee instance = AutoReferee.getInstance();
    String pluginName = instance.getDescription().getFullName();
    return String.format("%s (%s)", pluginName, instance.getCommit());
  }
View Full Code Here

    {
      URL url = new URL(getParams == null ? path : String.format("%s?%s", path, getParams));
      HttpURLConnection conn = (HttpURLConnection) url.openConnection();
      conn.setDoOutput(true);

      AutoReferee instance = AutoReferee.getInstance();
      String pluginName = instance.getDescription().getFullName();
      conn.setRequestProperty("User-Agent", String.format("%s (%s)", pluginName, instance.getCommit()));

      if (method != null)
      {
        conn.setRequestMethod(method);
        conn.addRequestProperty("Content-Type", "application/x-www-form-urlencoded");
View Full Code Here

TOP

Related Classes of org.mctourney.autoreferee.AutoReferee

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.