- Баллы
- 76
Не получается получить префикс игрока, который выдает наказание. getPlayerSuffix выдает ошибку.
Использую так:

Более детальный код:
Исходники: https://github.com/DevLeoko/AdvancedBan
Что я делаю не так?
Использую так:
Более детальный код:
PHP:
package me.leoko.advancedban.utils;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import me.leoko.advancedban.MethodInterface;
import me.leoko.advancedban.Universal;
import me.leoko.advancedban.manager.DatabaseManager;
import me.leoko.advancedban.manager.MessageManager;
import me.leoko.advancedban.manager.PunishmentManager;
import me.leoko.advancedban.manager.TimeManager;
import net.milkbowl.vault.chat.Chat;
import net.milkbowl.vault.permission.Permission;
/**
* Created by Leoko @ dev.skamps.eu on 30.05.2016.
*/
public class Punishment {
private static final MethodInterface mi = Universal.get().getMethods();
private final String name, uuid, operator, calculation;
private final long start, end;
private final PunishmentType type;
private static Chat chat = null;
private String reason;
private int id;
public Punishment(String name, String uuid, String reason, String operator, PunishmentType type, long start, long end, String calculation, int id) {
this.name = name;
this.uuid = uuid;
this.reason = reason;
this.operator = operator;
this.type = type;
this.start = start;
this.end = end;
this.calculation = calculation;
this.id = id;
}
...
public String getPlayerSuffix() {
return chat.getPlayerSuffix(operator);
}
...
}
Что я делаю не так?
Последнее редактирование: