mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-17 11:05:12 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -6,32 +6,33 @@ import net.minecraft.event.ClickEvent;
|
||||
import net.minecraft.event.ClickEvent.Action;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
|
||||
public class VersionChecker extends Thread{
|
||||
private int revision = 15;
|
||||
public VersionChecker(){
|
||||
|
||||
}
|
||||
public void run(){
|
||||
String name = '\u00A7'+ "cCustomNPC+" + '\u00A7' + "f";
|
||||
String link = '\u00A7'+"9"+'\u00A7' + "nClick here";
|
||||
String text = name +" installed. For more info " + link;
|
||||
|
||||
public class VersionChecker extends Thread {
|
||||
private int revision = 15;
|
||||
|
||||
public VersionChecker() {
|
||||
|
||||
}
|
||||
|
||||
public void run() {
|
||||
String name = '\u00A7' + "cCustomNPC+" + '\u00A7' + "f";
|
||||
String link = '\u00A7' + "9" + '\u00A7' + "nClick here";
|
||||
String text = name + " installed. For more info " + link;
|
||||
|
||||
EntityPlayer player;
|
||||
try{
|
||||
player = Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
catch(NoSuchMethodError e){
|
||||
return;
|
||||
}
|
||||
while((player = Minecraft.getMinecraft().thePlayer) == null){
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
player = Minecraft.getMinecraft().thePlayer;
|
||||
} catch (NoSuchMethodError e) {
|
||||
return;
|
||||
}
|
||||
while ((player = Minecraft.getMinecraft().thePlayer) == null) {
|
||||
try {
|
||||
Thread.sleep(2000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
ChatComponentTranslation message = new ChatComponentTranslation(text);
|
||||
message.getChatStyle().setChatClickEvent(new ClickEvent(Action.OPEN_URL, "https://www.curseforge.com/minecraft/mc-mods/customnpc-plus"));
|
||||
player.addChatMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user