Removed unnecessary array length check

This commit is contained in:
Intelli 2021-07-26 18:09:17 -06:00
parent 40b52fa321
commit 490b5eb0ee
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ import net.coreprotect.database.logger.ChatLogger;
class PlayerChatProcess {
static void process(PreparedStatement preparedStmt, int batchCount, int processId, int id, Object[] object, String user) {
if (object.length == 2 && object[1] instanceof Location) {
if (object[1] instanceof Location) {
Map<Integer, String> strings = Consumer.consumerStrings.get(processId);
if (strings.get(id) != null) {
String message = strings.get(id);

View File

@ -11,7 +11,7 @@ import net.coreprotect.database.logger.CommandLogger;
class PlayerCommandProcess {
static void process(PreparedStatement preparedStmt, int batchCount, int processId, int id, Object[] object, String user) {
if (object.length == 2 && object[1] instanceof Location) {
if (object[1] instanceof Location) {
Map<Integer, String> strings = Consumer.consumerStrings.get(processId);
if (strings.get(id) != null) {
String message = strings.get(id);