This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NumUtils { | |
public static Integer parseInt(String str, Integer def) { | |
try { | |
return Integer.parseInt(str); | |
} catch (NumberFormatException e) { | |
return def; | |
} | |
} | |
public static Double parseDouble(String str, Double def) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GUI implements Listener { | |
private UUID id; | |
@EventHandler | |
public void onDoAThing(InventoryClickEvent e) { | |
Inventory menu = e.getInventory(); | |
ItemStack nm = menu.getItem(0); | |
if (nm.getItemMeta().getDisplayName().equalsIgnoreCase(name)) { | |
e.setCancelled(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
JAR=server.jar | |
MAX=6144M | |
MIN=512M | |
while getopts ":j:x:s" opt; do | |
case $opt in | |
j) | |
JAR=${OPTARG} | |
;; |