Skip to content

Commit

Permalink
- Line 44 JoinWelcomer.java Condition 'country != null' is always 'tr…
Browse files Browse the repository at this point in the history
…ue' simplified to '!country.isEmpty()'.

- Refactored the plugin so that it's inside in.rs.milivojevic.KPManager and changed all classes accordingly.
  • Loading branch information
Kame03 committed Jan 15, 2023
1 parent 763b96c commit d990c84
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package KPManager;
package in.rs.milivojevic.KPManager;

import okhttp3.OkHttpClient;
import okhttp3.Request;
Expand Down Expand Up @@ -41,7 +41,7 @@ public void onPlayerJoin(PlayerJoinEvent event) {
assert response.body() != null;
String body = response.body().string();
String country = parseCountry(body);
if (country != null && !country.isEmpty()) {
if (!country.isEmpty()) {
Bukkit.broadcastMessage(messageEveryone.replace("{playerName}", player.getName()).replace("{country}", country));
}
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package KPManager;
package in.rs.milivojevic.KPManager;

public final class LoginManager {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package KPManager;
package in.rs.milivojevic.KPManager;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
Expand Down
8 changes: 0 additions & 8 deletions src/main/resources/config.yml

This file was deleted.

0 comments on commit d990c84

Please sign in to comment.