I don't know what to do... I'm a bit stuck. When compiling the code it doesn't give me problems but it doesn't work either
public final class HomeBoard implements IParseBoardHandler {
// SQL Queries
private static final String COUNT_FAVORITES = "SELECT COUNT(*) AS favorites FROM `bbs_favorites` WHERE `playerId`=?";
private static final String[] COMMANDS = {
"_bbshome",
"_bbstop",
"_testpage1"
};
@Override
public String[] getCommunityBoardCommands() {
return COMMANDS;
}
@Override
public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar) {
if (command.equals("_bbshome") || command.equals("_bbstop")) {
CommunityBoardHandler.getInstance().addBypass(activeChar, "Home", command);
String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/home.html");
html = html.replaceAll("%fav_count%", Integer.toString(getFavoriteCount(activeChar)));
html = html.replaceAll("%region_count%", Integer.toString(getRegionCount(activeChar)));
html = html.replaceAll("%clan_count%", Integer.toString(ClanTable.getInstance().getClanCount()));
CommunityBoardHandler.separateAndSend(html, activeChar);
}
if (command.contains ("_testpage1")) {
CommunityBoardHandler.getInstance().addBypass(activeChar, "testpage1", command);
String testpage1 = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/custom/index.html");
}
else if (command.startsWith("_bbstop;")) {
final String path = command.replace("_bbstop;", "");
if ((path.length() > 0) && path.endsWith(".html")) {
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/" + path);
CommunityBoardHandler.separateAndSend(html, activeChar);
}
}
return true;
}