Skip to content

Commit

Permalink
Removing player message senders
Browse files Browse the repository at this point in the history
Plugin will now use common message send methods rather than reusing same code in listeners class
  • Loading branch information
CoolLord22 committed Feb 1, 2023
1 parent 8194f45 commit 6edaad4
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,28 +99,9 @@ public void onTeleport(PlayerTeleportEvent event) {
}
}
}
toSendLeft = true;
}
}
}
if(plugin.config.failedTeleportMessage != null && toSendError) {
if(!plugin.config.failedTeleportMessage.isEmpty()) {
plugin.common.sendMessage(plugin.config.usePrefix, event.getPlayer(), plugin.config.failedTeleportMessage
.replaceAll("%x", df.format(event.getFrom().getBlockX()))
.replaceAll("%y", df.format(event.getFrom().getBlockY()))
.replaceAll("%z", df.format(event.getFrom().getBlockZ())));
}
}

if(plugin.config.leftEntityMessage != null && toSendLeft) {
if(!plugin.config.leftEntityMessage.isEmpty()) {
plugin.common.sendMessage(plugin.config.usePrefix, event.getPlayer(), plugin.config.leftEntityMessage
.replaceAll("%x", df.format(event.getFrom().getBlockX()))
.replaceAll("%y", df.format(event.getFrom().getBlockY()))
.replaceAll("%z", df.format(event.getFrom().getBlockZ())));
}
}
}
}
}
}

0 comments on commit 6edaad4

Please sign in to comment.