[+] 双击启动?

1. 添加了双击启动
2. 移除了一些没用的方法
This commit is contained in:
Taskeren 2019-08-04 00:59:15 +08:00
parent 3f0c779b69
commit fd96ab4ad0
3 changed files with 34 additions and 14 deletions

View File

@ -45,5 +45,8 @@ shadowJar {
from("./") { from("./") {
include 'build.gradle' include 'build.gradle'
} }
manifest {
attributes "Main-Class":"ren.taske.nativebot.Main"
}
} }

View File

@ -0,0 +1,31 @@
package ren.taske.nativebot;
import java.awt.Font;
import java.util.Random;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.plaf.FontUIResource;
public class Main {
public static final String[] TITLES = {"𝘕𝘈𝘛𝘐𝘝𝘌𝘉𝘖𝘛 𝘌𝘙𝘙𝘖𝘙", "𝙽𝙰𝚃𝙸𝚅𝙴𝙱𝙾𝚃 𝙴𝚁𝚁𝙾𝚁", "𝐍𝐀𝐓𝐈𝐕𝐄𝐁𝐎𝐓 𝐄𝐑𝐑𝐎𝐑", "𝐍𝐀𝐓𝐈𝐕𝐄𝐁𝐎𝐓 𝐄𝐑𝐑𝐎𝐑"};
public static final String[] CONTENTS = {
"𝐔𝐧𝐬𝐮𝐩𝐩𝐨𝐫𝐭𝐞𝐝",
"𝑼𝒏𝒔𝒖𝒑𝒑𝒐𝒓𝒕𝒆𝒅",
"𝕌𝕟𝕤𝕦𝕡𝕡𝕠𝕣𝕥𝕖𝕕"
};
public static final String MORE = "https://nb.taske.ren";
public static void main(String[] args) {
UIManager.put("OptionPane.messageFont", new FontUIResource(new Font(Font.SANS_SERIF, Font.PLAIN, 15)));
UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("Microsoft YaHei", Font.PLAIN, 12)));
String title = TITLES[new Random().nextInt(TITLES.length)];
String content = CONTENTS[new Random().nextInt(CONTENTS.length)];
ImageIcon ii = new ImageIcon(Thread.currentThread().getContextClassLoader().getResource("error.png"));
JOptionPane.showMessageDialog(null, content+"\n"+MORE, title, JOptionPane.ERROR_MESSAGE, ii);
}
}

View File

@ -78,18 +78,4 @@ public class NativeBot {
bot.startBot(); bot.startBot();
} }
public static void bigWarning(String str, Object...format) {
logger.warning("***********************************************");
logger.warning(String.format(str, format));
logger.warning("***********************************************");
}
public static void bigWarning(String[] strs, Object...format) {
String s = "";
for(String str : strs) {
s += str + "\n";
}
bigWarning(s, format);
}
} }