Skip to content

Commit

Permalink
v1.0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
ZombieStriker authored Mar 23, 2018
1 parent d71898e commit 830bf5b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.0.29
Fixed Java9 JavaX import

1.0.28
Fixed updater time-out error.

Expand Down
2 changes: 1 addition & 1 deletion plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
main: me.zombie_striker.pixelprinter.PixelPrinter
version: 1.0.27
version: 1.0.29
name: PixelPrinter
commands:
PixelPrinter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class GithubDependDownloader {
* json.get("tag_name").getAsString();
*
* String finalTagName = tagName.replace(".", ""); int latestVersion =
* Integer.parseInt(finalTagName.substring(1, finalTagName.length()));
* Integer.parseInt(finalTagName.substring(1, finalTagName.length()));
*
* if(latestVersion > Integer.parseInt(parsedVersion)) {
*
Expand Down
15 changes: 12 additions & 3 deletions src/me/zombie_striker/pixelprinter/util/SkinCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

import java.awt.image.BufferedImage;
import java.io.*;
import java.lang.reflect.Method;
import java.net.URL;

import javax.imageio.ImageIO;
import javax.xml.bind.DatatypeConverter;

import me.zombie_striker.pluginconstructor.*;
import me.zombie_striker.pluginconstructor.RGBBlockColor.Pixel;

import org.bukkit.Location;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;

public class SkinCreator {

public static BufferedImage[] getSkin(String uuid)
Expand All @@ -32,9 +34,16 @@ public static BufferedImage[] getSkin(String uuid)
System.out.println("The user does not exist- AAAA does not contain value.");
throw new NullPointerException();
}
String decode = new String(
DatatypeConverter.parseBase64Binary(aaaa[1]
String decode;
try{
Method m = Class.forName("javax.xml.bind.DatatypeConverter").getMethod("parseBase64Binary", new Class[] {String.class});
decode = new String(/*
javax.xml.bind.DatatypeConverter.parseBase64Binary(*/(String) m.invoke(null, aaaa[1]
.split("\"}],\"legacy\"")[0]));
}catch(Error|Exception e4) {
decode = new String(Base64.decode(aaaa[1]
.split("\"}],\"legacy\"")[0]));
}
linecode =38;
System.out.println(decode);
String url = decode.split("url\":\"")[1].split("\"}")[0].split("\",\"")[0];
Expand Down

0 comments on commit 830bf5b

Please sign in to comment.