mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 12:35:12 +01:00
Prints 'missing-license' message in the console as one long message
This prevents fragmentation of the idividual lines. `#getIP()` can take a couple of seconds and because it is executed outside of the main-thread, other message can be printed bevore the IP address and UUID are ready to be printed.
This commit is contained in:
parent
386ff209a7
commit
ca13e8b26e
@ -85,27 +85,28 @@ public abstract class SongodaPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void onEnable() {
|
public final void onEnable() {
|
||||||
if (emergencyStop) {
|
if (this.emergencyStop) {
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check plugin access, don't load plugin if user don't have access
|
// Check plugin access, don't load plugin if user don't have access
|
||||||
if (!SongodaAuth.isAuthorized(true)) {
|
if (!SongodaAuth.isAuthorized(true)) {
|
||||||
Thread thread = new Thread(() -> {
|
new Thread(() -> {
|
||||||
console.sendMessage(ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
String message = ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
|
||||||
console.sendMessage(ChatColor.RED + "You do not have access to this plugin.");
|
ChatColor.RED + "You do not have access to this plugin.\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "Please purchase a license at https://sngda.to/marketplace");
|
ChatColor.YELLOW + "Please purchase a license at https://sngda.to/marketplace\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "or set up your license at https://sngda.to/licenses");
|
ChatColor.YELLOW + "or set up your license at https://sngda.to/licenses\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "License setup steps:");
|
ChatColor.YELLOW + "License setup steps:\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "Visit the link mentioned above and click the 'Create License button'");
|
ChatColor.YELLOW + "Visit the link mentioned above and click the 'Create License button'\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "Copy the following ip and uuid and click create.");
|
ChatColor.YELLOW + "Copy the following ip and uuid and click create.\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "IP: " + SongodaAuth.getIP());
|
ChatColor.YELLOW + "IP: " + SongodaAuth.getIP() + "\n" +
|
||||||
console.sendMessage(ChatColor.YELLOW + "UUID: " + SongodaAuth.getUUID());
|
ChatColor.YELLOW + "UUID: " + SongodaAuth.getUUID() + "\n" +
|
||||||
console.sendMessage(ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
|
ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
|
||||||
});
|
this.console.sendMessage(message);
|
||||||
thread.start();
|
}).start();
|
||||||
|
|
||||||
emergencyStop();
|
emergencyStop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user