Skip to content

Commit

Permalink
1.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
benfiratkaya committed Apr 1, 2024
1 parent 84cf601 commit acc1a28
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 3 deletions.
2 changes: 2 additions & 0 deletions bukkit/src/main/java/net/leaderos/plugin/Bukkit.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public void onEnable() {

if (getConfigFile().getSettings().getUrl().equals("https://yourwebsite.com")) {
getLogger().warning(ChatUtil.getMessage(getLangFile().getMessages().getChangeApiUrl()));
} else if (getConfigFile().getSettings().getUrl().startsWith("http://")) {
getLogger().warning(ChatUtil.getMessage(getLangFile().getMessages().getChangeApiUrlHttps()));
} else {
LeaderOSAPI.getModuleManager().enableModules();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public static class Messages extends OkaeriConfig {

private String changeApiUrl = "{prefix} &cPlease change the API URL in the config.";

private String changeApiUrlHttps = "{prefix} &cPlease change the API URL to HTTPS (https://) in the config.";

private String playerNotOnline = "{prefix} &cTarget player is not online.";

private String playerNotAvailable = "{prefix} &cPlayer is not available.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public static class Messages extends Language.Messages {

private String changeApiUrl = "{prefix} &cPlease change the API URL in the config.";

private String changeApiUrlHttps = "{prefix} &cPlease change the API URL to HTTPS (https://) in the config.";

private String playerNotOnline = "{prefix} &cTarget player is not online.";

private String playerNotAvailable = "{prefix} &cPlayer is not available.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public static class Messages extends Language.Messages {

private String changeApiUrl = "{prefix} &cLütfen API URL adresini değiştirin!";

private String changeApiUrlHttps = "{prefix} &cAPI URL adresi HTTPS (https://) ile başlamalıdır!";

private String playerNotOnline = "{prefix} &cOyuncu çevrimiçi değil.";

private String playerNotAvailable = "{prefix} &cOyuncu mevcut değil.";
Expand Down
2 changes: 2 additions & 0 deletions bungee/src/main/java/net/leaderos/bungee/Bungee.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public void onEnable() {

if (getConfigFile().getSettings().getUrl().equals("https://yourwebsite.com")) {
getLogger().warning(ChatUtil.getMessage(getLangFile().getMessages().getChangeApiUrl()));
} else if (getConfigFile().getSettings().getUrl().startsWith("http://")) {
getLogger().warning(ChatUtil.getMessage(getLangFile().getMessages().getChangeApiUrlHttps()));
} else {
getModuleManager().enableModules();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public static class Messages extends OkaeriConfig {

private String changeApiUrl = "{prefix} &cPlease change the API URL in the config.";

private String changeApiUrlHttps = "{prefix} &cPlease change the API URL to HTTPS (https://) in the config.";

private String playerNotOnline = "{prefix} &cTarget player is not online.";

private String playerNotAvailable = "{prefix} &cPlayer is not available.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public static class Messages extends Language.Messages {

private String changeApiUrl = "{prefix} &cPlease change the API URL in the config.";

private String changeApiUrlHttps = "{prefix} &cPlease change the API URL to HTTPS (https://) in the config.";

private String playerNotOnline = "{prefix} &cTarget player is not online.";

private String playerNotAvailable = "{prefix} &cPlayer is not available.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public static class Messages extends Language.Messages {

private String changeApiUrl = "{prefix} &cLütfen API URL adresini değiştirin!";

private String changeApiUrlHttps = "{prefix} &cAPI URL adresi HTTPS (https://) ile başlamalıdır!";

private String playerNotOnline = "{prefix} &cOyuncu çevrimiçi değil.";

private String playerNotAvailable = "{prefix} &cOyuncu mevcut değil.";
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<shared.version>1.0.5</shared.version>
<shared.version>1.0.6</shared.version>
</properties>

<!-- Dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.socket.client.IO;
import io.socket.client.Socket;
import io.socket.engineio.client.transports.WebSocket;
import lombok.Getter;
import lombok.Setter;
import net.leaderos.shared.model.request.PostRequest;
Expand Down Expand Up @@ -41,6 +42,9 @@ public SocketClient(String apiKey, String serverToken) throws URISyntaxException
auth.put("token", serverToken);
opts.auth = auth;

// Set transports
opts.transports = new String[] {WebSocket.NAME};

this.socket = IO.socket(url, opts);

// Error listener
Expand Down
8 changes: 6 additions & 2 deletions velocity/src/main/java/net/leaderos/velocity/Velocity.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
@Plugin(
id = "leaderos",
name = "LeaderOS",
version = "1.0.5",
version = "1.0.6",
url = "https://leaderos.net",
description = "LeaderOS Plugin for Velocity",
authors = {"leaderos"}
Expand Down Expand Up @@ -146,6 +146,10 @@ public void onProxyInitialize(ProxyInitializeEvent event) {
getLogger().warn(ChatUtil.componentToString(
ChatUtil.getMessage(getLangFile().getMessages().getChangeApiUrl())
));
} else if (getConfigFile().getSettings().getUrl().startsWith("http://")) {
getLogger().warn(ChatUtil.componentToString(
ChatUtil.getMessage(getLangFile().getMessages().getChangeApiUrlHttps())
));
} else {
getModuleManager().enableModules();
}
Expand Down Expand Up @@ -205,7 +209,7 @@ public void setupFiles() {

public void checkUpdate() {
Velocity.getInstance().getServer().getScheduler().buildTask(Velocity.getInstance(), () -> {
PluginUpdater updater = new PluginUpdater("1.0.5");
PluginUpdater updater = new PluginUpdater("1.0.6");
try {
if (updater.checkForUpdates()) {
Component msg = ChatUtil.replacePlaceholders(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public static class Messages extends OkaeriConfig {

private String changeApiUrl = "{prefix} &cPlease change the API URL in the config.";

private String changeApiUrlHttps = "{prefix} &cPlease change the API URL to HTTPS (https://) in the config.";

private String playerNotOnline = "{prefix} &cTarget player is not online.";

private String playerNotAvailable = "{prefix} &cPlayer is not available.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public static class Messages extends Language.Messages {

private String changeApiUrl = "{prefix} &cPlease change the API URL in the config.";

private String changeApiUrlHttps = "{prefix} &cPlease change the API URL to HTTPS (https://) in the config.";

private String playerNotOnline = "{prefix} &cTarget player is not online.";

private String playerNotAvailable = "{prefix} &cPlayer is not available.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public static class Messages extends Language.Messages {

private String changeApiUrl = "{prefix} &cLütfen API URL adresini değiştirin!";

private String changeApiUrlHttps = "{prefix} &cAPI URL adresi HTTPS (https://) ile başlamalıdır!";

private String playerNotOnline = "{prefix} &cOyuncu çevrimiçi değil.";

private String playerNotAvailable = "{prefix} &cOyuncu mevcut değil.";
Expand Down

0 comments on commit acc1a28

Please sign in to comment.