Backward compatibility changes for Java 8.
This commit is contained in:
@@ -27,12 +27,12 @@ public class Potion extends WorldObject
|
||||
Creature _target;
|
||||
private ScheduledFuture<?> _potionhpRegTask;
|
||||
private ScheduledFuture<?> _potionmpRegTask;
|
||||
private int _seconds;
|
||||
private double _effect;
|
||||
private int _duration;
|
||||
private int _potion;
|
||||
private final Object _mpLock;
|
||||
private final Object _hpLock;
|
||||
protected int _seconds;
|
||||
protected double _effect;
|
||||
protected int _duration;
|
||||
protected final Object _mpLock;
|
||||
protected final Object _hpLock;
|
||||
|
||||
public Potion()
|
||||
{
|
||||
|
@@ -33,9 +33,9 @@ public class Spawn
|
||||
private final Npc _template;
|
||||
private int _id;
|
||||
private String _location;
|
||||
protected int _scheduledCount;
|
||||
private int _maximumCount;
|
||||
private int _currentCount;
|
||||
private int _scheduledCount;
|
||||
private int _npcid;
|
||||
private int _locx;
|
||||
private int _locy;
|
||||
|
@@ -43,8 +43,8 @@ public class Attackable extends NpcInstance
|
||||
{
|
||||
// private int _moveRadius;
|
||||
private boolean _active;
|
||||
private ScheduledFuture<?> _currentAiTask;
|
||||
private ScheduledFuture<?> _currentAIAttackTask;
|
||||
protected ScheduledFuture<?> _currentAiTask;
|
||||
protected ScheduledFuture<?> _currentAIAttackTask;
|
||||
private final Map<WorldObject, Integer> _aggroList = new HashMap<>();
|
||||
private Weapon _dummyWeapon;
|
||||
private boolean _sweepActive;
|
||||
|
@@ -57,9 +57,9 @@ public abstract class Creature extends WorldObject
|
||||
private ScheduledFuture<?> _attackTask;
|
||||
private ScheduledFuture<?> _hitTask;
|
||||
private ScheduledFuture<?> _regenTask;
|
||||
private final Object _mpLock = new Object();
|
||||
protected final Object _mpLock = new Object();
|
||||
private boolean _mpRegenActive;
|
||||
private final Object _hpLock = new Object();
|
||||
protected final Object _hpLock = new Object();
|
||||
private boolean _hpRegenActive;
|
||||
private int _moveOffset;
|
||||
private float _effectiveSpeed;
|
||||
@@ -67,7 +67,7 @@ public abstract class Creature extends WorldObject
|
||||
private double _xAddition;
|
||||
private double _yAddition;
|
||||
private long _timeToTarget;
|
||||
private ScheduledFuture<?> _moveTask;
|
||||
protected ScheduledFuture<?> _moveTask;
|
||||
private String _name;
|
||||
private int _level = 1;
|
||||
private int _maxHp;
|
||||
@@ -1074,7 +1074,7 @@ public abstract class Creature extends WorldObject
|
||||
// }
|
||||
}
|
||||
|
||||
private void onAttackTimer()
|
||||
protected void onAttackTimer()
|
||||
{
|
||||
_attackTask = null;
|
||||
final Creature target = (Creature) _attackTarget;
|
||||
|
@@ -98,7 +98,7 @@ public class PlayerInstance extends Creature
|
||||
private int _pvpKills;
|
||||
private int _pkKills;
|
||||
private int _pvpFlag = 0;
|
||||
private long _lastPvpTime;
|
||||
protected long _lastPvpTime;
|
||||
private ScheduledFuture<?> _pvpTask;
|
||||
private int _maxLoad;
|
||||
private int _race;
|
||||
@@ -413,7 +413,7 @@ public class PlayerInstance extends Creature
|
||||
return _pvpFlag;
|
||||
}
|
||||
|
||||
private void stopPvPFlag()
|
||||
protected void stopPvPFlag()
|
||||
{
|
||||
if (_pvpTask != null)
|
||||
{
|
||||
|
@@ -41,9 +41,9 @@ import org.l2jmobius.util.Locator;
|
||||
*/
|
||||
public class SystemPanel extends JPanel
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
protected static final Logger LOGGER = Logger.getLogger(SystemPanel.class.getName());
|
||||
|
||||
private static final long START_TIME = System.currentTimeMillis();
|
||||
protected static final long START_TIME = System.currentTimeMillis();
|
||||
|
||||
public SystemPanel()
|
||||
{
|
||||
|
@@ -28,6 +28,9 @@ public class Rnd
|
||||
* Thread-specific random number generator.<br>
|
||||
* Each is seeded with the thread ID, so the sequence of random numbers are unique between threads.
|
||||
*/
|
||||
// Java 1.8
|
||||
// private static ThreadLocal<Random> RANDOM = new ThreadLocal<Random>()
|
||||
// Java 10
|
||||
private static ThreadLocal<Random> RANDOM = new ThreadLocal<>()
|
||||
{
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user