catch (ArrayIndexOutOfBoundsException e)
{
player.sendMessage("You did not enter a name to save!");
return;
}
SBufferScheme scheme = new SBufferScheme();
if (ManageBbsBuffer.getCountOnePlayer(player.getObjectId()) >= 3)
{
player.sendMessage("Exceeded the number of schemes!");
ShowHtml(mBypass[1], player);
return;
}
if (ManageBbsBuffer.existName(player.getObjectId(), name))
{
player.sendMessage("Scheme with that name already exists!");
ShowHtml(mBypass[1], player);
return;
}
if (name.length() > 15)
{
name = name.substring(0, 15);
}
if (name.length() > 0)
{
scheme.obj_id = player.getObjectId();
scheme.name = name;
Effect skill[] = player.getEffectList().getAllFirstEffects();
if (skill != null)
{
for (Effect element : skill)
{
if (Config.COMMUNITYBOARD_BUFF_ALLOW.contains(element.getSkill().getId()))
{
scheme.skills_id.add(element.getSkill().getId());
}
}
if (scheme.skills_id != null)
{
CommunityBufferDAO.getInstance().insert(scheme);
}
}
}
ShowHtml(mBypass[1], player);
}
else if (bypass.startsWith("_bbsbdelete"))
{
StringTokenizer st2 = new StringTokenizer(bypass, ";");
String[] mBypass = st2.nextToken().split(":");
CommunityBufferDAO.getInstance().delete(ManageBbsBuffer.getScheme(Integer.parseInt(mBypass[1]), player.getObjectId()));
ShowHtml(mBypass[3], player);
}
else if (bypass.startsWith("_bbsbrestore"))
{
StringTokenizer st2 = new StringTokenizer(bypass, ";");
String[] mBypass = st2.nextToken().split(":");
int pice = Config.COMMUNITYBOARD_BUFF_SAVE_PICE;
if (player.getAdena() < pice)
{
player.sendMessage("It is not enough money!");
ShowHtml(mBypass[3], player);
return;
}
SBufferScheme scheme = ManageBbsBuffer.getScheme(Integer.parseInt(mBypass[1]), player.getObjectId());
GroupBuff(player, scheme.skills_id);
player.reduceAdena(pice);
ShowHtml(mBypass[3], player);
}
}