I hereby claim:
- I am DemonWav on github.
- I am demonwav (https://keybase.io/demonwav) on keybase.
- I have a public key whose fingerprint is 272E 7C6E B6D0 35DD 9AD9 1A89 7F10 FBC6 0AAB 6609
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| /* | |
| * StatCraft Bukkit Plugin | |
| * | |
| * Copyright (c) 2015 Kyle Wood (DemonWav) | |
| * http://demonwav.com | |
| * | |
| * MIT License | |
| */ | |
| package com.demonwav.statcraft.listeners; |
| #!/bin/bash | |
| SUCCESS="$1" ; USERNAME="$2" | |
| HOSTNAME="$3" ; DIR="$4" | |
| RED="$(tput setaf 1)" ; GREEN="$(tput setaf 2)" ; BLUE="$(tput setaf 4)" | |
| CYAN="$(tput setaf 6)" ; YELLOW="$(tput setaf 3)" ; WHITE="$(tput setaf 7)" | |
| DIM="$(tput dim)" ; RESET="$(tput sgr0)" | |
| IS_GIT="$(git rev-parse --is-inside-work-tree 2>/dev/null)" |
| plugin.getServer().getScheduler().runTask(plugin, new Runnable() { | |
| @Override | |
| public void run() { | |
| final String response = command.playerStatResponse(player, secondaryArgsList); | |
| if (finalPublicCmd) { | |
| String endResponse = ChatColor.valueOf(plugin.config().colors.public_identifier) | |
| + "@" + sender.getName() + ChatColor.WHITE + ": " + response; | |
| plugin.getServer().broadcastMessage(endResponse); | |
| } else { |
| <dependency> | |
| <groupId>${project.groupId}</groupId> | |
| <artifactId>spigot</artifactId> | |
| <version>${project.version}</version> | |
| <scope>system</scope> | |
| <systemPath>${project.basedir}/spigot-1.8.8.jar</systemPath> | |
| </dependency> |
| switch (e.getMessage()) { | |
| case "empty": | |
| message = "<html>Please fill in all required fields</html>"; | |
| break; | |
| case "bad": | |
| message = "<html>Please enter author and plugin names as a comma separated list</html>"; | |
| break; | |
| default: | |
| message = "<html>Unknown Error</html>"; | |
| break; |
| public static String encode(String input) { | |
| StringBuilder resultStr = new StringBuilder(); | |
| for (char ch : input.toCharArray()) { | |
| if (isUnsafe(ch)) { | |
| resultStr.append('%'); | |
| resultStr.append(toHex(ch / 16)); | |
| resultStr.append(toHex(ch % 16)); | |
| } else { | |
| resultStr.append(ch); | |
| } |
| public static String getWeather(String loc) throws IOException { | |
| String city; | |
| String state; | |
| String temp; | |
| String humidity; | |
| String wind; | |
| String conditions; | |
| try { | |
| String json = getTextFromUrl(new URL("/* super secret API key stuff */" + encode(loc) + ".json")); |
| private Position getPosition(JLabel label) { | |
| // This method is proof I am an idiot | |
| String text = ""; | |
| Class<BoardGUI> clazz = BoardGUI.class; | |
| Field[] fields = clazz.getDeclaredFields(); | |
| for (Field field : fields) { | |
| if (field.getDeclaringClass() == JLabel.class) { | |
| try { | |
| if (field.get(this) == label) { |
| public static boolean hasMoreVowels(String s) { | |
| if (s.length() == 1) | |
| return "aeiou".contains(s); | |
| boolean removedVowel = false; | |
| boolean removedCons = false; | |
| StringBuilder sb = new StringBuilder(); | |
| for (int i = 0; i < s.length(); i++) { | |
| if ("aeiou".contains(s.substring(i, i + 1))) { | |
| if (!removedVowel) { |