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 static void setSkin(Player target, final String sourceName) { | |
if(TextHelper.isEmpty(sourceName)) { | |
LogHelper.warning("[SkinHelper] setSkin(): Invalid sourceName."); | |
return; | |
} else if(target == null) { | |
LogHelper.warning("[SkinHelper] setSkin(): Invalid target."); | |
return; | |
} | |
final UUID targetUUID = target.getUniqueId(); | |
TaskManager.get().runPlugin(() -> { |
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 static List<Vector> rotateX(List<Vector> vectors, double degrees) { | |
List<Vector> result = new ArrayList<>(vectors.size()); | |
double cos = Math.cos(Math.toRadians(degrees)); | |
double sin = Math.sin(Math.toRadians(degrees)); | |
for (Vector target : vectors) { | |
result.add(new Vector( | |
target.getX(), | |
cos * target.getY() - sin * target.getZ(), | |
sin * target.getY() + cos * target.getZ())); | |
} |
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
[00:16:12] [Server thread/INFO]: [{"text":" /","color":"gray","bold":"true"},{"text":"bname","color":"green","bold":"true","clickEvent":{"action":"suggest_command","value":"/bname"},"hoverEvent":{"action":"show_text","value":"Set the name of the boss bar."}},{"text":" <String>","color":"green"}] |
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
package com.gmail.mooman219.api.text; | |
import gnu.trove.map.hash.TCharIntHashMap; | |
import java.util.List; | |
import org.bukkit.ChatColor; | |
public class TextRenderHelper { | |
private static final TCharIntHashMap charWidths = new TCharIntHashMap(120, 0.5f, '0', -1); |
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
[03:08:01] [Server thread/ERROR]: Could not load 'plugins\Framework-SNAPSHOT-LOCALBUILD.jar' in folder 'plugins' | |
org.bukkit.plugin.InvalidPluginException: java.lang.IllegalStateException: JavaPlugin requires org.bukkit.plugin.java.PluginClassLoader | |
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1592] | |
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:329) ~[spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1592] | |
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:251) [spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1592] | |
at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.java:369) [spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1592] | |
at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.java:152) [spigot-1.7.10-R0.1-SNAPSHOT.jar:git-Spigot-1592] | |
at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:458) [spigot-1.7.10-R0.1-SNAPSHOT.jar:g |
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
package test; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.util.zip.GZIPInputStream; | |
import java.util.zip.GZIPOutputStream; | |
public class Test { |
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
package test; | |
public class Test { | |
public static void main(String[] args) { | |
Sale sale = new Sale(58); | |
System.out.println(sale.toString()); | |
} | |
public static class Sale { |
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
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Scanner; | |
public class Read { | |
// Scanner used for taking user input. | |
private static Scanner scanner = new Scanner(System.in); |
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 Mortgage { | |
private double annualInterestRate; | |
private int numberOfYears; | |
private double loanAmount; | |
public Morgage() { | |
this(0.085, 10, 10000); | |
} |
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
/** | |
* @author Joseph Cumbo (mooman219) | |
*/ | |
public class Unsigned { | |
public static void main(String[] args) { | |
int test = Integer.MAX_VALUE; | |
System.out.printf("0x%1$8X or %1$d\n", test); | |
test++; | |
System.out.printf("0x%1$8X or %1$d\n", test); |
OlderNewer