AdminBBSManager.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. private AdminBBSManager()
  28. {
  29. }
  30. /**
  31. *
  32. * @see com.l2jserver.gameserver.communitybbs.Manager.BaseBBSManager#parsecmd(java.lang.String, com.l2jserver.gameserver.model.actor.instance.L2PcInstance)
  33. */
  34. @Override
  35. public void parsecmd(String command, L2PcInstance activeChar)
  36. {
  37. if (!activeChar.isGM())
  38. {
  39. return;
  40. }
  41. if (command.startsWith("admin_bbs"))
  42. {
  43. separateAndSend("<html><body><br><br><center>This Page is only an exemple :)<br><br>command=" + command
  44. + "</center></body></html>", activeChar);
  45. }
  46. else
  47. {
  48. ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command
  49. + " is not implemented yet</center><br><br></body></html>", "101");
  50. activeChar.sendPacket(sb);
  51. activeChar.sendPacket(new ShowBoard(null, "102"));
  52. activeChar.sendPacket(new ShowBoard(null, "103"));
  53. }
  54. }
  55. /**
  56. *
  57. * @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)
  58. */
  59. @Override
  60. public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar)
  61. {
  62. if (!activeChar.isGM())
  63. {
  64. return;
  65. }
  66. }
  67. @SuppressWarnings("synthetic-access")
  68. private static class SingletonHolder
  69. {
  70. protected static final AdminBBSManager _instance = new AdminBBSManager();
  71. }
  72. }