AdminBBSManager.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package com.l2jserver.gameserver.communitybbs.Manager;
  16. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  17. import com.l2jserver.gameserver.network.serverpackets.ShowBoard;
  18. public class AdminBBSManager extends BaseBBSManager
  19. {
  20. /**
  21. * @return
  22. */
  23. public static AdminBBSManager getInstance()
  24. {
  25. return SingletonHolder._instance;
  26. }
  27. @Override
  28. public void parsecmd(String command, L2PcInstance activeChar)
  29. {
  30. if (!activeChar.isGM())
  31. {
  32. return;
  33. }
  34. if (command.startsWith("admin_bbs"))
  35. {
  36. separateAndSend("<html><body><br><br><center>This Page is only an exemple :)<br><br>command=" + command
  37. + "</center></body></html>", activeChar);
  38. }
  39. else
  40. {
  41. ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command
  42. + " is not implemented yet</center><br><br></body></html>", "101");
  43. activeChar.sendPacket(sb);
  44. activeChar.sendPacket(new ShowBoard(null, "102"));
  45. activeChar.sendPacket(new ShowBoard(null, "103"));
  46. }
  47. }
  48. /**
  49. *
  50. * @see com.l2jserver.gameserver.communitybbs.Manager.BaseBBSManager#parsewrite(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, com.l2jserver.gameserver.model.actor.instance.L2PcInstance)
  51. */
  52. @Override
  53. public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar)
  54. {
  55. if (!activeChar.isGM())
  56. {
  57. return;
  58. }
  59. }
  60. private static class SingletonHolder
  61. {
  62. protected static final AdminBBSManager _instance = new AdminBBSManager();
  63. }
  64. }