Macro.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*
  2. * Copyright (C) 2004-2015 L2J Server
  3. *
  4. * This file is part of L2J Server.
  5. *
  6. * L2J Server is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J Server is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package com.l2jserver.gameserver.model;
  20. import java.util.List;
  21. import com.l2jserver.gameserver.model.interfaces.IIdentifiable;
  22. import com.l2jserver.gameserver.model.interfaces.INamable;
  23. public class Macro implements IIdentifiable, INamable
  24. {
  25. private int _id;
  26. private final int _icon;
  27. private final String _name;
  28. private final String _descr;
  29. private final String _acronym;
  30. private final List<MacroCmd> _commands;
  31. /**
  32. * Constructor for macros.
  33. * @param id the macro ID
  34. * @param icon the icon ID
  35. * @param name the macro name
  36. * @param descr the macro description
  37. * @param acronym the macro acronym
  38. * @param list the macro command list
  39. */
  40. public Macro(int id, int icon, String name, String descr, String acronym, List<MacroCmd> list)
  41. {
  42. _id = id;
  43. _icon = icon;
  44. _name = name;
  45. _descr = descr;
  46. _acronym = acronym;
  47. _commands = list;
  48. }
  49. /**
  50. * Gets the marco ID.
  51. * @returns the marco ID
  52. */
  53. @Override
  54. public int getId()
  55. {
  56. return _id;
  57. }
  58. /**
  59. * Sets the marco ID.
  60. * @param id the marco ID
  61. */
  62. public void setId(int id)
  63. {
  64. _id = id;
  65. }
  66. /**
  67. * Gets the macro icon ID.
  68. * @return the icon
  69. */
  70. public int getIcon()
  71. {
  72. return _icon;
  73. }
  74. /**
  75. * Gets the macro name.
  76. * @return the name
  77. */
  78. @Override
  79. public String getName()
  80. {
  81. return _name;
  82. }
  83. /**
  84. * Gets the macro description.
  85. * @return the description
  86. */
  87. public String getDescr()
  88. {
  89. return _descr;
  90. }
  91. /**
  92. * Gets the macro acronym.
  93. * @return the acronym
  94. */
  95. public String getAcronym()
  96. {
  97. return _acronym;
  98. }
  99. /**
  100. * Gets the macro command list.
  101. * @return the macro command list
  102. */
  103. public List<MacroCmd> getCommands()
  104. {
  105. return _commands;
  106. }
  107. }