Code example for ScheduledFuture

Methods: cancel

0
		return tryPickUp(pet.getOwner());
	} 
	 
	public synchronized void unprotect() 
	{ 
		if (_task != null)
			_task.cancel(false);
		_isProtected = false;
		_owner = null;
		_task = null;
	} 
	 
	public synchronized void protect(L2PcInstance player)
	{ 
		unprotect(); 
		 
		_isProtected = true;
		 
		if ((_owner = player) == null)
			throw new NullPointerException("Trying to protect dropped item to null owner");