()
| 3727 | } |
| 3728 | |
| 3729 | public final Player getController() { |
| 3730 | Entry<Long, Player> lastEntry = tempControllers.lastEntry(); |
| 3731 | if (lastEntry != null) { |
| 3732 | final long lastTimestamp = lastEntry.getKey(); |
| 3733 | if (lastTimestamp > controllerTimestamp) { |
| 3734 | return lastEntry.getValue(); |
| 3735 | } |
| 3736 | } |
| 3737 | if (controller != null) { |
| 3738 | return controller; |
| 3739 | } |
| 3740 | return owner; |
| 3741 | } |
| 3742 | |
| 3743 | public final void setController(final Player player, final long tstamp) { |
| 3744 | tempControllers.clear(); |