fix nametag icon
@ -375,39 +375,40 @@ public abstract class Render<T extends Entity>
|
||||
|
||||
if (entityIn instanceof AbstractClientPlayer) {
|
||||
String username = ((AbstractClientPlayer) entityIn).getGameProfile().getId().toString();
|
||||
if(str.contains(Minecraft.getMinecraft().thePlayer.getName())) {
|
||||
if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
|
||||
if (SocketClient.isUser(username) && entityIn.ticksExisted > 20) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("Athena/logo/Athena.png"));
|
||||
|
||||
String rank = SocketClient.getRank(username).toString();
|
||||
ResourceLocation rankTexture = null;
|
||||
switch (rank) {
|
||||
case "OWNER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/owner.png");
|
||||
break;
|
||||
case "DEVELOPER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/developer.png");
|
||||
break;
|
||||
case "ADMIN":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/admin.png");
|
||||
break;
|
||||
case "MOD":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/mod.png");
|
||||
break;
|
||||
case "PREMIUM":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/premium.png");
|
||||
break;
|
||||
case "USER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/user.png");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
String rank = SocketClient.getRank(username).toString();
|
||||
ResourceLocation rankTexture = null;
|
||||
switch (rank) {
|
||||
case "OWNER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/owner.png");
|
||||
break;
|
||||
case "DEVELOPER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/developer.png");
|
||||
break;
|
||||
case "ADMIN":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/admin.png");
|
||||
break;
|
||||
case "MOD":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/mod.png");
|
||||
break;
|
||||
case "PARTNER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/partner.png");
|
||||
break;
|
||||
case "PREMIUM":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/premium.png");
|
||||
break;
|
||||
case "USER":
|
||||
rankTexture = new ResourceLocation("Athena/ranks/user.png");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (rankTexture != null) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(rankTexture);
|
||||
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, (int) -1.5, 10, 10, 10, 10, 10, 10);
|
||||
}
|
||||
if (rankTexture != null) {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(rankTexture);
|
||||
Gui.drawModalRectWithCustomSizedTexture(-fontrenderer.getStringWidth(entityIn.getDisplayName().getFormattedText()) / 2 - 12, (int) -2, 11, 11, 11, 11, 11, 11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,6 @@ import java.util.ArrayList;
|
||||
public class AccountManager {
|
||||
|
||||
private Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
private ArrayList<Account> accounts = new ArrayList<>();
|
||||
|
||||
public boolean isFirstLogin = false;
|
||||
@ -75,7 +74,6 @@ public class AccountManager {
|
||||
}
|
||||
|
||||
for (String s : lines) {
|
||||
|
||||
String[] args = s.split(":");
|
||||
|
||||
if (s.toLowerCase().startsWith("account:")) {
|
||||
|
@ -164,7 +164,6 @@ public class ProfilesPage extends Page {
|
||||
String code = URLEncoder.encode(RandomStringUtils.randomAlphabetic(12).toLowerCase(), "UTF-8");
|
||||
|
||||
WebRequest request = new WebRequest(PROFILES_URL, "POST", ContentType.MULTIPART_FORM, false);
|
||||
|
||||
String boundary = "WebKitFormBoundaryYDPG5KWy5y4yolEf";
|
||||
|
||||
request.setBoundary(boundary);
|
||||
|
@ -57,18 +57,15 @@ public class SocketClient {
|
||||
return currentTime - lastCacheTime <= cacheExpirationTime;
|
||||
}
|
||||
|
||||
public static boolean isUser(String uuid) {
|
||||
if (userCache.containsKey(uuid)) {
|
||||
return userCache.get(uuid);
|
||||
public static boolean isUser(String username) {
|
||||
if (userCache.containsKey(username)) {
|
||||
return userCache.get(username);
|
||||
}
|
||||
|
||||
// Replace this code block with MySQL query
|
||||
String payload = uuid;
|
||||
String isUser = (String) client.request("isUser", payload);
|
||||
|
||||
boolean result = Boolean.parseBoolean(isUser);
|
||||
userCache.put(uuid, result);
|
||||
return result;
|
||||
String[] args = client.request("isUser", username).toString().split(":");
|
||||
boolean isUser = args[0].equals("true");
|
||||
userCache.put(username, isUser);
|
||||
return isUser;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 283 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 31 KiB |
BIN
src/main/resources/assets/minecraft/Athena/ranks/partner.png
Normal file
After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 404 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 873 B |
After Width: | Height: | Size: 861 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 952 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 916 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 950 B |
After Width: | Height: | Size: 503 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 564 B |
After Width: | Height: | Size: 1016 B |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 888 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1015 B |
After Width: | Height: | Size: 783 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 676 B |
After Width: | Height: | Size: 554 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 715 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 982 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 694 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 517 B |
After Width: | Height: | Size: 124 B |