Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. package pl.matiqu.core;
  2.  
  3. import org.bukkit.entity.Player;
  4.  
  5. public class Combat
  6. {
  7. private Player player;
  8. private long lastAttactTime;
  9. private Player lastAttactkPlayer;
  10. private long lastAsystTime;
  11. private Player lastAsystPlayer;
  12.  
  13. public Combat(final Player p) {
  14. this.player = p;
  15. this.lastAttactTime = 0L;
  16. this.lastAttactkPlayer = null;
  17. this.lastAsystPlayer = null;
  18. this.lastAsystTime = 0L;
  19. }
  20.  
  21. public Player getPlayer() {
  22. return this.player;
  23. }
  24.  
  25. public void setPlayer(final Player player) {
  26. this.player = player;
  27. }
  28.  
  29. public long getLastAttactTime() {
  30. return this.lastAttactTime;
  31. }
  32.  
  33. public void setLastAttactTime(final long lastAttactTime) {
  34. this.lastAttactTime = lastAttactTime;
  35. }
  36.  
  37. public Player getLastAttactkPlayer() {
  38. return this.lastAttactkPlayer;
  39. }
  40.  
  41. public void setLastAttactkPlayer(final Player lastAttactkPlayer) {
  42. this.lastAttactkPlayer = lastAttactkPlayer;
  43. }
  44.  
  45. public long getLastAsystTime() {
  46. return this.lastAsystTime;
  47. }
  48.  
  49. public void setLastAsystTime(final long lastAsystTime) {
  50. this.lastAsystTime = lastAsystTime;
  51. }
  52.  
  53. public Player getLastAsystPlayer() {
  54. return this.lastAsystPlayer;
  55. }
  56.  
  57. public void setLastAsystPlayer(final Player lastAsystPlayer) {
  58. this.lastAsystPlayer = lastAsystPlayer;
  59. }
  60.  
  61. public boolean hasFight() {
  62. return this.getLastAttactTime() > System.currentTimeMillis();
  63. }
  64.  
  65. public boolean wasFight() {
  66. return this.getLastAttactkPlayer() != null;
  67. }
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement