remove unused lang stuff

This commit is contained in:
dfsek 2021-12-16 19:51:29 -07:00
parent 89c43e98b9
commit a0c46aaf7a
3 changed files with 0 additions and 127 deletions

View File

@ -1,23 +0,0 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
*
* The Terra API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the common/api directory.
*/
package com.dfsek.terra.api.lang;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.dfsek.terra.api.entity.CommandSender;
public interface Message {
void log(Logger logger, Level level, String... args);
void send(CommandSender sender, String... args);
boolean isEmpty();
}

View File

@ -1,54 +0,0 @@
/*
* This file is part of Terra.
*
* Terra is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Terra is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Terra. If not, see <https://www.gnu.org/licenses/>.
*/
package com.dfsek.terra.config.lang;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.dfsek.terra.api.entity.CommandSender;
import com.dfsek.terra.api.lang.Message;
public class MultiLineMessage implements Message {
private final List<String> message;
public MultiLineMessage(List<String> message) {
this.message = message;
}
@Override
public void log(Logger logger, Level level, String... args) {
for(String line : message) {
logger.log(level, String.format(line, Arrays.asList(args).toArray()));
}
}
@Override
public void send(CommandSender sender, String... args) {
for(String line : message) {
sender.sendMessage(String.format(line, Arrays.asList(args).toArray()));
}
}
@Override
public boolean isEmpty() {
return message == null || message.isEmpty();
}
}

View File

@ -1,50 +0,0 @@
/*
* This file is part of Terra.
*
* Terra is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Terra is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Terra. If not, see <https://www.gnu.org/licenses/>.
*/
package com.dfsek.terra.config.lang;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.dfsek.terra.api.entity.CommandSender;
import com.dfsek.terra.api.lang.Message;
public class SingleLineMessage implements Message {
private final String message;
public SingleLineMessage(String message) {
this.message = message;
}
@Override
public void log(Logger logger, Level level, String... args) {
logger.log(level, String.format(message, Arrays.asList(args).toArray()));
}
@Override
public void send(CommandSender sender, String... args) {
sender.sendMessage(String.format(message, Arrays.asList(args).toArray()));
}
@Override
public boolean isEmpty() {
return message == null || message.equals("");
}
}