mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-10-22 12:20:26 +02:00
Slightly changes wording of 'missing-license' message
+ small refactoring – Putting the *expesive* method calls outside the string into variables to easier see them, when trying to understand the code and the need for its own thread for just printing some messages to the console.
This commit is contained in:
parent
ca13e8b26e
commit
d9586cfe86
@ -93,16 +93,22 @@ public abstract class SongodaPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
// 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)) {
|
||||||
|
String pluginName = getDescription().getName();
|
||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
String message = ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
|
String externalIP = SongodaAuth.getIP();
|
||||||
ChatColor.RED + "You do not have access to this plugin.\n" +
|
String serverUuid = SongodaAuth.getUUID().toString();
|
||||||
|
|
||||||
|
String message = "\n" +
|
||||||
|
ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
|
||||||
|
ChatColor.RED + "You do not have access to the " + pluginName + " plugin.\n" +
|
||||||
ChatColor.YELLOW + "Please purchase a license at https://sngda.to/marketplace\n" +
|
ChatColor.YELLOW + "Please purchase a license at https://sngda.to/marketplace\n" +
|
||||||
ChatColor.YELLOW + "or set up your license at https://sngda.to/licenses\n" +
|
ChatColor.YELLOW + "or set up your license at https://sngda.to/licenses\n" +
|
||||||
ChatColor.YELLOW + "License setup steps:\n" +
|
ChatColor.YELLOW + "License setup steps:\n" +
|
||||||
ChatColor.YELLOW + "Visit the link mentioned above and click the 'Create License button'\n" +
|
ChatColor.YELLOW + "Visit the link mentioned above and click the 'Create License' button.\n" +
|
||||||
ChatColor.YELLOW + "Copy the following ip and uuid and click create.\n" +
|
ChatColor.YELLOW + "Copy the following IP address and UUID and click create.\n" +
|
||||||
ChatColor.YELLOW + "IP: " + SongodaAuth.getIP() + "\n" +
|
ChatColor.YELLOW + "IP: " + externalIP + "\n" +
|
||||||
ChatColor.YELLOW + "UUID: " + SongodaAuth.getUUID() + "\n" +
|
ChatColor.YELLOW + "UUID: " + serverUuid + "\n" +
|
||||||
ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
|
ChatColor.RED + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
|
||||||
this.console.sendMessage(message);
|
this.console.sendMessage(message);
|
||||||
}).start();
|
}).start();
|
||||||
|
Loading…
Reference in New Issue
Block a user