[+] 双击启动?
1. 添加了双击启动 2. 移除了一些没用的方法
This commit is contained in:
		@@ -45,5 +45,8 @@ shadowJar {
 | 
				
			|||||||
	from("./") {
 | 
						from("./") {
 | 
				
			||||||
		include 'build.gradle'
 | 
							include 'build.gradle'
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						manifest {
 | 
				
			||||||
 | 
							attributes "Main-Class":"ren.taske.nativebot.Main"
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										31
									
								
								src/main/java/ren/taske/nativebot/Main.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								src/main/java/ren/taske/nativebot/Main.java
									
									
									
									
									
										Normal 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);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -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);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user