Skip to content

Commit

Permalink
normally fixed command list null
Browse files Browse the repository at this point in the history
  • Loading branch information
FeuSalamander committed Jun 18, 2023
1 parent ff787c9 commit 68f4824
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/me/feusalamander/vmessage/Listeners.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private void onLeave(final DisconnectEvent e) {
return;
}
String message = configuration.getLeaveFormat();
if(!configuration.getLeavecmd().isEmpty())
if(configuration.getLeavecmd() != null&&!configuration.getLeavecmd().isEmpty())
for(String s : configuration.getLeavecmd()){
s = s
.replace("#player#", p.getUsername())
Expand Down Expand Up @@ -100,7 +100,7 @@ private void onChange(final ServerPostConnectEvent e) {
}
final ServerConnection actual = serverConnection.get();
String message = configuration.getChangeFormat();
if(!configuration.getChangecmd().isEmpty())
if(configuration.getChangecmd() != null&&!configuration.getChangecmd().isEmpty())
for(String s : configuration.getChangecmd()){
s = s
.replace("#player#", p.getUsername())
Expand Down Expand Up @@ -128,7 +128,7 @@ private void onChange(final ServerPostConnectEvent e) {
if (!configuration.isJoinEnabled()) {
return;
}
if(!configuration.getJoincmd().isEmpty())
if(configuration.getJoincmd() != null&&!configuration.getJoincmd().isEmpty())
for(String s : configuration.getJoincmd()){
s = s
.replace("#player#", p.getUsername())
Expand Down Expand Up @@ -167,7 +167,7 @@ private String luckperms(String message, final Player p) {
return message;
}
public void message(final Player p, final String m) {
if(!configuration.getMessagecmd().isEmpty())
if(configuration.getMessagecmd() != null&&!configuration.getMessagecmd().isEmpty())
for(String s : configuration.getMessagecmd()){
s = s
.replace("#player#", p.getUsername())
Expand Down

0 comments on commit 68f4824

Please sign in to comment.